Merge branch 'MDL-41520-master-mod_lti-completion-view' of github.com:Trii/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 8 Oct 2013 06:43:14 +0000 (14:43 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 8 Oct 2013 06:43:14 +0000 (14:43 +0800)
mod/lti/view.php

index c07408a..289f0c0 100644 (file)
@@ -92,6 +92,10 @@ if ($launchcontainer == LTI_LAUNCH_CONTAINER_EMBED_NO_BLOCKS) {
 
 require_login($course);
 
+// Mark viewed by user (if required).
+$completion = new completion_info($course);
+$completion->set_module_viewed($cm);
+
 add_to_log($course->id, "lti", "view", "view.php?id=$cm->id", "$lti->id");
 
 $pagetitle = strip_tags($course->shortname.': '.format_string($lti->name));