Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
00f1a102
Commit
00f1a102
authored
Oct 01, 2015
by
David Monllaó
Committed by
Andrew Nicols
Oct 01, 2015
Browse files
MDL-46710 mod_lti: Removing duplicated generated events
Event generation and completion should be generated only once.
parent
474b1e00
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/lti/view.php
View file @
00f1a102
...
...
@@ -94,24 +94,6 @@ if ($launchcontainer == LTI_LAUNCH_CONTAINER_EMBED_NO_BLOCKS) {
$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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment