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

Quiz restore fails when switching $CFG->slasharguments

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.2.3, 3.3
    • Fix Version/s: None
    • Component/s: Backup, Questions, Quiz
    • Labels:
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE

      Description

      1. Make sure $CFG->slasharguments is turned on.
      2. Restore a quiz that contains answers with image URLs. (use this -> backup-moodle2-activity-343-quiz343-20170504-1222-nu.mbz)
      3. Switch off $CFG->slasharguments.
      4. Duplicate the quiz.
        • Expected: The quiz gets duplicated successfully
        • Actual: An error comes up:

          Failed to find an answer matching "<span style=" color:#000000;"><IMG src="http://jun.per.in.moodle.com/im_review/file.php?file=%2F%2F%2FRspQ-Spectroscopy_test_2010%2Fquestion15d.gif" alt="question15d" align="bottom" border=0></span>" in the question_answers database table. This occurred while restoring the question with id 27 in the backup file, which has been matched to the existing question with id 27 in the database.
          

          Error code: error_question_answers_missing_in_db
           * line 185 of /backup/moodle2/restore_qtype_plugin.class.php: restore_step_exception thrown
           * line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_qtype_plugin->process_question_answer()
           * line 112 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
           * line 178 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
           * line 100 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 178 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 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
           * line 3387 of /course/lib.php: call to restore_controller->execute_plan()
           * line 3361 of /course/externallib.php: call to duplicate_module()
           * line 228 of /lib/externallib.php: call to core_course_external::edit_module()
           * line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
          

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jpataleta Jun Pataleta
                Participants:
                Component watchers:
                Adrian Greeve, Mihail Geshoski, Peter Dias, Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: