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
f78be26a
Commit
f78be26a
authored
Jun 03, 2015
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8341 from mcgachey/mcgachey-lti-consumer-bugfix
[LTI Provider] Bugfix in LtiConsumer handling code
parents
f01b2f43
71ee9d3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
lms/djangoapps/lti_provider/models.py
+0
-1
lms/djangoapps/lti_provider/tests/test_views.py
+11
-0
No files found.
lms/djangoapps/lti_provider/models.py
View file @
f78be26a
...
@@ -62,7 +62,6 @@ class LtiConsumer(models.Model):
...
@@ -62,7 +62,6 @@ class LtiConsumer(models.Model):
if
not
consumer
:
if
not
consumer
:
consumer
=
LtiConsumer
.
objects
.
get
(
consumer
=
LtiConsumer
.
objects
.
get
(
consumer_key
=
consumer_key
,
consumer_key
=
consumer_key
,
instance_guid
=
instance_guid
if
instance_guid
else
None
)
)
# Add the instance_guid field to the model if it's not there already.
# Add the instance_guid field to the model if it's not there already.
...
...
lms/djangoapps/lti_provider/tests/test_views.py
View file @
f78be26a
...
@@ -257,6 +257,17 @@ class LtiRunTest(TestCase):
...
@@ -257,6 +257,17 @@ class LtiRunTest(TestCase):
views
.
lti_run
(
request
)
views
.
lti_run
(
request
)
self
.
assertNotIn
(
views
.
LTI_SESSION_KEY
,
request
.
session
)
self
.
assertNotIn
(
views
.
LTI_SESSION_KEY
,
request
.
session
)
@patch
(
'lti_provider.views.render_courseware'
)
def
test_lti_consumer_record_supplemented_with_guid
(
self
,
_render
):
request
=
build_run_request
()
request
.
session
[
views
.
LTI_SESSION_KEY
][
'tool_consumer_instance_guid'
]
=
'instance_guid'
with
self
.
assertNumQueries
(
4
):
views
.
lti_run
(
request
)
consumer
=
models
.
LtiConsumer
.
objects
.
get
(
consumer_key
=
LTI_DEFAULT_PARAMS
[
'oauth_consumer_key'
]
)
self
.
assertEqual
(
consumer
.
instance_guid
,
'instance_guid'
)
class
RenderCoursewareTest
(
TestCase
):
class
RenderCoursewareTest
(
TestCase
):
"""
"""
...
...
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