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

Better debugging information from create_course()

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6
    • 2.6
    • Course
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • MDL-41256-master
    • Hide

      New exception handling

      Run the core_course_courselib_testcase unit test.

      Exception strings

      1. Create a course with some enroled users.
      2. Create a group with a given ID.
      3. Attempt to create another group with the same ID. Verify that the error reads "This ID number is already in use."
      4. Attempt to create a course with the same idnumber as existing, make sure the error message quotes the idnumber.
      5. Attempt to create a course with the same shortname as existing, make sure the error message quotes the shortname
      Show
      New exception handling Run the core_course_courselib_testcase unit test. Exception strings Create a course with some enroled users. Create a group with a given ID. Attempt to create another group with the same ID. Verify that the error reads "This ID number is already in use." Attempt to create a course with the same idnumber as existing, make sure the error message quotes the idnumber. Attempt to create a course with the same shortname as existing, make sure the error message quotes the shortname

      The exception thrown on a duplicate shortname or idnumber in create_course() doesn't include the actual string, which would be helpful for debugging purposes. Compare how the same issue is handled in duplicate_course() in course/externallib.php.

            cfulton Charles Fulton
            cfulton Charles Fulton
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.