MDL-26674 wiki2.0: Fixed wiki activity log

This commit is contained in:
Diane Villemure
2012-03-19 10:20:18 +08:00
committed by Rajesh Taneja
parent a2b30aa852
commit b7921fc458
15 changed files with 46 additions and 25 deletions
+3 -1
View File
@@ -82,6 +82,7 @@ if ($action == 'add' || $action == 'edit') {
}
if ($action == 'delete') {
add_to_log($course->id, 'wiki', 'delete comment', "comments.php?pageid=$pageid", "$page->title", $cm->id);
$comm->set_action($action, $commentid, 0);
} else {
if (empty($newcontent)) {
@@ -93,9 +94,10 @@ if ($action == 'delete') {
}
if ($action == 'edit') {
add_to_log($course->id, 'wiki', 'update comment', "comments.php?pageid=$pageid", "$page->title", $cm->id);
$comm->set_action($action, $id, $content);
} else {
add_to_log($course->id, 'wiki', 'add comment', "comments.php?pageid=$pageid", "$page->title", $cm->id);
$action = 'add';
$comm->set_action($action, 0, $content);
}