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
mahara
mahara
Commits
7d12ad38
Commit
7d12ad38
authored
Mar 08, 2018
by
Matt Clarkson
Committed by
Cecilia Vela Gurovic
Sep 13, 2018
Browse files
Bug 1789297: module/lti: Capture LTI outcome data to session
behatnotneeded Change-Id: I61c1c6b4e3f9990b6f590cc1083b2aea354a40c5
parent
205c411d
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/module/lti/webservice/functions/module_lti_launch.php
View file @
7d12ad38
...
...
@@ -45,7 +45,7 @@ class module_lti_launch extends external_api {
'launch_presentation_locale'
=>
new
external_value
(
PARAM_TEXT
,
'LTI launch_presentation_locale'
,
VALUE_OPTIONAL
),
'launch_presentation_width'
=>
new
external_value
(
PARAM_NUMBER
,
'LTI launch_presentation_width'
,
VALUE_OPTIONAL
),
'lis_course_section_sourcedid'
=>
new
external_value
(
PARAM_TEXT
,
'LTI lis_course_section_sourcedid'
,
VALUE_OPTIONAL
),
'lis_outcome_service_url'
=>
new
external_value
(
PARAM_
TEXT
,
'LTI lis_outcome_service_url'
,
VALUE_OPTIONAL
),
'lis_outcome_service_url'
=>
new
external_value
(
PARAM_
URL
,
'LTI lis_outcome_service_url'
,
VALUE_OPTIONAL
),
'lis_person_name_full'
=>
new
external_value
(
PARAM_TEXT
,
'LTI lis_person_name_full'
,
VALUE_OPTIONAL
),
'lis_person_sourcedid'
=>
new
external_value
(
PARAM_TEXT
,
'LTI lis_person_sourcedid'
,
VALUE_OPTIONAL
),
'lis_result_sourcedid'
=>
new
external_value
(
PARAM_TEXT
,
'LTI lis_result_sourcedid'
,
VALUE_OPTIONAL
),
...
...
@@ -228,6 +228,24 @@ class module_lti_launch extends external_api {
$SESSION
->
set
(
'logouturl'
,
$params
[
'launch_presentation_return_url'
]);
}
// If the consumer supports grading send the user to select a portfolio
if
(
!
empty
(
$params
[
'lis_outcome_service_url'
]))
{
$SESSION
->
set
(
'lti.lis_outcome_service_url'
,
$params
[
'lis_outcome_service_url'
]);
$SESSION
->
set
(
'lti.lis_result_sourcedid'
,
$params
[
'lis_result_sourcedid'
]);
$SESSION
->
set
(
'lti.roles'
,
$params
[
'roles'
]);
$SESSION
->
set
(
'lti.serverid'
,
$WEBSERVICE_OAUTH_SERVERID
);
$SESSION
->
set
(
'lti.presentation_target'
,
$params
[
'launch_presentation_document_target'
]);
$parts
=
parse_url
(
$params
[
'lis_outcome_service_url'
]);
$cspurl
=
$parts
[
'scheme'
]
.
'://'
.
$parts
[
'host'
];
$SESSION
->
set
(
'csp-ancestor-exemption'
,
$cspurl
);
redirect
(
get_config
(
'wwwroot'
)
.
'module/lti/submission.php'
);
exit
;
}
redirect
(
get_config
(
'wwwroot'
));
}
...
...
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