mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Better log_display fixes
This commit is contained in:
parent
14e4a496b4
commit
db70b54b62
@ -230,12 +230,12 @@ function main_upgrade($oldversion=0) {
|
||||
execute_sql("INSERT INTO {$CFG->prefix}log_display VALUES ('user', 'view', 'user', 'CONCAT(firstname,' ',lastname)') ");
|
||||
}
|
||||
}
|
||||
if ($oldversion < 2003010100) {
|
||||
if ($oldversion < 2003010101) {
|
||||
delete_records("log_display", "module", "user");
|
||||
$new->module = "user";
|
||||
$new->action = "view";
|
||||
$new->mtable = "user";
|
||||
$new->field = "CONCAT(firstname,\' \',lastname)";
|
||||
$new->field = "CONCAT(firstname,\" \",lastname)";
|
||||
insert_record("log_display", $new);
|
||||
|
||||
delete_records("log_display", "module", "course");
|
||||
@ -246,6 +246,8 @@ function main_upgrade($oldversion=0) {
|
||||
insert_record("log_display", $new);
|
||||
$new->action = "update";
|
||||
insert_record("log_display", $new);
|
||||
$new->action = "enrol";
|
||||
insert_record("log_display", $new);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -227,6 +227,8 @@ CREATE TABLE `prefix_user_teachers` (
|
||||
UNIQUE KEY `id` (`id`)
|
||||
) TYPE=MyISAM COMMENT='One record per teacher per course';
|
||||
|
||||
INSERT INTO prefix_log_display VALUES ('user', 'view', 'user', 'CONCAT(firstname,' ',lastname)');
|
||||
INSERT INTO prefix_log_display VALUES ('user', 'view', 'user', 'CONCAT(firstname," ",lastname)');
|
||||
INSERT INTO prefix_log_display VALUES ('course', 'view', 'course', 'fullname');
|
||||
INSERT INTO prefix_log_display VALUES ('course', 'update', 'course', 'fullname');
|
||||
INSERT INTO prefix_log_display VALUES ('course', 'enrol', 'course', 'fullname');
|
||||
INSERT INTO prefix_log_display VALUES ('course', 'update', 'course', 'fullname');
|
||||
|
@ -19,6 +19,26 @@
|
||||
|
||||
function main_upgrade($oldversion=0) {
|
||||
|
||||
if ($oldversion < 2003010101) {
|
||||
delete_records("log_display", "module", "user");
|
||||
$new->module = "user";
|
||||
$new->action = "view";
|
||||
$new->mtable = "user";
|
||||
$new->field = "CONCAT(firstname,\" \",lastname)";
|
||||
insert_record("log_display", $new);
|
||||
|
||||
delete_records("log_display", "module", "course");
|
||||
$new->module = "course";
|
||||
$new->action = "view";
|
||||
$new->mtable = "course";
|
||||
$new->field = "fullname";
|
||||
insert_record("log_display", $new);
|
||||
$new->action = "update";
|
||||
insert_record("log_display", $new);
|
||||
$new->action = "enrol";
|
||||
insert_record("log_display", $new);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -137,3 +137,7 @@ CREATE TABLE prefix_user_teachers (
|
||||
|
||||
|
||||
INSERT INTO prefix_log_display VALUES ('user', 'view', 'user', 'CONCAT(firstname," ",lastname)');
|
||||
INSERT INTO prefix_log_display VALUES ('course', 'view', 'course', 'fullname');
|
||||
INSERT INTO prefix_log_display VALUES ('course', 'update', 'course', 'fullname');
|
||||
INSERT INTO prefix_log_display VALUES ('course', 'enrol', 'course', 'fullname');
|
||||
INSERT INTO prefix_log_display VALUES ('course', 'update', 'course', 'fullname');
|
||||
|
@ -5,7 +5,7 @@
|
||||
// database to determine whether upgrades should
|
||||
// be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2003010100; // The current version is a date (YYYYMMDDXX)
|
||||
$version = 2003010101; // The current version is a date (YYYYMMDDXX)
|
||||
|
||||
$release = "1.0.8 alpha"; // User-friendly version number
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user