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
moodle
moodle
Commits
219f956a
Commit
219f956a
authored
Sep 29, 2015
by
Cameron Ball
Browse files
MDL-49143 LTI: Fix missing resource id
parent
fd57d685
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/lti/locallib.php
View file @
219f956a
...
...
@@ -362,6 +362,12 @@ function lti_build_request($instance, $typeconfig, $course, $typeid = null, $isl
'context_label'
=>
$course
->
shortname
,
'context_title'
=>
$course
->
fullname
,
);
if
(
!
empty
(
$instance
->
id
))
{
$requestparams
[
'resource_link_id'
]
=
$instance
->
id
;
}
if
(
!
empty
(
$instance
->
resource_link_id
))
{
$requestparams
[
'resource_link_id'
]
=
$instance
->
resource_link_id
;
}
if
(
$course
->
format
==
'site'
)
{
$requestparams
[
'context_type'
]
=
'Group'
;
}
else
{
...
...
@@ -370,7 +376,7 @@ function lti_build_request($instance, $typeconfig, $course, $typeid = null, $isl
}
$placementsecret
=
$instance
->
servicesalt
;
if
(
isset
(
$placementsecret
)
&&
(
$islti2
||
if
(
!
empty
(
$instance
->
id
)
&&
isset
(
$placementsecret
)
&&
(
$islti2
||
$typeconfig
[
'acceptgrades'
]
==
LTI_SETTING_ALWAYS
||
(
$typeconfig
[
'acceptgrades'
]
==
LTI_SETTING_DELEGATE
&&
$instance
->
instructorchoiceacceptgrades
==
LTI_SETTING_ALWAYS
)))
{
...
...
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