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

Un-overriding a grade causes an error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3
    • 2.3
    • Assignment
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • Hide
      1. Create an instance of the new assignment module in a course with at least one student
      2. Go to the grading report and override a students mark for the assignment
      3. Edit the mark again and uncheck the overridden option
      4. Mark should go back to the mark from the assignment (none in this case). Without this patch you will see the above error at this step.
      Show
      Create an instance of the new assignment module in a course with at least one student Go to the grading report and override a students mark for the assignment Edit the mark again and uncheck the overridden option Mark should go back to the mark from the assignment (none in this case). Without this patch you will see the above error at this step.

      After overriding a grade, then unchecking the override option to restore the original grade, an error was displayed...

      Can not find data record in database table course_modules.
       
      More information about this error
      Debug info: SELECT id,course FROM {course_modules} WHERE id = ?
      [array (
      0 => '',
      )]
      Stack trace:
       
          line 1316 of \lib\dml\moodle_database.php: dml_missing_record_exception thrown
          line 1292 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select()
          line 6585 of \lib\accesslib.php: call to moodle_database->get_record()
          line 757 of \mod\assign\lib.php: call to context_module::instance()
          line 776 of \mod\assign\lib.php: call to assign_get_user_grades()
          line 1190 of \lib\gradelib.php: call to assign_update_grades()
          line 1447 of \lib\grade\grade_item.php: call to grade_update_mod_grades()
          line 319 of \lib\grade\grade_grade.php: call to grade_item->refresh_grades()
          line 215 of \grade\edit\tree\grade.php: call to grade_grade->set_overridden()

      This did not happen when I did the same think with the older assignment module.

      Replication steps:

      1. Create an assignment
      2. Go to the assignment grading page and grade some students (no need for submissions)
      3. Go to the Grading report (Course admin -> Grades)
      4. Turn editing on
      5. Click the edit icon (in Standard theme this is a hand holding a pencil)
      6. Check the overridden checkbox setting, alter the grade and save
      7. Click the edit icon again
      8. Uncheck the overridden checkbox and save

      Expected result: the user should be returned to the Grader report and the original grade should be shown

      Actual result: an error is shown

            damyon Damyon Wiese
            salvetore Michael de Raadt
            Dan Poltawski Dan Poltawski
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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