Skip to content

Commit

Permalink
MDL-15610 Fixed very old log display bug for labels (well spotted Gary!)
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Jul 11, 2008
1 parent 4c87067 commit 04cb203
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mod/label/db/install.xml
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions mod/label/db/mysql.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mod/label/db/postgres7.php
Expand Up @@ -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');");

}

Expand Down
3 changes: 3 additions & 0 deletions mod/label/db/upgrade.php
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion mod/label/version.php
Expand Up @@ -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)

Expand Down

0 comments on commit 04cb203

Please sign in to comment.