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

Exception when creating a quiz user override

XMLWordPrintable

      Hi,

      in a quiz, when adding a user override, if you click on the button "Save and enter another override", Moodle generate the following exception:

       

      Exception - core_availability\info_module::__construct(): Argument #1 ($cm) must be of type cm_info, stdClass given, called in [dirroot]/mod/quiz/classes/form/edit_override_form.php on line 169

       

      The user override is correctly created because the exception is triggered after page reload. For this reason, if you save the override with the Save button everything works fine.

      These are the steps to reproduce the error:

      1. Create a course with at least 1 student
      2. Create a quiz (questions are not needed)
      3. Go to the Overrides page (secondary menu: More -> Overrides)
      4. Click on the Add user override button
      5. Select a student, override any quiz setting (ie. Time limit) and save using the Save and enter another override button.

      You can easily reproduce this error using the Sandbox Demo platform (https://sandbox.moodledemo.net/).

      Thanks,
      Giorgio

            pholden Paul Holden
            kemmotar Giorgio Riva
            Tim Hunt Tim Hunt
            Ilya Tregubov Ilya Tregubov
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 40 minutes
                40m

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