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

Restoring as merge fails due to gradebook

XMLWordPrintable

    • MOODLE_26_STABLE

      1. Create a new course
      2. Enrol a student
      3. Create a new assignment
      4. Grade the student on the assignment
      5. Backup the course
        • Select Include grade history
        • And Include course logs
      6. Perform the backup
      7. Restore the backup by merge into that same course
        • Select Include grade history and Include course logs

      Expected

      • Everything is OK

      Actual

      Debug info: Duplicate entry '3-1' for key 'mdl_gradgrad_useite_uix'
      INSERT INTO mdl_grade_grades (userid,rawgrade,rawgrademax,rawgrademin,rawscaleid,usermodified,finalgrade,hidden,locked,locktime,exported,overridden,excluded,feedback,feedbackformat,information,informationformat,timecreated,timemodified,itemid) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
      [array (
      0 => '3',
      1 => NULL,
      2 => '100.00000',
      3 => '0.00000',
      4 => NULL,
      5 => NULL,
      6 => '1.00000',
      7 => '0',
      8 => '0',
      9 => '0',
      10 => '0',
      11 => '0',
      12 => '0',
      13 => NULL,
      14 => '0',
      15 => NULL,
      16 => '0',
      17 => NULL,
      18 => NULL,
      19 => '1',
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 451 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1079 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1121 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 237 of /backup/moodle2/restore_stepslib.php: call to mysqli_native_moodle_database->insert_record()
      line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_gradebook_structure_step->process_grade_grade()
      line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
      line 151 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
      line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
      line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
      line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
      line 186 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
      line 274 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
      line ? of unknownfile: call to progressive_parser->end_tag()
      line 175 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
      line 154 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
      line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
      line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_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 343 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 77 of /backup/restore.php: call to restore_ui->execute()
      

            Unassigned Unassigned
            fred Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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