MDL-40058 mod_wiki: Replaced add_to_log for page diff view with event

This commit is contained in:
Rajesh Taneja
2013-12-11 13:52:59 +11:00
committed by Marina Glancy
parent fb92417b5e
commit 3e5e78a2c9
3 changed files with 114 additions and 1 deletions
+13 -1
View File
@@ -73,7 +73,19 @@ $wikipage = new page_wiki_diff($wiki, $subwiki, $cm);
$wikipage->set_page($page);
$wikipage->set_comparison($compare, $comparewith);
add_to_log($course->id, "wiki", "diff", "diff.php?pageid=".$pageid."&comparewith=".$comparewith."&compare=".$compare, $pageid, $cm->id);
$event = \mod_wiki\event\page_diff_viewed::create(
array(
'context' => context_module::instance($cm->id),
'objectid' => $pageid,
'other' => array(
'comparewith' => $comparewith,
'compare' => $compare
)
));
$event->add_record_snapshot('wiki_pages', $page);
$event->add_record_snapshot('wiki', $wiki);
$event->add_record_snapshot('wiki_subwikis', $subwiki);
$event->trigger();
$wikipage->print_header();