Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
72bdb24c
Unverified
Commit
72bdb24c
authored
6 years ago
by
Cali
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #19247 from edx/cstenson/lti_problem_content_gating_tests
Add LTI problem type tests on content gating.
parents
efa58328
1ec08701
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/features/content_type_gating/tests/test_access.py
+22
-0
22 additions, 0 deletions
openedx/features/content_type_gating/tests/test_access.py
with
22 additions
and
0 deletions
openedx/features/content_type_gating/tests/test_access.py
+
22
−
0
View file @
72bdb24c
...
...
@@ -70,6 +70,19 @@ class TestProblemTypeAccess(SharedModuleStoreTestCase):
category
=
'
vertical
'
,
display_name
=
'
Lesson 1 Vertical - Unit 1
'
)
self
.
lti_block
=
ItemFactory
.
create
(
parent
=
self
.
vertical
,
category
=
'
lti_consumer
'
,
display_name
=
'
lti_consumer
'
,
has_score
=
True
,
graded
=
True
,
)
self
.
lti_block_not_scored
=
ItemFactory
.
create
(
parent
=
self
.
vertical
,
category
=
'
lti_consumer
'
,
display_name
=
'
lti_consumer_2
'
,
has_score
=
False
,
)
self
.
problem_dict
=
{}
for
prob_type
in
self
.
PROBLEM_TYPES
:
block
=
ItemFactory
.
create
(
...
...
@@ -131,6 +144,15 @@ class TestProblemTypeAccess(SharedModuleStoreTestCase):
# check that has_access did not raise the IncorrectPartitionGroupError thereby not gating the block
self
.
assertFalse
(
mock_access_error
.
called
)
def
test_lti_audit_access
(
self
):
"""
LTI stands for learning tools interoperability and is a 3rd party iframe that pulls in learning content from
outside sources. This tests that audit users cannot see LTI components with graded content but can see the LTI
components which do not have graded content.
"""
self
.
assert_block_is_gated
(
self
.
lti_block
,
True
)
self
.
assert_block_is_gated
(
self
.
lti_block_not_scored
,
False
)
@ddt.data
(
*
PROBLEM_TYPES
)
...
...
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