Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added the cmid field to some add_to_log() calls. To use it when

restoring logs. Now I think that everything is ready !! :-)
  • Loading branch information...
commit fabf55e684804e01220cf18f7964363a3345ce33 1 parent f43c695
stronk7 authored
View
4 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;
-?>
+?>
View
8 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");
View
2  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
View
2  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") {
View
4 mod/glossary/edit.php
@@ -114,7 +114,7 @@
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 @@
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.");
Please sign in to comment.
Something went wrong with that request. Please try again.