From: stronk7 Date: Wed, 18 Feb 2004 20:52:44 +0000 (+0000) Subject: Added the cmid field to some add_to_log() calls. To use it when X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fabf55e684804e01220cf18f7964363a3345ce33;p=moodle.git Added the cmid field to some add_to_log() calls. To use it when restoring logs. Now I think that everything is ready !! :-) --- diff --git a/mod/glossary/approve.php b/mod/glossary/approve.php index 1d9166f378..fc050b1b5c 100644 --- a/mod/glossary/approve.php +++ b/mod/glossary/approve.php @@ -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 +?> diff --git a/mod/glossary/comment.php b/mod/glossary/comment.php index 7f57a2df00..3e645e9d2d 100644 --- a/mod/glossary/comment.php +++ b/mod/glossary/comment.php @@ -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 { @@ -138,7 +138,7 @@ 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; @@ -147,7 +147,7 @@ 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"); diff --git a/mod/glossary/comments.php b/mod/glossary/comments.php index 027c4817fb..43c756414c 100644 --- a/mod/glossary/comments.php +++ b/mod/glossary/comments.php @@ -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 diff --git a/mod/glossary/deleteentry.php b/mod/glossary/deleteentry.php index 32520812e0..ca6f4001d8 100644 --- a/mod/glossary/deleteentry.php +++ b/mod/glossary/deleteentry.php @@ -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") { diff --git a/mod/glossary/edit.php b/mod/glossary/edit.php index 21945d8597..e560494174 100644 --- a/mod/glossary/edit.php +++ b/mod/glossary/edit.php @@ -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.");