Permalink
Browse files

Fixed up some wrong entries in the log_display table MDL-6516

NOTE:  The dates are a month in advance for $version here!  We need
to increment very slowly until it catches up, and make sure that we
manage the versions in HEAD very carefully after we branch for 1.7
  • Loading branch information...
1 parent bd10f85 commit 924ccd683a3ca72fa9ff1000a964c43fbf5895e5 moodler committed Sep 27, 2006
Showing with 12 additions and 2 deletions.
  1. +5 −0 mod/scorm/db/mysql.php
  2. +6 −1 mod/scorm/db/postgres7.php
  3. +1 −1 mod/scorm/version.php
View
@@ -221,6 +221,11 @@ function scorm_upgrade($oldversion) {
table_column("scorm", "", "skipview", "TINYINT", "1", "UNSIGNED", "1", "NOT NULL", "launch");
}
+ if ($oldversion < 2006102702) { /// A month in advance!
+ execute_sql("DELETE FROM {$CFG->prefix}log_display WHERE module = 'scorm' AND action = 'review' AND mtable = 'resource' AND field = 'name';", false); // MDL-6516
+ execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('scorm', 'review', 'scorm', 'name');", false);
+ }
+
return true;
}
?>
@@ -97,7 +97,7 @@ function scorm_upgrade($oldversion) {
}
modify_database('',"DROP TABLE prefix_scorm_sco_users");
- modify_database('',"INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'review', 'resource', 'name')");
+ modify_database('',"INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('resource', 'review', 'resource', 'name')"); // Wrong line! See MDL-6516
}
if ($oldversion < 2005040200) {
@@ -244,6 +244,11 @@ function scorm_upgrade($oldversion) {
table_column("scorm", "", "skipview", "integer", "", "", "1", "NOT NULL");
}
+ if ($oldversion < 2006102702) { // This is a month in advance!!!!!
+ execute_sql("DELETE FROM {$CFG->prefix}log_display WHERE module = 'resource' AND action = 'review' AND mtable = 'resource' AND field = 'name';", false); // See MDL-6516
+ execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('scorm', 'review', 'scorm', 'name');", false);
+ }
+
return true;
}
?>
View
@@ -5,7 +5,7 @@
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006102601; // The (date) version of this module
+$module->version = 2006102702; // The (date) version of this module (NOTE THIS WAS SET WRONG TO AN OCTOBER DATE IN SEPTEMBER!)
$module->requires = 2006080900; // The version of Moodle that is required
$module->cron = 0; // How often should cron check this module (seconds)?

0 comments on commit 924ccd6

Please sign in to comment.