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
798342e1
Commit
798342e1
authored
Jan 08, 2015
by
Andy Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename 'cohorted content group' to 'content group'
parent
ac58ebf7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
cms/lib/xblock/test/test_authoring_mixin.py
+9
-9
common/test/acceptance/tests/lms/test_lms_user_preview.py
+1
-1
lms/static/js/groups/views/cohort_form.js
+2
-2
lms/static/js/spec/groups/views/cohorts_spec.js
+4
-4
lms/templates/instructor/instructor_dashboard_2/cohort-form.underscore
+1
-1
No files found.
cms/lib/xblock/test/test_authoring_mixin.py
View file @
798342e1
...
@@ -36,15 +36,15 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
...
@@ -36,15 +36,15 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
)
)
self
.
pet_groups
=
[
Group
(
1
,
'Cat Lovers'
),
Group
(
2
,
'Dog Lovers'
)]
self
.
pet_groups
=
[
Group
(
1
,
'Cat Lovers'
),
Group
(
2
,
'Dog Lovers'
)]
def
create_co
horted_content_groups
(
self
,
groups
):
def
create_co
ntent_groups
(
self
,
content_
groups
):
"""
"""
Create a cohorted
content partition with specified
groups.
Create a cohorted
user partition with the specified content
groups.
"""
"""
self
.
content_partition
=
UserPartition
(
self
.
content_partition
=
UserPartition
(
1
,
1
,
'Content Groups'
,
'Content Groups'
,
'Contains Groups for Cohorted Courseware'
,
'Contains Groups for Cohorted Courseware'
,
groups
,
content_
groups
,
scheme_id
=
'cohort'
scheme_id
=
'cohort'
)
)
self
.
course
.
user_partitions
=
[
self
.
content_partition
]
self
.
course
.
user_partitions
=
[
self
.
content_partition
]
...
@@ -76,11 +76,11 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
...
@@ -76,11 +76,11 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
self
.
verify_visibility_view_contains
(
self
.
video
,
'You have not set up any groups to manage visibility with.'
)
self
.
verify_visibility_view_contains
(
self
.
video
,
'You have not set up any groups to manage visibility with.'
)
def
test_html_empty_partition
(
self
):
def
test_html_empty_partition
(
self
):
self
.
create_co
horted_co
ntent_groups
([])
self
.
create_content_groups
([])
self
.
verify_visibility_view_contains
(
self
.
video
,
'You have not set up any groups to manage visibility with.'
)
self
.
verify_visibility_view_contains
(
self
.
video
,
'You have not set up any groups to manage visibility with.'
)
def
test_html_populated_partition
(
self
):
def
test_html_populated_partition
(
self
):
self
.
create_co
horted_co
ntent_groups
(
self
.
pet_groups
)
self
.
create_content_groups
(
self
.
pet_groups
)
self
.
verify_visibility_view_contains
(
self
.
video
,
[
'Cat Lovers'
,
'Dog Lovers'
])
self
.
verify_visibility_view_contains
(
self
.
video
,
[
'Cat Lovers'
,
'Dog Lovers'
])
def
test_html_no_partition_staff_locked
(
self
):
def
test_html_no_partition_staff_locked
(
self
):
...
@@ -88,26 +88,26 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
...
@@ -88,26 +88,26 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
self
.
verify_visibility_view_contains
(
self
.
video
,
[
'You have not set up any groups to manage visibility with.'
])
self
.
verify_visibility_view_contains
(
self
.
video
,
[
'You have not set up any groups to manage visibility with.'
])
def
test_html_empty_partition_staff_locked
(
self
):
def
test_html_empty_partition_staff_locked
(
self
):
self
.
create_co
horted_co
ntent_groups
([])
self
.
create_content_groups
([])
self
.
set_staff_only
(
self
.
vertical
)
self
.
set_staff_only
(
self
.
vertical
)
self
.
verify_visibility_view_contains
(
self
.
video
,
'You have not set up any groups to manage visibility with.'
)
self
.
verify_visibility_view_contains
(
self
.
video
,
'You have not set up any groups to manage visibility with.'
)
def
test_html_populated_partition_staff_locked
(
self
):
def
test_html_populated_partition_staff_locked
(
self
):
self
.
create_co
horted_co
ntent_groups
(
self
.
pet_groups
)
self
.
create_content_groups
(
self
.
pet_groups
)
self
.
set_staff_only
(
self
.
vertical
)
self
.
set_staff_only
(
self
.
vertical
)
self
.
verify_visibility_view_contains
(
self
.
verify_visibility_view_contains
(
self
.
video
,
[
'The Unit this component is contained in is hidden from students.'
,
'Cat Lovers'
,
'Dog Lovers'
]
self
.
video
,
[
'The Unit this component is contained in is hidden from students.'
,
'Cat Lovers'
,
'Dog Lovers'
]
)
)
def
test_html_false_content_group
(
self
):
def
test_html_false_content_group
(
self
):
self
.
create_co
horted_co
ntent_groups
(
self
.
pet_groups
)
self
.
create_content_groups
(
self
.
pet_groups
)
self
.
set_group_access
(
self
.
video
,
[
'false_group_id'
])
self
.
set_group_access
(
self
.
video
,
[
'false_group_id'
])
self
.
verify_visibility_view_contains
(
self
.
verify_visibility_view_contains
(
self
.
video
,
[
'Cat Lovers'
,
'Dog Lovers'
,
'Content group no longer exists.'
]
self
.
video
,
[
'Cat Lovers'
,
'Dog Lovers'
,
'Content group no longer exists.'
]
)
)
def
test_html_false_content_group_staff_locked
(
self
):
def
test_html_false_content_group_staff_locked
(
self
):
self
.
create_co
horted_co
ntent_groups
(
self
.
pet_groups
)
self
.
create_content_groups
(
self
.
pet_groups
)
self
.
set_staff_only
(
self
.
vertical
)
self
.
set_staff_only
(
self
.
vertical
)
self
.
set_group_access
(
self
.
video
,
[
'false_group_id'
])
self
.
set_group_access
(
self
.
video
,
[
'false_group_id'
])
self
.
verify_visibility_view_contains
(
self
.
verify_visibility_view_contains
(
...
...
common/test/acceptance/tests/lms/test_lms_user_preview.py
View file @
798342e1
...
@@ -229,7 +229,7 @@ class StaffDebugTest(CourseWithoutContentGroupsTest):
...
@@ -229,7 +229,7 @@ class StaffDebugTest(CourseWithoutContentGroupsTest):
class
CourseWithContentGroupsTest
(
StaffViewTest
):
class
CourseWithContentGroupsTest
(
StaffViewTest
):
"""
"""
Verifies that changing the "previewing as" selector works properly for co
horted content
.
Verifies that changing the "previewing as" selector works properly for co
ntent groups
.
"""
"""
def
setUp
(
self
):
def
setUp
(
self
):
...
...
lms/static/js/groups/views/cohort_form.js
View file @
798342e1
...
@@ -97,10 +97,10 @@ var edx = edx || {};
...
@@ -97,10 +97,10 @@ var edx = edx || {};
}
}
if
(
this
.
hasAssociatedContentGroup
()
&&
fieldData
.
group_id
===
null
)
{
if
(
this
.
hasAssociatedContentGroup
()
&&
fieldData
.
group_id
===
null
)
{
if
(
this
.
$
(
'.input-cohort-group-association'
).
val
()
===
'None'
)
{
if
(
this
.
$
(
'.input-cohort-group-association'
).
val
()
===
'None'
)
{
errorMessages
.
push
(
gettext
(
'You did not select a co
horted co
ntent group'
));
errorMessages
.
push
(
gettext
(
'You did not select a content group'
));
}
else
{
}
else
{
// If a value was selected, then it must be for a non-existent/deleted content group
// If a value was selected, then it must be for a non-existent/deleted content group
errorMessages
.
push
(
gettext
(
'The selected co
horted co
ntent group does not exist'
));
errorMessages
.
push
(
gettext
(
'The selected content group does not exist'
));
}
}
}
}
return
errorMessages
;
return
errorMessages
;
...
...
lms/static/js/spec/groups/views/cohorts_spec.js
View file @
798342e1
...
@@ -324,7 +324,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
...
@@ -324,7 +324,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
cohortsView
.
$
(
'.action-create'
).
click
();
cohortsView
.
$
(
'.action-create'
).
click
();
cohortsView
.
$
(
'.cohort-name'
).
val
(
'New Cohort'
);
cohortsView
.
$
(
'.cohort-name'
).
val
(
'New Cohort'
);
cohortsView
.
$
(
'.radio-yes'
).
prop
(
'checked'
,
true
).
change
();
cohortsView
.
$
(
'.radio-yes'
).
prop
(
'checked'
,
true
).
change
();
saveFormAndExpectErrors
(
'add'
,
[
'You did not select a co
horted co
ntent group'
]);
saveFormAndExpectErrors
(
'add'
,
[
'You did not select a content group'
]);
});
});
it
(
"shows two message when both fields have problems"
,
function
()
{
it
(
"shows two message when both fields have problems"
,
function
()
{
...
@@ -334,7 +334,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
...
@@ -334,7 +334,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
cohortsView
.
$
(
'.radio-yes'
).
prop
(
'checked'
,
true
).
change
();
cohortsView
.
$
(
'.radio-yes'
).
prop
(
'checked'
,
true
).
change
();
saveFormAndExpectErrors
(
'add'
,
[
saveFormAndExpectErrors
(
'add'
,
[
'You must specify a name for the cohort'
,
'You must specify a name for the cohort'
,
'You did not select a co
horted co
ntent group'
'You did not select a content group'
]);
]);
});
});
...
@@ -638,7 +638,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
...
@@ -638,7 +638,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
cohortsView
.
$
(
'.tab-settings a'
).
click
();
cohortsView
.
$
(
'.tab-settings a'
).
click
();
cohortsView
.
$
(
'.cohort-name'
).
val
(
'New Cohort'
);
cohortsView
.
$
(
'.cohort-name'
).
val
(
'New Cohort'
);
cohortsView
.
$
(
'.radio-yes'
).
prop
(
'checked'
,
true
).
change
();
cohortsView
.
$
(
'.radio-yes'
).
prop
(
'checked'
,
true
).
change
();
saveFormAndExpectErrors
(
'update'
,
[
'You did not select a co
horted co
ntent group'
]);
saveFormAndExpectErrors
(
'update'
,
[
'You did not select a content group'
]);
});
});
it
(
"shows a message when the selected content group does not exist"
,
function
()
{
it
(
"shows a message when the selected content group does not exist"
,
function
()
{
...
@@ -672,7 +672,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
...
@@ -672,7 +672,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
it
(
"shows an error when saving with a deleted content group"
,
function
()
{
it
(
"shows an error when saving with a deleted content group"
,
function
()
{
createCohortsViewWithDeletedContentGroup
(
this
);
createCohortsViewWithDeletedContentGroup
(
this
);
cohortsView
.
$
(
'.tab-settings a'
).
click
();
cohortsView
.
$
(
'.tab-settings a'
).
click
();
saveFormAndExpectErrors
(
'save'
,
[
'The selected co
horted co
ntent group does not exist'
]);
saveFormAndExpectErrors
(
'save'
,
[
'The selected content group does not exist'
]);
});
});
it
(
"shows an error when the save fails"
,
function
()
{
it
(
"shows an error when the save fails"
,
function
()
{
...
...
lms/templates/instructor/instructor_dashboard_2/cohort-form.underscore
View file @
798342e1
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<div class="form-field">
<div class="form-field">
<div class="cohort-management-details-association-course field field-radio">
<div class="cohort-management-details-association-course field field-radio">
<h4 class="form-label">
<h4 class="form-label">
<%- gettext('Associated Co
horted Co
ntent Group') %>
<%- gettext('Associated Content Group') %>
</h4>
</h4>
<label><input type="radio" class="radio-no" name="cohort-association-course" value="no" <%- !hasSelectedContentGroup ? 'checked="checked"' : '' %>/> <%- gettext("No Content Group") %></label>
<label><input type="radio" class="radio-no" name="cohort-association-course" value="no" <%- !hasSelectedContentGroup ? 'checked="checked"' : '' %>/> <%- gettext("No Content Group") %></label>
<div class="input-group has-other-input-text">
<div class="input-group has-other-input-text">
...
...
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