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
27cb3080
Commit
27cb3080
authored
Dec 08, 2015
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove final CMS references to 'peergrading' and 'combinedopenended'
parent
addbfa75
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
33 deletions
+35
-33
cms/djangoapps/contentstore/tests/test_course_settings.py
+2
-2
cms/djangoapps/contentstore/views/component.py
+5
-6
cms/djangoapps/contentstore/views/tests/test_course_index.py
+27
-23
cms/envs/common.py
+1
-2
No files found.
cms/djangoapps/contentstore/tests/test_course_settings.py
View file @
27cb3080
...
@@ -771,7 +771,7 @@ class CourseMetadataEditingTest(CourseTestCase):
...
@@ -771,7 +771,7 @@ class CourseMetadataEditingTest(CourseTestCase):
{
{
"advertised_start"
:
{
"value"
:
"start A"
},
"advertised_start"
:
{
"value"
:
"start A"
},
"days_early_for_beta"
:
{
"value"
:
2
},
"days_early_for_beta"
:
{
"value"
:
2
},
"advanced_modules"
:
{
"value"
:
[
'
combinedopenended
'
]},
"advanced_modules"
:
{
"value"
:
[
'
notes
'
]},
},
},
user
=
self
.
user
user
=
self
.
user
)
)
...
@@ -781,7 +781,7 @@ class CourseMetadataEditingTest(CourseTestCase):
...
@@ -781,7 +781,7 @@ class CourseMetadataEditingTest(CourseTestCase):
# Tab gets tested in test_advanced_settings_munge_tabs
# Tab gets tested in test_advanced_settings_munge_tabs
self
.
assertIn
(
'advanced_modules'
,
test_model
,
'Missing advanced_modules'
)
self
.
assertIn
(
'advanced_modules'
,
test_model
,
'Missing advanced_modules'
)
self
.
assertEqual
(
test_model
[
'advanced_modules'
][
'value'
],
[
'
combinedopenended
'
],
'advanced_module is not updated'
)
self
.
assertEqual
(
test_model
[
'advanced_modules'
][
'value'
],
[
'
notes
'
],
'advanced_module is not updated'
)
def
test_validate_from_json_wrong_inputs
(
self
):
def
test_validate_from_json_wrong_inputs
(
self
):
# input incorrectly formatted data
# input incorrectly formatted data
...
...
cms/djangoapps/contentstore/views/component.py
View file @
27cb3080
...
@@ -30,11 +30,11 @@ from student.auth import has_course_author_access
...
@@ -30,11 +30,11 @@ from student.auth import has_course_author_access
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ugettext
as
_
from
models.settings.course_grading
import
CourseGradingModel
from
models.settings.course_grading
import
CourseGradingModel
__all__
=
[
'OPEN_ENDED_COMPONENT_TYPES'
,
__all__
=
[
'ADVANCED_COMPONENT_POLICY_KEY'
,
'ADVANCED_COMPONENT_POLICY_KEY'
,
'container_handler'
,
'container_handler'
,
'component_handler'
'component_handler'
]
]
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -43,7 +43,6 @@ COMPONENT_TYPES = ['discussion', 'html', 'problem', 'video']
...
@@ -43,7 +43,6 @@ COMPONENT_TYPES = ['discussion', 'html', 'problem', 'video']
# Constants for determining if these components should be enabled for this course
# Constants for determining if these components should be enabled for this course
SPLIT_TEST_COMPONENT_TYPE
=
'split_test'
SPLIT_TEST_COMPONENT_TYPE
=
'split_test'
OPEN_ENDED_COMPONENT_TYPES
=
[
"combinedopenended"
,
"peergrading"
]
NOTE_COMPONENT_TYPES
=
[
'notes'
]
NOTE_COMPONENT_TYPES
=
[
'notes'
]
if
settings
.
FEATURES
.
get
(
'ALLOW_ALL_ADVANCED_COMPONENTS'
):
if
settings
.
FEATURES
.
get
(
'ALLOW_ALL_ADVANCED_COMPONENTS'
):
...
...
cms/djangoapps/contentstore/views/tests/test_course_index.py
View file @
27cb3080
...
@@ -10,6 +10,7 @@ import pytz
...
@@ -10,6 +10,7 @@ import pytz
from
django.conf
import
settings
from
django.conf
import
settings
from
django.core.exceptions
import
PermissionDenied
from
django.core.exceptions
import
PermissionDenied
from
django.test.utils
import
override_settings
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ugettext
as
_
from
contentstore.courseware_index
import
CoursewareSearchIndexer
,
SearchIndexingError
from
contentstore.courseware_index
import
CoursewareSearchIndexer
,
SearchIndexingError
...
@@ -440,6 +441,7 @@ class TestCourseOutline(CourseTestCase):
...
@@ -440,6 +441,7 @@ class TestCourseOutline(CourseTestCase):
info
[
'block_types_enabled'
],
info
[
'block_types_enabled'
],
any
(
component
in
advanced_modules
for
component
in
deprecated_block_types
)
any
(
component
in
advanced_modules
for
component
in
deprecated_block_types
)
)
)
self
.
assertItemsEqual
(
info
[
'blocks'
],
expected_blocks
)
self
.
assertItemsEqual
(
info
[
'blocks'
],
expected_blocks
)
self
.
assertEqual
(
self
.
assertEqual
(
info
[
'advance_settings_url'
],
info
[
'advance_settings_url'
],
...
@@ -455,27 +457,29 @@ class TestCourseOutline(CourseTestCase):
...
@@ -455,27 +457,29 @@ class TestCourseOutline(CourseTestCase):
"""
"""
Verify deprecated warning info for single deprecated feature.
Verify deprecated warning info for single deprecated feature.
"""
"""
block_types
=
settings
.
DEPRECATED_BLOCK_TYPES
block_types
=
[
'notes'
]
course_module
=
modulestore
()
.
get_item
(
self
.
course
.
location
)
with
override_settings
(
DEPRECATED_BLOCK_TYPES
=
block_types
):
self
.
_create_test_data
(
course_module
,
create_blocks
=
True
,
block_types
=
block_types
,
publish
=
publish
)
course_module
=
modulestore
()
.
get_item
(
self
.
course
.
location
)
info
=
_deprecated_blocks_info
(
course_module
,
block_types
)
self
.
_create_test_data
(
course_module
,
create_blocks
=
True
,
block_types
=
block_types
,
publish
=
publish
)
self
.
_verify_deprecated_info
(
info
=
_deprecated_blocks_info
(
course_module
,
block_types
)
course_module
.
id
,
self
.
_verify_deprecated_info
(
course_module
.
advanced_modules
,
course_module
.
id
,
info
,
course_module
.
advanced_modules
,
block_types
info
,
)
block_types
)
def
test_verify_deprecated_warning_message_with_multiple_features
(
self
):
def
test_verify_deprecated_warning_message_with_multiple_features
(
self
):
"""
"""
Verify deprecated warning info for multiple deprecated features.
Verify deprecated warning info for multiple deprecated features.
"""
"""
block_types
=
[
'peergrading'
,
'combinedopenended'
,
'openassessment'
]
block_types
=
[
'notes'
,
'lti'
]
course_module
=
modulestore
()
.
get_item
(
self
.
course
.
location
)
with
override_settings
(
DEPRECATED_BLOCK_TYPES
=
block_types
):
self
.
_create_test_data
(
course_module
,
create_blocks
=
True
,
block_types
=
block_types
)
course_module
=
modulestore
()
.
get_item
(
self
.
course
.
location
)
self
.
_create_test_data
(
course_module
,
create_blocks
=
True
,
block_types
=
block_types
)
info
=
_deprecated_blocks_info
(
course_module
,
block_types
)
info
=
_deprecated_blocks_info
(
course_module
,
block_types
)
self
.
_verify_deprecated_info
(
course_module
.
id
,
course_module
.
advanced_modules
,
info
,
block_types
)
self
.
_verify_deprecated_info
(
course_module
.
id
,
course_module
.
advanced_modules
,
info
,
block_types
)
@ddt.data
(
@ddt.data
(
{
'delete_vertical'
:
True
},
{
'delete_vertical'
:
True
},
...
@@ -492,7 +496,7 @@ class TestCourseOutline(CourseTestCase):
...
@@ -492,7 +496,7 @@ class TestCourseOutline(CourseTestCase):
un-published block(s). This behavior should be same if we delete
un-published block(s). This behavior should be same if we delete
unpublished vertical or problem.
unpublished vertical or problem.
"""
"""
block_types
=
[
'
peergrading
'
]
block_types
=
[
'
notes
'
]
course_module
=
modulestore
()
.
get_item
(
self
.
course
.
location
)
course_module
=
modulestore
()
.
get_item
(
self
.
course
.
location
)
vertical1
=
ItemFactory
.
create
(
vertical1
=
ItemFactory
.
create
(
...
@@ -500,8 +504,8 @@ class TestCourseOutline(CourseTestCase):
...
@@ -500,8 +504,8 @@ class TestCourseOutline(CourseTestCase):
)
)
problem1
=
ItemFactory
.
create
(
problem1
=
ItemFactory
.
create
(
parent_location
=
vertical1
.
location
,
parent_location
=
vertical1
.
location
,
category
=
'
peergrading
'
,
category
=
'
notes
'
,
display_name
=
'
peergrading
problem in vert1'
,
display_name
=
'
notes
problem in vert1'
,
publish_item
=
False
publish_item
=
False
)
)
...
@@ -515,8 +519,8 @@ class TestCourseOutline(CourseTestCase):
...
@@ -515,8 +519,8 @@ class TestCourseOutline(CourseTestCase):
)
)
ItemFactory
.
create
(
ItemFactory
.
create
(
parent_location
=
vertical2
.
location
,
parent_location
=
vertical2
.
location
,
category
=
'
peergrading
'
,
category
=
'
notes
'
,
display_name
=
'
peergrading
problem in vert2'
,
display_name
=
'
notes
problem in vert2'
,
pubish_item
=
True
pubish_item
=
True
)
)
# At this point CourseStructure will contain both the above
# At this point CourseStructure will contain both the above
...
@@ -526,8 +530,8 @@ class TestCourseOutline(CourseTestCase):
...
@@ -526,8 +530,8 @@ class TestCourseOutline(CourseTestCase):
self
.
assertItemsEqual
(
self
.
assertItemsEqual
(
info
[
'blocks'
],
info
[
'blocks'
],
[
[
[
reverse_usage_url
(
'container_handler'
,
vertical1
.
location
),
'
peergrading
problem in vert1'
],
[
reverse_usage_url
(
'container_handler'
,
vertical1
.
location
),
'
notes
problem in vert1'
],
[
reverse_usage_url
(
'container_handler'
,
vertical2
.
location
),
'
peergrading
problem in vert2'
]
[
reverse_usage_url
(
'container_handler'
,
vertical2
.
location
),
'
notes
problem in vert2'
]
]
]
)
)
...
@@ -542,7 +546,7 @@ class TestCourseOutline(CourseTestCase):
...
@@ -542,7 +546,7 @@ class TestCourseOutline(CourseTestCase):
# There shouldn't be any info present about un-published vertical1
# There shouldn't be any info present about un-published vertical1
self
.
assertEqual
(
self
.
assertEqual
(
info
[
'blocks'
],
info
[
'blocks'
],
[[
reverse_usage_url
(
'container_handler'
,
vertical2
.
location
),
'
peergrading
problem in vert2'
]]
[[
reverse_usage_url
(
'container_handler'
,
vertical2
.
location
),
'
notes
problem in vert2'
]]
)
)
...
...
cms/envs/common.py
View file @
27cb3080
...
@@ -1016,7 +1016,6 @@ ADVANCED_COMPONENT_TYPES = [
...
@@ -1016,7 +1016,6 @@ ADVANCED_COMPONENT_TYPES = [
'rate'
,
# Allows up-down voting of course content. See https://github.com/pmitros/RateXBlock
'rate'
,
# Allows up-down voting of course content. See https://github.com/pmitros/RateXBlock
'split_test'
,
'split_test'
,
'peergrading'
,
'notes'
,
'notes'
,
'schoolyourself_review'
,
'schoolyourself_review'
,
'schoolyourself_lesson'
,
'schoolyourself_lesson'
,
...
@@ -1114,7 +1113,7 @@ CREDIT_PROVIDER_TIMESTAMP_EXPIRATION = 15 * 60
...
@@ -1114,7 +1113,7 @@ CREDIT_PROVIDER_TIMESTAMP_EXPIRATION = 15 * 60
################################ Deprecated Blocks Info ################################
################################ Deprecated Blocks Info ################################
DEPRECATED_BLOCK_TYPES
=
[
'peergrading'
,
'combinedopenended'
]
DEPRECATED_BLOCK_TYPES
=
[]
#### PROCTORING CONFIGURATION DEFAULTS
#### PROCTORING CONFIGURATION DEFAULTS
...
...
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