Skip to content

Commit

Permalink
MDL-79364 backup: Fix conversion for 1.9 backups.
Browse files Browse the repository at this point in the history
1.9 backups used current plugin version as oldversion.
But quiz uses some hardcoded version numbers when processing
restore which is lower then current plugin number, so some quiz
logic was ignored.

See define_structure(), process_quiz_question_instance() within
restore_quiz_stepslib.php
  • Loading branch information
ilyatregubov committed Oct 2, 2023
1 parent 43d5aec commit 94a13ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backup/converter/moodle1/handlerlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,9 @@ public function process_course_module($data, $raw) {
$plugin->version = null;
$module = $plugin;
include($versionfile);
$data['version'] = $plugin->version;
// Have to hardcode - since quiz uses some hardcoded version numbers when restoring.
// This is the lowest number used minus one.
$data['version'] = 2011010099;
} else {
$data['version'] = null;
}
Expand Down

0 comments on commit 94a13ae

Please sign in to comment.