Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-37654

The function course_delete_module should return an untranslated errorcode for the exceptions for the web service.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course module.
      2. Edit the function course_delete_module in course/lib.php by copying the first occurrence of "throw new exception ..." in this issues diff and placing it after the declaration of $modulename.
      3. Attempt to delete the module and ensure exception is thrown as expected.
      4. Replace this "throw new exception ..." with the next one and continue until you have gone through all of them in this diff.
      5. Remove the changes you have done from course/lib.php and ensure you can delete the module instance.
      Show
      Create a course module. Edit the function course_delete_module in course/lib.php by copying the first occurrence of "throw new exception ..." in this issues diff and placing it after the declaration of $modulename. Attempt to delete the module and ensure exception is thrown as expected. Replace this "throw new exception ..." with the next one and continue until you have gone through all of them in this diff. Remove the changes you have done from course/lib.php and ensure you can delete the module instance.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-37654_master

      Description

      The web services depend on an error code to be returned when an exception is thrown, it is not logical to pass a string that will vary depending on the module being used. Return an error code so it will be the same regardless of module.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/13