Details
-
Bug
-
Resolution: Fixed
-
Minor
-
3.7.5, 3.9
-
MOODLE_37_STABLE, MOODLE_39_STABLE
-
MOODLE_38_STABLE
-
MDL-68203-decode-url-quiz-restore-master -
Description
Steps to replicate
- Create A course
- Create a quiz
- Add a multiple choice question
- Add an answer contain a link which point to http://[currentmoodlesite]/course/view.php?id=[courseid]
- Save the question
- Duplicate the quiz
- There will be error displayed:
Failed to find an answer matching "<p><a href="$@COURSEVIEWBYID*14@$">Link ABC</a></p>" in the question_answers database table. This occurred while restoring the question with id 1 in the backup file, which has been matched to the existing question with id 1 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 121 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 109 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 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
- line 384 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
- line 3506 of /course/lib.php: call to restore_controller->execute_plan()
- line 3518 of /course/externallib.php: call to duplicate_module()
- line 244 of /lib/externallib.php: call to core_course_external::edit_module()
- line 79 of /lib/ajax/service.php: call to external_api::call_external_function()
I find that during an general course restore, the function define_decode_rules() is called
But during the quiz duplication, the function is not called
Attachments
Issue Links
- has a non-specific relationship to
-
MDL-70422 Random test error decoding question answers
-
- Closed
-
- is duplicated by
-
MDL-68628 error_question_answers_missing_in_db when duplicating a quiz with a link to the course in one of the answers
-
- Closed
-
- Testing discovered
-
MDL-68911 Quiz duplicate, error when there are module links in the Answer
-
- Open
-