}
}
+ if ($oldversion < 2004020500) {
+ if ($quizzes = get_records("quiz")) {
+ foreach ($quizzes as $quiz) {
+ if ($cm = get_coursemodule_from_instance("quiz", $quiz->id, $quiz->course)) {
+ execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
+ WHERE module = 'quiz' AND url = 'view.php?id=$cm->id'");
+ }
+ }
+ }
+ }
+
return true;
}
}
}
+ if ($oldversion < 2004020500) {
+ if ($quizzes = get_records("quiz")) {
+ foreach ($quizzes as $quiz) {
+ if ($cm = get_coursemodule_from_instance("quiz", $quiz->id, $quiz->course)) {
+ execute_sql("UPDATE {$CFG->prefix}log SET cmid = '$cm->id'
+ WHERE module = 'quiz' AND url = 'view.php?id=$cm->id'");
+ }
+ }
+ }
+ }
+
return true;
}
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2004013101; // The (date) version of this module
-$module->requires = 2004013101; // Requires this Moodle version
+$module->version = 2004020500; // The (date) version of this module
+$module->requires = 2004013101; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)?
?>