Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
da626626
Commit
da626626
authored
Sep 15, 2015
by
David Ormsbee
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9704 from lduarte1991/lti-iframe-userinfo
Allows username and user email to be sent to an LTI.
parents
58ea785e
1455882b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
common/lib/xmodule/xmodule/lti_module.py
+6
-9
No files found.
common/lib/xmodule/xmodule/lti_module.py
View file @
da626626
...
...
@@ -206,9 +206,8 @@ class LTIFields(object):
ask_to_send_username
=
Boolean
(
display_name
=
_
(
"Request user's username"
),
# Translators: This is used to request the user's username for a third party service.
# Usernames can only be requested if "Open in New Page" is set to True.
help
=
_
(
"Select True to request the user's username.
You must also set Open in New Page to True to get the user's information.
"
"Select True to request the user's username."
),
default
=
False
,
scope
=
Scope
.
settings
...
...
@@ -216,9 +215,8 @@ class LTIFields(object):
ask_to_send_email
=
Boolean
(
display_name
=
_
(
"Request user's email"
),
# Translators: This is used to request the user's email for a third party service.
# Emails can only be requested if "Open in New Page" is set to True.
help
=
_
(
"Select True to request the user's email address.
You must also set Open in New Page to True to get the user's information.
"
"Select True to request the user's email address."
),
default
=
False
,
scope
=
Scope
.
settings
...
...
@@ -603,11 +601,10 @@ class LTIModule(LTIFields, LTI20ModuleMixin, XModule):
except
AttributeError
:
self
.
user_username
=
""
if
self
.
open_in_a_new_page
:
if
self
.
ask_to_send_username
and
self
.
user_username
:
body
[
"lis_person_sourcedid"
]
=
self
.
user_username
if
self
.
ask_to_send_email
and
self
.
user_email
:
body
[
"lis_person_contact_email_primary"
]
=
self
.
user_email
if
self
.
ask_to_send_username
and
self
.
user_username
:
body
[
"lis_person_sourcedid"
]
=
self
.
user_username
if
self
.
ask_to_send_email
and
self
.
user_email
:
body
[
"lis_person_contact_email_primary"
]
=
self
.
user_email
# Appending custom parameter for signing.
body
.
update
(
custom_parameters
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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