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
a153092c
Commit
a153092c
authored
Jun 27, 2014
by
Tim Babych
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add FEATURE['ENABLE_GROUP_CONFIGURATIONS'] and os.environ['FEATURE_GROUP_CONFIGURATIONS'].
parent
d38b51cb
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
13 deletions
+22
-13
cms/djangoapps/contentstore/views/tests/test_item.py
+3
-0
cms/envs/common.py
+4
-0
cms/templates/settings.html
+1
-2
cms/templates/settings_advanced.html
+2
-3
cms/templates/settings_graders.html
+2
-3
cms/templates/widgets/header.html
+2
-3
cms/urls.py
+4
-1
common/test/acceptance/tests/test_studio_split_test.py
+4
-1
No files found.
cms/djangoapps/contentstore/views/tests/test_item.py
View file @
a153092c
...
...
@@ -6,8 +6,10 @@ import ddt
from
mock
import
patch
from
pytz
import
UTC
from
unittest
import
skipUnless
from
webob
import
Response
from
django.conf
import
settings
from
django.http
import
Http404
from
django.test
import
TestCase
from
django.test.client
import
RequestFactory
...
...
@@ -773,6 +775,7 @@ class TestEditItem(ItemTest):
self
.
verify_publish_state
(
html_usage_key
,
PublishState
.
draft
)
@skipUnless
(
settings
.
FEATURES
.
get
(
'ENABLE_GROUP_CONFIGURATIONS'
),
'Tests Group Configurations feature'
)
class
TestEditSplitModule
(
ItemTest
):
"""
Tests around editing instances of the split_test module.
...
...
cms/envs/common.py
View file @
a153092c
...
...
@@ -25,6 +25,7 @@ Longer TODO:
# pylint: disable=W0401, W0611, W0614
import
imp
import
os
import
sys
import
lms.envs.common
# Although this module itself may not use these imported variables, other dependent modules may.
...
...
@@ -101,6 +102,9 @@ FEATURES = {
# Turn off Advanced Security by default
'ADVANCED_SECURITY'
:
False
,
# Toggles Group Configuration editing functionality
'ENABLE_GROUP_CONFIGURATIONS'
:
os
.
environ
.
get
(
'FEATURE_GROUP_CONFIGURATIONS'
),
}
ENABLE_JASMINE
=
False
...
...
cms/templates/settings.html
View file @
a153092c
...
...
@@ -309,7 +309,6 @@ require(["domReady!", "jquery", "js/models/settings/course_details", "js/views/s
course_team_url =
utils.reverse_course_url('course_team_handler',
context_course
.
id
)
grading_config_url =
utils.reverse_course_url('grading_handler',
context_course
.
id
)
advanced_config_url =
utils.reverse_course_url('advanced_settings_handler',
context_course
.
id
)
group_configurations_config_url =
utils.reverse_course_url('group_configurations_list_handler',
context_course
.
id
)
%
>
<h3
class=
"title-3"
>
${_("Other Course Settings")}
</h3>
<nav
class=
"nav-related"
>
...
...
@@ -318,7 +317,7 @@ require(["domReady!", "jquery", "js/models/settings/course_details", "js/views/s
<li
class=
"nav-item"
><a
href=
"${course_team_url}"
>
${_("Course Team")}
</a></li>
<li
class=
"nav-item"
><a
href=
"${advanced_config_url}"
>
${_("Advanced Settings")}
</a></li>
% if "split_test" in context_course.advanced_modules:
<li
class=
"nav-item"
><a
href=
"${
group_configurations_config_url
}"
>
${_("Group Configurations")}
</a></li>
<li
class=
"nav-item"
><a
href=
"${
utils.reverse_course_url('group_configurations_list_handler', context_course.id)
}"
>
${_("Group Configurations")}
</a></li>
% endif
</ul>
</nav>
...
...
cms/templates/settings_advanced.html
View file @
a153092c
...
...
@@ -118,7 +118,6 @@ require(["domReady!", "jquery", "gettext", "js/models/settings/advanced", "js/vi
details_url =
utils.reverse_course_url('settings_handler',
context_course
.
id
)
grading_url =
utils.reverse_course_url('grading_handler',
context_course
.
id
)
course_team_url =
utils.reverse_course_url('course_team_handler',
context_course
.
id
)
group_configurations_config_url =
utils.reverse_course_url('group_configurations_list_handler',
context_course
.
id
)
%
>
<h3
class=
"title-3"
>
${_("Other Course Settings")}
</h3>
<nav
class=
"nav-related"
>
...
...
@@ -126,8 +125,8 @@ require(["domReady!", "jquery", "gettext", "js/models/settings/advanced", "js/vi
<li
class=
"nav-item"
><a
href=
"${details_url}"
>
${_("Details
&
Schedule")}
</a></li>
<li
class=
"nav-item"
><a
href=
"${grading_url}"
>
${_("Grading")}
</a></li>
<li
class=
"nav-item"
><a
href=
"${course_team_url}"
>
${_("Course Team")}
</a></li>
% if "split_test" in context_course.advanced_modules:
<li
class=
"nav-item"
><a
href=
"${
group_configurations_config_url
}"
>
${_("Group Configurations")}
</a></li>
% if
settings.FEATURES.get('ENABLE_GROUP_CONFIGURATIONS') and
"split_test" in context_course.advanced_modules:
<li
class=
"nav-item"
><a
href=
"${
utils.reverse_course_url('group_configurations_list_handler', context_course.id)
}"
>
${_("Group Configurations")}
</a></li>
% endif
</ul>
</nav>
...
...
cms/templates/settings_graders.html
View file @
a153092c
...
...
@@ -141,7 +141,6 @@ require(["domReady!", "jquery", "js/views/settings/grading", "js/models/settings
detailed_settings_url =
utils.reverse_course_url('settings_handler',
context_course
.
id
)
course_team_url =
utils.reverse_course_url('course_team_handler',
context_course
.
id
)
advanced_settings_url =
utils.reverse_course_url('advanced_settings_handler',
context_course
.
id
)
group_configurations_config_url =
utils.reverse_course_url('group_configurations_list_handler',
context_course
.
id
)
%
>
<h3
class=
"title-3"
>
${_("Other Course Settings")}
</h3>
<nav
class=
"nav-related"
>
...
...
@@ -149,8 +148,8 @@ require(["domReady!", "jquery", "js/views/settings/grading", "js/models/settings
<li
class=
"nav-item"
><a
href=
"${detailed_settings_url}"
>
${_("Details
&
Schedule")}
</a></li>
<li
class=
"nav-item"
><a
href=
"${course_team_url}"
>
${_("Course Team")}
</a></li>
<li
class=
"nav-item"
><a
href=
"${advanced_settings_url}"
>
${_("Advanced Settings")}
</a></li>
% if "split_test" in context_course.advanced_modules:
<li
class=
"nav-item"
><a
href=
"${
group_configurations_config_url
}"
>
${_("Group Configurations")}
</a></li>
% if
settings.FEATURES.get('ENABLE_GROUP_CONFIGURATIONS') and
"split_test" in context_course.advanced_modules:
<li
class=
"nav-item"
><a
href=
"${
utils.reverse_course_url('group_configurations_list_handler', context_course.id)
}"
>
${_("Group Configurations")}
</a></li>
% endif
</ul>
</nav>
...
...
cms/templates/widgets/header.html
View file @
a153092c
...
...
@@ -27,7 +27,6 @@
settings_url =
reverse('contentstore.views.settings_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
grading_url =
reverse('contentstore.views.grading_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
advanced_settings_url =
reverse('contentstore.views.advanced_settings_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
group_configurations_config_url =
reverse('contentstore.views.group_configurations_list_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
tabs_url =
reverse('contentstore.views.tabs_handler',
kwargs=
{'course_key_string':
unicode
(
course_key
)})
%
>
<h2
class=
"info-course"
>
...
...
@@ -85,9 +84,9 @@
<li
class=
"nav-item nav-course-settings-advanced"
>
<a
href=
"${advanced_settings_url}"
>
${_("Advanced Settings")}
</a>
</li>
% if "split_test" in context_course.advanced_modules:
% if
settings.FEATURES.get('ENABLE_GROUP_CONFIGURATIONS') and
"split_test" in context_course.advanced_modules:
<li
class=
"nav-item nav-course-settings-group-configurations"
>
<a
href=
"${
group_configurations_config_url
}"
>
${_("Group Configurations")}
</a>
<a
href=
"${
reverse('contentstore.views.group_configurations_list_handler', kwargs={'course_key_string': unicode(course_key)})
}"
>
${_("Group Configurations")}
</a>
</li>
% endif
</ul>
...
...
cms/urls.py
View file @
a153092c
...
...
@@ -90,9 +90,12 @@ urlpatterns += patterns(
url
(
r'^settings/advanced/(?P<course_key_string>[^/]+)$'
,
'advanced_settings_handler'
),
url
(
r'^textbooks/(?P<course_key_string>[^/]+)$'
,
'textbooks_list_handler'
),
url
(
r'^textbooks/(?P<course_key_string>[^/]+)/(?P<textbook_id>\d[^/]*)$'
,
'textbooks_detail_handler'
),
url
(
r'^group_configurations/(?P<course_key_string>[^/]+)$'
,
'group_configurations_list_handler'
),
)
if
settings
.
FEATURES
.
get
(
'ENABLE_GROUP_CONFIGURATIONS'
):
urlpatterns
+=
(
url
(
r'^group_configurations/(?P<course_key_string>[^/]+)$'
,
'contentstore.views.group_configurations_list_handler'
),)
js_info_dict
=
{
'domain'
:
'djangojs'
,
# We need to explicitly include external Django apps that are not in LOCALE_PATHS.
...
...
common/test/acceptance/tests/test_studio_split_test.py
View file @
a153092c
...
...
@@ -3,7 +3,8 @@ Acceptance tests for Studio related to the split_test module.
"""
import
json
from
unittest
import
skip
import
os
from
unittest
import
skip
,
skipUnless
from
..fixtures.course
import
CourseFixture
,
XBlockFixtureDesc
...
...
@@ -162,6 +163,7 @@ class SplitTest(ContainerBase):
self
.
verify_groups
(
container
,
[
'alpha'
],
[],
verify_missing_groups_not_present
=
False
)
@skipUnless
(
os
.
environ
.
get
(
'FEATURE_GROUP_CONFIGURATIONS'
),
'Tests Group Configurations feature'
)
class
SettingsMenuTest
(
UniqueCourseTest
):
"""
Tests that Setting menu is rendered correctly in Studio
...
...
@@ -222,6 +224,7 @@ class SettingsMenuTest(UniqueCourseTest):
self
.
assertFalse
(
self
.
advanced_settings
.
q
(
css
=
link_css
)
.
present
)
@skipUnless
(
os
.
environ
.
get
(
'FEATURE_GROUP_CONFIGURATIONS'
),
'Tests Group Configurations feature'
)
class
GroupConfigurationsTest
(
UniqueCourseTest
):
"""
Tests that Group Configurations page works correctly with previously
...
...
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