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

Uninstalled modules break gradebook singleview

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.8.6
    • Fix Version/s: None
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_28_STABLE

      Description

      I found this because I have an old mod_assignment in my test course, left over from years ago.

      Steps to reprodce:

      1. Install a Moodle 2.x, for some x that allows you to create an old mod_assignment.
      2. Create a test course with an old-style assignment in it.
      3. Upgrade to Moodle 2.8 or later.
      4. Note that the assignment is not shown on the course page.
      5. Note that in the grade report, the column for the Assignemtn is shown, with no link in the column heading.
      6. Click the Single view icon for any row or column.

      Expect result: Something sensible is displayed.

      Acutal result:

      Error
       
      Invalid module ID: {$a}
       
      More information about this error
      Debug info:
      Error code: invalidmoduleid
      Stack trace:
       
          line 2254 of /lib/modinfolib.php: moodle_exception thrown
          line 117 of /grade/report/singleview/classes/local/screen/user.php: call to get_course_and_cm_from_instance()
          line 90 of /grade/report/singleview/classes/local/screen/screen.php: call to gradereport_singleview\local\screen\user->init()
          line 98 of /grade/report/singleview/lib.php: call to gradereport_singleview\local\screen\screen->__construct()
          line 131 of /grade/report/singleview/index.php: call to gradereport_singleview->__construct()
      

      I expect this happens in any case where you create a graded activity, and then un-install the plugin. (So, most likely with a plugin installed from the plugins DB.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              timhunt Tim Hunt
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: