mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-40059 glossary: event for entry viewed
This commit is contained in:
parent
1ce054a38b
commit
7c92f9be80
4 changed files with 112 additions and 2 deletions
|
@ -77,7 +77,12 @@ if ($entries) {
|
|||
}
|
||||
|
||||
$entries[$key]->footer = "<p style=\"text-align:right\">» <a href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">".format_string($entry->glossaryname,true)."</a></p>";
|
||||
add_to_log($entry->courseid, 'glossary', 'view entry', "showentry.php?eid=$entry->id", $entry->id, $entry->cmid);
|
||||
$event = \mod_glossary\event\entry_viewed::create(array(
|
||||
'objectid' => $entry->id,
|
||||
'context' => $modinfo->cms[$entry->cmid]->context
|
||||
));
|
||||
$event->add_record_snapshot('glossary_entries', $entry);
|
||||
$event->trigger();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue