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

Error on creating assignment when feedback plugin uninstalled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.0.6, 3.1.2
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to "Site administration" > "Plugins" > "Activity modules" > "Assignment" > "Assignment settings" and set "Feedback plugin" to "File feedback".
      2. Go to "Site administration" > "Plugins" > "Activity modules" > "Assignment" > "Feedback plugins" > "Manage assignment feedback plugins" and uninstall this plugin
      3. Delete the mod/assign/feedback/file folder.
      4. Go to a course and add an assignment - confirm that you don't see the reported error when saving the assignment, and that the assignment is created as normal.
      5. Just a reminder to revert the changes you did in step 3.
      Show
      Go to "Site administration" > "Plugins" > "Activity modules" > "Assignment" > "Assignment settings" and set "Feedback plugin" to "File feedback". Go to "Site administration" > "Plugins" > "Activity modules" > "Assignment" > "Feedback plugins" > "Manage assignment feedback plugins" and uninstall this plugin Delete the mod/assign/feedback/file folder. Go to a course and add an assignment - confirm that you don't see the reported error when saving the assignment, and that the assignment is created as normal. Just a reminder to revert the changes you did in step 3.
    • Workaround:
      Hide

      Don't uninstall your default gradebook plugin

      Show
      Don't uninstall your default gradebook plugin
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:

      Description

      I'm seeing this error when trying to create an assignment when the feedback_plugin_for_gradebook setting is set to a feedback plugin that has been uninstalled:

      Exception - Call to a member function is_visible() on null
       
      More information about this error
      Debug info:
      Error code: generalexceptionmessage
      Stack trace:
       
          line 7958 of \mod\assign\locallib.php: Error thrown
          line 881 of \mod\assign\locallib.php: call to assign->is_gradebook_feedback_enabled()
          line 1067 of \mod\assign\locallib.php: call to assign->update_gradebook()
          line 193 of \mod\assign\lib.php: call to assign->update_instance()
          line 569 of \course\modlib.php: call to assign_update_instance()
          line 273 of \course\modedit.php: call to update_moduleinfo()
      

      To reproduce:

      1. In admin settings, set the setting "assign | feedback_plugin_for_gradebook" to "File feedback"
      2. Go to "Manage assignment feedback plugins" in the admin menu and uninstall this plugin
      3. Go to a course and add an assignment - you should see the above error when you click save

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Sep/16