]> git.mjollnir.org Git - moodle.git/commitdiff
Added the cmid field to some add_to_log() calls. To use it when
authorstronk7 <stronk7>
Wed, 18 Feb 2004 20:52:44 +0000 (20:52 +0000)
committerstronk7 <stronk7>
Wed, 18 Feb 2004 20:52:44 +0000 (20:52 +0000)
restoring logs. Now I think that everything is ready !! :-)

mod/glossary/approve.php
mod/glossary/comment.php
mod/glossary/comments.php
mod/glossary/deleteentry.php
mod/glossary/edit.php

index 1d9166f37840aa5d72ceb87301fb390d56e0232d..fc050b1b5ca83d2ec6663809f13c19f60c6994f2 100644 (file)
@@ -31,8 +31,8 @@
     if (! update_record("glossary_entries", $newentry)) {
         error("Could not update your glossary");
     } else {
-        add_to_log($course->id, "glossary", "approve entry", "showentry.php?id=$cm->id&eid=$eid", "$eid");
+        add_to_log($course->id, "glossary", "approve entry", "showentry.php?id=$cm->id&eid=$eid", "$eid",$cm->id);
     }
     redirect("view.php?id=$cm->id&mode=$mode&hook=$hook",get_string("entryapproved","glossary"),1);
     die;
-?>
\ No newline at end of file
+?>
index 7f57a2df00da21694a6ca938e840b238dabf6ca3..3e645e9d2d9b4872681c7362fc1d276fd9438124 100644 (file)
@@ -44,7 +44,7 @@
     if (isguest()) {
         error("Guests are not allowed to post comments", $_SERVER["HTTP_REFERER"]);
     }    
-    add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id", "$glossary->id");
+    add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id", "$glossary->id",$cm->id);
 
     /// Printing the page header
     if ($course->category) {
@@ -84,7 +84,7 @@
             print_simple_box_end();
 
             print_footer($course);
-            add_to_log($course->id, "glossary", "delete comment", "comments.php?id=$cm->id&eid=$entry->id", $comment);
+            add_to_log($course->id, "glossary", "delete comment", "comments.php?id=$cm->id&eid=$entry->id", $comment,$cm->id);
             redirect("comments.php?id=$cm->id&eid=$entry->id");
 
         } else {
                 if (! $newentry->id = insert_record("glossary_comments", $newentry)) {
                     error("Could not insert this new comment");
                 } else {
-                    add_to_log($course->id, "glossary", "add comment", "comments.php?id=$cm->id&eid=$entry->id", "$newentry->id");
+                    add_to_log($course->id, "glossary", "add comment", "comments.php?id=$cm->id&eid=$entry->id", "$newentry->id", $cm->id);
                 }
             } else {
                 $newentry->id = $form->cid;
                 if (! update_record("glossary_comments", $newentry)) {
                     error("Could not update this comment");
                 } else {
-                    add_to_log($course->id, "glossary", "update comment", "comments.php?id=$cm->id&eid=$entry->id", "$newentry->id");
+                    add_to_log($course->id, "glossary", "update comment", "comments.php?id=$cm->id&eid=$entry->id", "$newentry->id",$cm->id);
                 }
             }
             print_simple_box_start("center","40%", "#FFBBBB");
index 027c4817fbdd9dfa05296db9446346e934fd82b8..43c756414c5705a2b7fca8b9c4cbe5cc4c91f25b 100644 (file)
@@ -31,7 +31,7 @@
         notice(get_string("activityiscurrentlyhidden"));
     } 
     
-    add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id", "$glossary->id");
+    add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id", "$glossary->id",$cm->id);
     
     
 /// Printing the page header
index 32520812e09c686e5c7e6d94a49011310b3825f0..ca6f4001d8d44297f7d0b2bd557d98e1cfffdcbb 100644 (file)
@@ -78,7 +78,7 @@
                     print_simple_box_end();
                 }
                 print_footer($course);
-                add_to_log($course->id, "glossary", "delete entry", "view.php?id=$cm->id&mode=$prevmode&hook=$hook", $entry);
+                add_to_log($course->id, "glossary", "delete entry", "view.php?id=$cm->id&mode=$prevmode&hook=$hook", $entry,$cm->id);
                 redirect("view.php?id=$cm->id&mode=$prevmode&hook=$hook");
             } else {        // the operation has not been confirmed yet so ask the user to do so
                 if ( $mode == "delete") {                              
index 21945d859726593d71a17f40978e9a3d58e370a5..e560494174600b61db2577ca8eb0c12dbecc2be1 100644 (file)
@@ -114,7 +114,7 @@ if ( $confirm ) {
             if (! update_record("glossary_entries", $newentry)) {
                 error("Could not update your glossary");
             } else {
-                add_to_log($course->id, "glossary", "update entry", "view.php?id=$cm->id&mode=entry&hook=$newentry->id", $newentry->id);
+                add_to_log($course->id, "glossary", "update entry", "view.php?id=$cm->id&mode=entry&hook=$newentry->id", $newentry->id,$cm->id);
                }
         } else {
             error("Could not update this glossary entry because this concept already exist.");
@@ -143,7 +143,7 @@ if ( $confirm ) {
                      unset($newentry->attachment);
                 }
                 set_field("glossary_entries", "attachment", $newfilename, "id", $newentry->id);
-                add_to_log($course->id, "glossary", "add entry", "view.php?id=$cm->id&mode=entry&hook=$newentry->id", $newentry->id);
+                add_to_log($course->id, "glossary", "add entry", "view.php?id=$cm->id&mode=entry&hook=$newentry->id", $newentry->id,$cm->id);
             }
         } else {
             error("Could not insert this glossary entry because this concept already exist.");