]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed up some logging
authormoodler <moodler>
Tue, 17 Feb 2004 14:39:15 +0000 (14:39 +0000)
committermoodler <moodler>
Tue, 17 Feb 2004 14:39:15 +0000 (14:39 +0000)
mod/choice/db/mysql.php
mod/choice/db/mysql.sql
mod/choice/db/postgres7.php
mod/choice/db/postgres7.sql
mod/choice/version.php
mod/choice/view.php

index abf13bf7e5d1646c750f5720edfbb1f410574c01..f3313ed5fa2f1055be2d8db4b967ae18a1739649 100644 (file)
@@ -25,6 +25,10 @@ function choice_upgrade($oldversion) {
     if ($oldversion < 2004010100) {
         table_column("choice", "", "showunanswered", "integer", "4", "unsigned", "0", "", "publish");
     }
+    if ($oldversion < 2004021700) {
+        modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');");
+        modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');");
+    }
 
     return true;
 }
index c513fcbf15843c8a5ed71290903ae323e01a4d4a..c43cd39974e38dd59bd025cb27f218d0b9a7818b 100755 (executable)
@@ -58,7 +58,7 @@ INSERT INTO prefix_log_display VALUES ('choice', 'view', 'choice', 'name');
 INSERT INTO prefix_log_display VALUES ('choice', 'update', 'choice', 'name');\r
 INSERT INTO prefix_log_display VALUES ('choice', 'add', 'choice', 'name');\r
 INSERT INTO prefix_log_display VALUES ('choice', 'report', 'choice', 'name');\r
-\r
-    \r
+INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');\r
+INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');\r
 \r
 \r
index 66f37a7e9fc0c2ed86341ab32b333abc96b61abf..04fc87a8d330aca8b7216416e4d092c712f25fb0 100644 (file)
@@ -11,6 +11,10 @@ function choice_upgrade($oldversion) {
     if ($oldversion < 2004010100) {
         table_column("choice", "", "showunanswered", "integer", "4", "unsigned", "0", "", "publish");
     }
+    if ($oldversion < 2004021700) {
+        modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');");
+        modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');");
+    }
 
     return true;
 }
index 3fcc386d96633b1db877476043afc8706eb3e0c8..ec08c37e385e309d111f142eb93ffe7e05266db5 100755 (executable)
@@ -54,7 +54,6 @@ INSERT INTO prefix_log_display VALUES ('choice', 'view', 'choice', 'name');
 INSERT INTO prefix_log_display VALUES ('choice', 'update', 'choice', 'name');
 INSERT INTO prefix_log_display VALUES ('choice', 'add', 'choice', 'name');
 INSERT INTO prefix_log_display VALUES ('choice', 'report', 'choice', 'name');
-
-    
-
+INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');
+INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');
 
index cf8e3400d0cf57aa9c3e342cc185b5cd3305fb02..08aa622b2485e048cc89daab4d0491b2865c0262 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2004013101;
+$module->version  = 2004021700;
 $module->requires = 2004013101;  // Requires this Moodle version
 $module->cron     = 0;
 
index 7eb2a8ffd45e73cf05c6d28bd27eb777b20b0a79..d854cb9aa4fa3fbf232e2e8db0eaa18c7d4e3471 100644 (file)
@@ -40,7 +40,7 @@
                 if (! update_record("choice_answers", $newanswer)) {
                     error("Could not update your choice");
                 }
-                add_to_log($course->id, "choice", "update", "view.php?id=$cm->id", $choice->id, $cm->id);
+                add_to_log($course->id, "choice", "choose again", "view.php?id=$cm->id", $choice->id, $cm->id);
             } else {
                 $newanswer->choice = $choice->id;
                 $newanswer->userid = $USER->id;
@@ -49,7 +49,7 @@
                 if (! insert_record("choice_answers", $newanswer)) {
                     error("Could not save your choice");
                 }
-                add_to_log($course->id, "choice", "add", "view.php?id=$cm->id", $choice->id, $cm->id);
+                add_to_log($course->id, "choice", "choose", "view.php?id=$cm->id", $choice->id, $cm->id);
             }
         }
         redirect("$CFG->wwwroot/course/view.php?id=$course->id");