Skip to content
Browse files

MDL-15610 Fixed very old log display bug for labels (well spotted Gary!)

  • Loading branch information...
1 parent 4c87067 commit 04cb2032377ed52959ccd84e5c22a052f113a499 moodler committed Jul 11, 2008
Showing with 10 additions and 7 deletions.
  1. +2 −2 mod/label/db/install.xml
  2. +2 −2 mod/label/db/mysql.php
  3. +2 −2 mod/label/db/postgres7.php
  4. +3 −0 mod/label/db/upgrade.php
  5. +1 −1 mod/label/version.php
View
4 mod/label/db/install.xml
@@ -23,8 +23,8 @@
<STATEMENTS>
<STATEMENT NAME="insert log_display" TYPE="insert" TABLE="log_display" COMMENT="Initial insert of records on table log_display">
<SENTENCES>
- <SENTENCE TEXT="(module, action, mtable, field) VALUES ('label', 'add', 'quiz', 'name')" />
- <SENTENCE TEXT="(module, action, mtable, field) VALUES ('label', 'update', 'quiz', 'name')" />
+ <SENTENCE TEXT="(module, action, mtable, field) VALUES ('label', 'add', 'label', 'name')" />
+ <SENTENCE TEXT="(module, action, mtable, field) VALUES ('label', 'update', 'label', 'name')" />
</SENTENCES>
</STATEMENT>
</STATEMENTS>
View
4 mod/label/db/mysql.php
@@ -17,8 +17,8 @@ function label_upgrade($oldversion) {
}
if ($oldversion < 2004021900) {
- modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'add', 'quiz', 'name');");
- modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'quiz', 'name');");
+ modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'add', 'label', 'name');");
+ modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'label', 'name');");
}
if ($oldversion < 2004111200) { //DROP first
View
4 mod/label/db/postgres7.php
@@ -27,9 +27,9 @@ function label_upgrade($oldversion) {
if ($oldversion < 2004021900) {
- modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'add', 'quiz', 'name');");
+ modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'add', 'label', 'name');");
- modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'quiz', 'name');");
+ modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'label', 'name');");
}
View
3 mod/label/db/upgrade.php
@@ -33,6 +33,9 @@ function xmldb_label_upgrade($oldversion=0) {
/// }
//===== 1.9.0 upgrade line ======//
+ if ($oldversion < 2007101510) {
+ execute_sql("UPDATE {$CFG->prefix}log_display SET mtable = 'label' WHERE module = 'label'", 'false');
+ }
return $result;
}
View
2 mod/label/version.php
@@ -5,7 +5,7 @@
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2007101509; // The current module version (Date: YYYYMMDDXX)
+$module->version = 2007101510; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2007101509; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)

0 comments on commit 04cb203

Please sign in to comment.
Something went wrong with that request. Please try again.