]> git.mjollnir.org Git - moodle.git/commitdiff
Adding propper support for the forum->user report log action. It was
authorstronk7 <stronk7>
Thu, 1 Jun 2006 23:16:08 +0000 (23:16 +0000)
committerstronk7 <stronk7>
Thu, 1 Jun 2006 23:16:08 +0000 (23:16 +0000)
a bit wrong. Code credits go to Petr!

Merged from MOODLE_16_STABLE

mod/forum/db/mysql.php
mod/forum/db/mysql.sql
mod/forum/db/postgres7.php
mod/forum/db/postgres7.sql
mod/forum/user.php
mod/forum/version.php

index c96b0dd015c5f0d2f860e78e3c7064774993b68e..93b0403dd27d0798b12f0a4532154d36cdbdc09f 100644 (file)
@@ -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;
   
 }
index 50861ebc866c09bac0ad23ccd534bc50bb70302d..44ea4d71782dc02e8eb81d5d9f22673dd000c1a4 100644 (file)
@@ -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');
index dab254bf7abae240b6d3d7b34b7ce26e3beab1c7..75e44cb49b25c943eb5162b601fa61f0826421de 100644 (file)
@@ -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;
 
index 96820bfc5508869b877e0039d9a0e5b5d20b2a1f..85ec2e45996249fd84c6ec062874e5b3737631e1 100644 (file)
@@ -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');
index 8e277fbff2a144ce6e0f0bb3fae62c12053625fa..185921f584143cade107ba9459f346a676fab2e9 100644 (file)
@@ -27,7 +27,7 @@
     require_course_login($course);
 
 
-    add_to_log($course->id, "forum", "user report", "user.php?id=$course->id&amp;user=$user->id&amp;mode=$mode", "$user->id"); 
+    add_to_log($course->id, "forum", "user report", "user.php?course=$course->id&amp;id=$user->id&amp;mode=$mode", "$user->id");
 
     $strforumposts   = get_string('forumposts', 'forum');
     $strparticipants = get_string('participants');
index 830cb1b55faba8b26dd8a6c1ef6d547cc7ab7f4d..dc01f6ecc27ba83a0af100db790763bfede7f4a3 100644 (file)
@@ -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;