Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5496

Scheduler in 2.6 breaks course restore into 2.6, 2.7

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.4, 2.7.3
    • Fix Version/s: 2.7.1
    • Component/s: Module: Scheduler
    • Labels:
      None
    • Plugin Version:
      2013092702, 2014090100
    • Workaround:
      Hide

      Edit the file(s) scheduler.xml within the backup file, replacing

      <gradingstrategy>$@NULL@$</gradingstrategy>

      with

      <gradingstrategy>0</gradingstrategy>

      Show
      Edit the file(s) scheduler.xml within the backup file, replacing <gradingstrategy>$@NULL@$</gradingstrategy> with <gradingstrategy>0</gradingstrategy>
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE

      Description

      When I attempt to restore a course exported from Moodle 2.6.4 into Moodle 2.7.3 or Moodle 2.6.4 (a copy of the install that was used to create the backup), it fails with a "Column 'gradingstrategy' cannot be null...mdl_scheduler" error.

      Error generated in Moodle 2.6.4:
      Debug info: Column 'gradingstrategy' cannot be null
      INSERT INTO mdl_scheduler (name,intro,introformat,schedulermode,reuseguardtime,defaultslotduration,allownotifications,staffrolename,teacher,scale,gradingstrategy,timemodified,course) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)
      [array (
      0 => 'Conference Sign-Up',
      1 => '<p>Directions</p>',
      2 => '1',
      3 => 'onetime',
      4 => '24',
      5 => '15',
      6 => '0',
      7 => '',
      8 => 0,
      9 => '0',
      10 => NULL,
      11 => 1416509304,
      12 => 4,
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1122 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 55 of /mod/scheduler/backup/moodle2/restore_scheduler_stepslib.php: call to mysqli_native_moodle_database->insert_record()
      line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_scheduler_activity_structure_step->process_scheduler()
      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 192 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
      line 177 of /backup/util/plan/base_plan.class.php: call to restore_activity_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 99 of /backup/restore.php: call to restore_ui->execute()

      Error generated in Moodle 2.7.3:
      Debug info: Column 'gradingstrategy' cannot be null
      INSERT INTO mdl_scheduler (name,intro,introformat,schedulermode,reuseguardtime,defaultslotduration,allownotifications,staffrolename,scale,gradingstrategy,timemodified,course) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
      [array (
      0 => 'Conference Sign-Up',
      1 => '<p>Please sign-up for your conference here. Remember, missing a conference equals missing a class session. </p>',
      2 => '1',
      3 => 'onetime',
      4 => '24',
      5 => '15',
      6 => '0',
      7 => '',
      8 => '0',
      9 => NULL,
      10 => 1416509304,
      11 => 2,
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 54 of /mod/scheduler/backup/moodle2/restore_scheduler_stepslib.php: call to mysqli_native_moodle_database->insert_record()
      line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_scheduler_activity_structure_step->process_scheduler()
      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 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
      line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
      line ? of unknownfile: call to progressive_parser->end_tag()
      line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
      line 158 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 192 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
      line 177 of /backup/util/plan/base_plan.class.php: call to restore_activity_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()

        Attachments

          Activity

            People

            Assignee:
            bostelm Henning Bostelmann
            Reporter:
            rloconne Rebecca O'Connell
            Participants:
            Component watchers:
            Valery Fremaux
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Jul/14