Adding propper support for the forum->user report log action. It was
a bit wrong. Code credits go to Petr! Merged from MOODLE_16_STABLE
This commit is contained in:
@@ -224,6 +224,10 @@ function forum_upgrade($oldversion) {
|
||||
table_column('forum_posts','','mailnow','integer');
|
||||
}
|
||||
|
||||
if ($oldversion < 2006011702) {
|
||||
execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'CONCAT(firstname,\' \',lastname)')");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@@ -163,6 +163,7 @@ INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum',
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add discussion', 'forum_discussions', 'name');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add post', 'forum_posts', 'subject');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'update post', 'forum_posts', 'subject');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'CONCAT(firstname,\' \',lastname)');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'move discussion', 'forum_discussions', 'name');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view subscribers', 'forum', 'name');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view discussion', 'forum_discussions', 'name');
|
||||
|
||||
@@ -175,6 +175,10 @@ function forum_upgrade($oldversion) {
|
||||
execute_sql("ALTER TABLE {$CFG->prefix}forum DROP CONSTRAINT {$CFG->prefix}forum_type_check");
|
||||
}
|
||||
|
||||
if ($oldversion < 2006011702) {
|
||||
execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'firstname||\' \'||lastname')");
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
@@ -175,6 +175,7 @@ INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum',
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add discussion', 'forum_discussions', 'name');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'add post', 'forum_posts', 'subject');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'update post', 'forum_posts', 'subject');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'user report', 'user', 'firstname||\' \'||lastname');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'move discussion', 'forum_discussions', 'name');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view subscribers', 'forum', 'name');
|
||||
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('forum', 'view discussion', 'forum_discussions', 'name');
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
require_course_login($course);
|
||||
|
||||
|
||||
add_to_log($course->id, "forum", "user report", "user.php?id=$course->id&user=$user->id&mode=$mode", "$user->id");
|
||||
add_to_log($course->id, "forum", "user report", "user.php?course=$course->id&id=$user->id&mode=$mode", "$user->id");
|
||||
|
||||
$strforumposts = get_string('forumposts', 'forum');
|
||||
$strparticipants = get_string('participants');
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// This fragment is called by /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2006011701;
|
||||
$module->version = 2006011702;
|
||||
$module->requires = 2005031000; // Requires this Moodle version
|
||||
$module->cron = 60;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user