Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
f78be26a
Commit
f78be26a
authored
9 years ago
by
Sarina Canelake
Browse files
Options
Downloads
Plain Diff
Merge pull request #8341 from mcgachey/mcgachey-lti-consumer-bugfix
[LTI Provider] Bugfix in LtiConsumer handling code
parents
f01b2f43
71ee9d3b
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/lti_provider/models.py
+0
-1
0 additions, 1 deletion
lms/djangoapps/lti_provider/models.py
lms/djangoapps/lti_provider/tests/test_views.py
+11
-0
11 additions, 0 deletions
lms/djangoapps/lti_provider/tests/test_views.py
with
11 additions
and
1 deletion
lms/djangoapps/lti_provider/models.py
+
0
−
1
View file @
f78be26a
...
...
@@ -62,7 +62,6 @@ class LtiConsumer(models.Model):
if
not
consumer
:
consumer
=
LtiConsumer
.
objects
.
get
(
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.
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/lti_provider/tests/test_views.py
+
11
−
0
View file @
f78be26a
...
...
@@ -257,6 +257,17 @@ class LtiRunTest(TestCase):
views
.
lti_run
(
request
)
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
):
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment