Skip to content

Commit

Permalink
Fixed missing Label logs - thanks Eloy!
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Feb 19, 2004
1 parent 94b9a1c commit 899e041
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions mod/label/db/mysql.php
Expand Up @@ -10,6 +10,12 @@ function label_upgrade($oldversion) {
table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id");
}

if ($oldversion < 2004021900) {
modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');");
modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');");
}


return true;
}

Expand Down
3 changes: 3 additions & 0 deletions mod/label/db/mysql.sql
Expand Up @@ -6,3 +6,6 @@ CREATE TABLE `prefix_label` (
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) COMMENT='Defines labels';

INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');
INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');
5 changes: 5 additions & 0 deletions mod/label/db/postgres7.php
Expand Up @@ -10,6 +10,11 @@ function label_upgrade($oldversion) {
table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id");
}

if ($oldversion < 2004021900) {
modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');");
modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');");
}

return true;
}

Expand Down
3 changes: 3 additions & 0 deletions mod/label/db/postgres7.sql
Expand Up @@ -5,3 +5,6 @@ CREATE TABLE prefix_label (
content text,
timemodified integer NOT NULL default '0'
);

INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');
INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');
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 = 2004013101; // The current module version (Date: YYYYMMDDXX)
$module->version = 2004021900; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2004013101; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)

Expand Down

0 comments on commit 899e041

Please sign in to comment.