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

Assignment upgrade fails during 1.9 course restore conducted by a teacher




      When conducting a course restore from 1.9 and merging into an existing course, the assignment upgrade fails.

      This seems to affect teachers only. When an admin attempts the restore, it succeeds.

      Replication steps:

      1. Create a new course or us an existing course (empty or with existing content)
      2. Enrol a teacher
      3. Log in as that teacher
      4. Navigate to the course
      5. Restore the attached course
        • Choose to merge into the current course (or delete the content of the course)

      Expected result: The course should restore and the assignment should upgrade without error.

      Actual result: The restore fails showing an error upgrading the assignment.

      More information about this error
      Debug info:
      Error code: mod_assign_upgrade_failed
      $a contents:
      Stack trace:
          line 135 of \mod\assignment\backup\moodle2\restore_assignment_stepslib.php: restore_step_exception thrown
          line 156 of \mod\assignment\backup\moodle2\restore_assignment_stepslib.php: call to restore_assignment_activity_structure_step->upgrade_mod_assign()
          line 423 of \backup\util\plan\restore_structure_step.class.php: call to restore_assignment_activity_structure_step->after_restore()
          line 106 of \backup\util\plan\restore_task.class.php: call to restore_structure_step->launch_after_restore_methods()
          line 193 of \backup\util\plan\restore_plan.class.php: call to restore_task->execute_after_restore()
          line 120 of \backup\moodle2\restore_final_task.class.php: call to restore_plan->execute_after_restore()
          line 506 of \backup\moodle2\restore_stepslib.php: call to restore_final_task->launch_execute_after_restore()
          line 34 of \backup\util\plan\restore_execution_step.class.php: call to restore_execute_after_restore->define_execution()
          line 181 of \backup\util\plan\base_task.class.php: call to restore_execution_step->execute()
          line 177 of \backup\util\plan\base_plan.class.php: call to base_task->execute()
          line 167 of \backup\util\plan\restore_plan.class.php: call to base_plan->execute()
          line 333 of \backup\controller\restore_controller.class.php: call to restore_plan->execute()
          line 184 of \backup\util\ui\restore_ui.class.php: call to restore_controller->execute_plan()
          line 107 of \backup\restore.php: call to restore_ui->execute()

      This seems to affect 2.7 and the current master (pre-2.8) but does not affect 2.6 (and presumably earlier versions).


        Issue Links



              damyon Damyon Wiese
              salvetore Michael de Raadt
              Sam Hemelryk Sam Hemelryk
              Dan Poltawski Dan Poltawski
              Dan Poltawski Dan Poltawski
              0 Vote for this issue
              1 Start watching this issue




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