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
07490063
Commit
07490063
authored
Apr 19, 2017
by
noraiz-anwar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ORAs and Drag and Drop not supported in libraries, remove both from problem types in studio
parent
23ca6e80
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
cms/djangoapps/contentstore/views/component.py
+3
-2
cms/djangoapps/contentstore/views/tests/test_library.py
+19
-0
No files found.
cms/djangoapps/contentstore/views/component.py
View file @
07490063
...
...
@@ -308,8 +308,9 @@ def get_component_templates(courselike, library=False):
)
)
# Add any advanced problem types. Note that these are different xblocks being stored as Advanced Problems.
if
category
==
'problem'
:
# Add any advanced problem types. Note that these are different xblocks being stored as Advanced Problems,
# currently not supported in libraries .
if
category
==
'problem'
and
not
library
:
disabled_block_names
=
[
block
.
name
for
block
in
disabled_xblocks
()]
advanced_problem_types
=
[
advanced_problem_type
for
advanced_problem_type
in
ADVANCED_PROBLEM_TYPES
if
advanced_problem_type
[
'component'
]
not
in
disabled_block_names
]
...
...
cms/djangoapps/contentstore/views/tests/test_library.py
View file @
07490063
...
...
@@ -3,6 +3,7 @@ Unit tests for contentstore.views.library
More important high-level tests are in contentstore/tests/test_libraries.py
"""
from
django.conf
import
settings
from
contentstore.tests.utils
import
AjaxEnabledTestClient
,
parse_json
from
contentstore.utils
import
reverse_course_url
,
reverse_library_url
from
contentstore.tests.utils
import
CourseTestCase
...
...
@@ -251,6 +252,24 @@ class UnitTestLibraries(CourseTestCase):
self
.
assertNotIn
(
'discussion'
,
templates
)
self
.
assertNotIn
(
'advanced'
,
templates
)
def
test_advanced_problem_types
(
self
):
"""
Verify that advanced problem types are not provided in problem component for libraries.
"""
lib
=
LibraryFactory
.
create
()
lib
.
save
()
problem_type_templates
=
next
(
(
component
[
'templates'
]
for
component
in
get_component_templates
(
lib
,
library
=
True
)
if
component
[
'type'
]
==
'problem'
),
[]
)
# Each problem template has a category which shows whether problem is a 'problem'
# or which of the advanced problem type (e.g drag-and-drop-v2).
problem_type_categories
=
[
problem_template
[
'category'
]
for
problem_template
in
problem_type_templates
]
for
advance_problem_type
in
settings
.
ADVANCED_PROBLEM_TYPES
:
self
.
assertNotIn
(
advance_problem_type
[
'component'
],
problem_type_categories
)
def
test_manage_library_users
(
self
):
"""
Simple test that the Library "User Access" view works.
...
...
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