Commit 798342e1 by Andy Armstrong

Rename 'cohorted content group' to 'content group'

parent ac58ebf7
......@@ -36,15 +36,15 @@ class AuthoringMixinTestCase(ModuleStoreTestCase):
)
self.pet_groups = [Group(1, 'Cat Lovers'), Group(2, 'Dog Lovers')]
def create_cohorted_content_groups(self, groups):
def create_content_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(
1,
'Content Groups',
'Contains Groups for Cohorted Courseware',
groups,
content_groups,
scheme_id='cohort'
)
self.course.user_partitions = [self.content_partition]
......@@ -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.')
def test_html_empty_partition(self):
self.create_cohorted_content_groups([])
self.create_content_groups([])
self.verify_visibility_view_contains(self.video, 'You have not set up any groups to manage visibility with.')
def test_html_populated_partition(self):
self.create_cohorted_content_groups(self.pet_groups)
self.create_content_groups(self.pet_groups)
self.verify_visibility_view_contains(self.video, ['Cat Lovers', 'Dog Lovers'])
def test_html_no_partition_staff_locked(self):
......@@ -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.'])
def test_html_empty_partition_staff_locked(self):
self.create_cohorted_content_groups([])
self.create_content_groups([])
self.set_staff_only(self.vertical)
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):
self.create_cohorted_content_groups(self.pet_groups)
self.create_content_groups(self.pet_groups)
self.set_staff_only(self.vertical)
self.verify_visibility_view_contains(
self.video, ['The Unit this component is contained in is hidden from students.', 'Cat Lovers', 'Dog Lovers']
)
def test_html_false_content_group(self):
self.create_cohorted_content_groups(self.pet_groups)
self.create_content_groups(self.pet_groups)
self.set_group_access(self.video, ['false_group_id'])
self.verify_visibility_view_contains(
self.video, ['Cat Lovers', 'Dog Lovers', 'Content group no longer exists.']
)
def test_html_false_content_group_staff_locked(self):
self.create_cohorted_content_groups(self.pet_groups)
self.create_content_groups(self.pet_groups)
self.set_staff_only(self.vertical)
self.set_group_access(self.video, ['false_group_id'])
self.verify_visibility_view_contains(
......
......@@ -229,7 +229,7 @@ class StaffDebugTest(CourseWithoutContentGroupsTest):
class CourseWithContentGroupsTest(StaffViewTest):
"""
Verifies that changing the "previewing as" selector works properly for cohorted content.
Verifies that changing the "previewing as" selector works properly for content groups.
"""
def setUp(self):
......
......@@ -97,10 +97,10 @@ var edx = edx || {};
}
if (this.hasAssociatedContentGroup() && fieldData.group_id === null) {
if (this.$('.input-cohort-group-association').val() === 'None') {
errorMessages.push(gettext('You did not select a cohorted content group'));
errorMessages.push(gettext('You did not select a content group'));
} else {
// If a value was selected, then it must be for a non-existent/deleted content group
errorMessages.push(gettext('The selected cohorted content group does not exist'));
errorMessages.push(gettext('The selected content group does not exist'));
}
}
return errorMessages;
......
......@@ -324,7 +324,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
cohortsView.$('.action-create').click();
cohortsView.$('.cohort-name').val('New Cohort');
cohortsView.$('.radio-yes').prop('checked', true).change();
saveFormAndExpectErrors('add', ['You did not select a cohorted content group']);
saveFormAndExpectErrors('add', ['You did not select a content group']);
});
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
cohortsView.$('.radio-yes').prop('checked', true).change();
saveFormAndExpectErrors('add', [
'You must specify a name for the cohort',
'You did not select a cohorted content group'
'You did not select a content group'
]);
});
......@@ -638,7 +638,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
cohortsView.$('.tab-settings a').click();
cohortsView.$('.cohort-name').val('New Cohort');
cohortsView.$('.radio-yes').prop('checked', true).change();
saveFormAndExpectErrors('update', ['You did not select a cohorted content group']);
saveFormAndExpectErrors('update', ['You did not select a content group']);
});
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
it("shows an error when saving with a deleted content group", function () {
createCohortsViewWithDeletedContentGroup(this);
cohortsView.$('.tab-settings a').click();
saveFormAndExpectErrors('save', ['The selected cohorted content group does not exist']);
saveFormAndExpectErrors('save', ['The selected content group does not exist']);
});
it("shows an error when the save fails", function () {
......
......@@ -34,7 +34,7 @@
<div class="form-field">
<div class="cohort-management-details-association-course field field-radio">
<h4 class="form-label">
<%- gettext('Associated Cohorted Content Group') %>
<%- gettext('Associated Content Group') %>
</h4>
<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">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment