Skip to content

Commit

Permalink
MDL-46710 mod_lti: Removing duplicated generated events
Browse files Browse the repository at this point in the history
Event generation and completion should be generated only once.
  • Loading branch information
David Monllao authored and andrewnicols committed Oct 1, 2015
1 parent 474b1e0 commit 00f1a10
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions mod/lti/view.php
Expand Up @@ -94,24 +94,6 @@
$PAGE->set_pagelayout('incourse');
}

// Mark viewed by user (if required).
$completion = new completion_info($course);
$completion->set_module_viewed($cm);

$params = array(
'context' => $context,
'objectid' => $lti->id
);

// Prevent double logging when launching in a new window is configured.
if ($launchcontainer != LTI_LAUNCH_CONTAINER_WINDOW) {
$event = \mod_lti\event\course_module_viewed::create($params);
$event->add_record_snapshot('course_modules', $cm);
$event->add_record_snapshot('course', $course);
$event->add_record_snapshot('lti', $lti);
$event->trigger();
}

$pagetitle = strip_tags($course->shortname.': '.format_string($lti->name));
$PAGE->set_title($pagetitle);
$PAGE->set_heading($course->fullname);
Expand Down

0 comments on commit 00f1a10

Please sign in to comment.