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

Mod Assign activity with no name breaks course reset: Invalid class module ID

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.8.9
    • Fix Version/s: None
    • Component/s: Assignment
    • Labels:
    • Affected Branches:
      MOODLE_28_STABLE

      Description

      (I appreciate that this is meant to never happen, but it has on our server)

      If a mod_assign activity has managed to get an empty name course reset does not work.

      The mod_assign reset function gets a list of activities in a course, this includes one that has no name. However when the assign object is being created it attempts to use the modinfo data.

      As the modinfo library thows away an cm that doesn't have a name (MDL-50892), it can't then find the cm data.

      Why does a coursemodule get dropped from the list of cms in the cm_info class?

      Instead of doing a continue why not make the name something like "Unnamed Activity - Please set this activity's name"?

      It would seem a more defensive approach...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mhughes2k Michael Hughes
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: