Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4559

LMB should handle course conflicts more gracefully

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5.1
    • 2.4.5
    • Enrol: Banner/LMB
    • None
    • 2.5.0
    • MOODLE_24_STABLE
    • MOODLE_25_STABLE

      The following sequence of events happened to us last week:

      1. LMB creates course for the current term.
      2. Teacher imports course data from past term.
      3. Teacher ticks box that says 'overwrite course configuration' (we think)
      4. Course idnumber gets annihilated somehow

      The next day LMB (we run in bulk mode) tried to re-create the now missing course, but encountered a fatal error since the shortname still existed. Stack trace:

      Default exception handler: Short name is already used for another course Debug:
      Error code: shortnametaken

      • line 3837 of /course/lib.php: moodle_exception thrown
      • line 778 of /enrol/lmb/lib.php: call to create_course()
      • line 635 of /enrol/lmb/lib.php: call to enrol_lmb_plugin->create_shell_course()
      • line 465 of /enrol/lmb/lib.php: call to enrol_lmb_plugin->process_course_section_tag()
      • line 277 of /enrol/lmb/lib.php: call to enrol_lmb_plugin->process_group_tag()
      • line 385 of /enrol/lmb/lib.php: call to enrol_lmb_plugin->process_file()
      • line 72 of /enrol/lmb/cli/folderprocess.php: call to enrol_lmb_plugin->process_folder()

      !!! Short name is already used for another course !!!

      LMB stopped on this exception, preventing it from running until we'd tracked down the bad course. This proved difficult since create_course() doesn't include the bad shortname or idnumber in the exception. I've raised that issue in MDL-41256. What I'm wondering is if LMB can perhaps catch these exceptions and log them, so that one bad course doesn't stop the whole process.

            emerrill Eric Merrill
            cfulton Charles Fulton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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