Added the cmid field to some add_to_log() calls. To use it when
restoring logs. Now I think that everything is ready !! :-)
This commit is contained in:
@@ -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;
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user