]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed up some wrong entries in the log_display table MDL-6516
authormoodler <moodler>
Wed, 27 Sep 2006 14:08:17 +0000 (14:08 +0000)
committermoodler <moodler>
Wed, 27 Sep 2006 14:08:17 +0000 (14:08 +0000)
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

mod/scorm/db/mysql.php
mod/scorm/db/postgres7.php
mod/scorm/version.php

index 6537bbae5347dc1f32fe2ec9b07c1de72a10d72f..6108dc15b31de0628a6b76e42442b699e9608e9b 100755 (executable)
@@ -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;
 }
 ?>
index 9e02e58d7fe10707877c2b90ff0331df5093b15b..a4d9a60a72cae9135662fbcb11e2459530d905a9 100755 (executable)
@@ -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;
 }
 ?>
index 6245400f813ca40eb1de34b72d3b9ed4926f3e41..748825db90318622e9a712eaec4efb7b04f30edc 100755 (executable)
@@ -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)?