]> git.mjollnir.org Git - moodle.git/commitdiff
report XXXX actions added. Bug 5714.
authorstronk7 <stronk7>
Sun, 4 Jun 2006 00:54:34 +0000 (00:54 +0000)
committerstronk7 <stronk7>
Sun, 4 Jun 2006 00:54:34 +0000 (00:54 +0000)
(http://moodle.org/bugs/bug.php?op=show&bugid=5714)

More or less, merged from MOODLE_16_STABLE

lib/db/mysql.php
lib/db/mysql.sql
lib/db/postgres7.php
lib/db/postgres7.sql
version.php

index d7de119942e226415b5816ae3c14b8bc60a2bcb0..4fe7e51d625a4b0fca4a88861222932d0866d065 100644 (file)
@@ -1963,6 +1963,26 @@ function main_upgrade($oldversion=0) {
         execute_sql("ALTER TABLE `{$CFG->prefix}stats_user_monthly` CHANGE `writes` statswrites int(10) unsigned  NOT NULL default 0", false);
   
     }
+
+    // Adding some missing log actions
+    if ($oldversion < 2006060400) {
+        // But only if they doesn't exist (because this was introduced after branch and we could be duplicating!)
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report log')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report log', 'course', 'fullname')");
+        }
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report live')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report live', 'course', 'fullname')");
+        }
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report outline')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report outline', 'course', 'fullname')");
+        }
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report participation')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report participation', 'course', 'fullname')");
+        }
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report stats')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report stats', 'course', 'fullname')");
+        }
+    }
     
     return $result;
 }
index aaa322891c1acffceda0eb149b9957cbec8eb6be..96e1d6c3fb8e3030515c139783caebc4b0f592be 100644 (file)
@@ -905,6 +905,11 @@ INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course',
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'view', 'course', 'fullname');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'update', 'course', 'fullname');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'enrol', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report log', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report live', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report outline', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report participation', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report stats', 'course', 'fullname');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('message', 'write', 'user', 'CONCAT(firstname," ",lastname)');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('message', 'read', 'user', 'CONCAT(firstname," ",lastname)');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('message', 'add contact', 'user', 'CONCAT(firstname," ",lastname)');
index 3c6ac1820ad6394c194b61b435937e1027fe0e5f..31df850b9b45c26d656f78bd002759103cec4e2a 100644 (file)
@@ -1590,7 +1590,27 @@ function main_upgrade($oldversion=0) {
         execute_sql("ALTER TABLE {$CFG->prefix}stats_user_monthly RENAME COLUMN writes TO statswrites", false);
 
     }
-    
+
+    // Adding some missing log actions
+    if ($oldversion < 2006060400) {
+        // But only if they doesn't exist (because this was introduced after branch and we could be duplicating!)
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report log')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report log', 'course', 'fullname')");
+        }
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report live')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report live', 'course', 'fullname')");
+        }
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report outline')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report outline', 'course', 'fullname')");
+        }
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report participation')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report participation', 'course', 'fullname')");
+        }
+        if (!record_exists('log_display', 'module', 'course', 'action', 'report stats')) {
+            execute_sql("INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'report stats', 'course', 'fullname')");
+        }
+    }
+
     return $result;
 }
 
index 8de856179c2cec0fda918757d9e770ada0d024bd..62ec8abc4544c1d278a8671de471ca2da5f94dae 100644 (file)
@@ -675,6 +675,11 @@ INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course',
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'view', 'course', 'fullname');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'update', 'course', 'fullname');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'enrol', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report log', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report live', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report outline', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report participation', 'course', 'fullname');
+INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('course', 'report stats', 'course', 'fullname');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('message', 'write', 'user', 'firstname||\' \'||lastname');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('message', 'read', 'user', 'firstname||\' \'||lastname');
 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('message', 'add contact', 'user', 'firstname||\' \'||lastname');
index 9341438b4e080fd635cfe05d490acbcde845f77f..8f3415f81135c4c74102d205aa78501f12f4aa06 100644 (file)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-   $version = 2006052400;  // YYYYMMDD = date
+   $version = 2006060400;  // YYYYMMDD = date
                            //       XY = increments within a single day
 
    $release = '1.7 dev';    // Human-friendly version name