Skip to content
Snippets Groups Projects
Commit ad9f8065 authored by Frode Petterson's avatar Frode Petterson
Browse files

Use correct ID when getting context

(for viewed event)
parent ee493140
No related branches found
No related tags found
No related merge requests found
...@@ -167,7 +167,9 @@ if ($embedtype === 'div') { ...@@ -167,7 +167,9 @@ if ($embedtype === 'div') {
'" style="height:1px" src="about:blank" frameBorder="0" scrolling="no"></iframe></div>'; '" style="height:1px" src="about:blank" frameBorder="0" scrolling="no"></iframe></div>';
} }
$context = \context_module::instance($id); // Find cm context
$context = \context_module::instance($cm->id);
// Trigger module viewed event. // Trigger module viewed event.
$event = \mod_hvp\event\course_module_viewed::create(array( $event = \mod_hvp\event\course_module_viewed::create(array(
'objectid' => $cm->instance, 'objectid' => $cm->instance,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment