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
c4bb2ac7
Commit
c4bb2ac7
authored
Oct 10, 2013
by
polesye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove adding prefix to custom parameters.
parent
79f11de6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
common/lib/xmodule/xmodule/lti_module.py
+4
-5
No files found.
common/lib/xmodule/xmodule/lti_module.py
View file @
c4bb2ac7
...
...
@@ -152,7 +152,7 @@ class LTIModule(LTIFields, XModule):
except
ValueError
:
raise
LTIError
(
'Could not parse LTI passport: {0!r}.
\
Should be "id:key:secret" string.'
.
format
(
lti_passport
))
if
lti_id
==
self
.
lti_id
:
if
lti_id
==
self
.
lti_id
.
strip
()
:
client_key
,
client_secret
=
key
,
secret
break
...
...
@@ -165,8 +165,7 @@ class LTIModule(LTIFields, XModule):
raise
LTIError
(
'Could not parse custom parameter: {0!r}.
\
Should be "x=y" string.'
.
format
(
custom_parameter
))
# LTI specs: 'custom_' should be prepended before each custom parameter
custom_parameters
[
u'custom_'
+
unicode
(
param_name
)]
=
unicode
(
param_value
)
custom_parameters
[
unicode
(
param_name
.
strip
())]
=
unicode
(
param_value
.
strip
())
input_fields
=
self
.
oauth_params
(
custom_parameters
,
...
...
@@ -177,7 +176,7 @@ class LTIModule(LTIFields, XModule):
'input_fields'
:
input_fields
,
# these params do not participate in oauth signing
'launch_url'
:
self
.
launch_url
,
'launch_url'
:
self
.
launch_url
.
strip
()
,
'element_id'
:
self
.
location
.
html_id
(),
'element_class'
:
self
.
category
,
'open_in_a_new_page'
:
self
.
open_in_a_new_page
,
...
...
@@ -227,7 +226,7 @@ class LTIModule(LTIFields, XModule):
try
:
__
,
headers
,
__
=
client
.
sign
(
unicode
(
self
.
launch_url
),
unicode
(
self
.
launch_url
.
strip
()
),
http_method
=
u'POST'
,
body
=
body
,
headers
=
headers
)
...
...
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