Commit ac58ebf7 by Andy Armstrong

Rename 'cohort groups' to just 'cohorts'

parent 1897fb65
......@@ -328,7 +328,7 @@ browser and pasting the output. When that file changes, this one should be rege
<% }); %>
</select>
</label><div class="field-help">
Discussion admins, moderators, and TAs can make their posts visible to all students or specify a single cohort group.
Discussion admins, moderators, and TAs can make their posts visible to all students or specify a single cohort.
</div>
</div>
<% } %>
......
......@@ -32,8 +32,8 @@
* Example usages:
* interpolate_text('{title} ({count})', {title: expectedTitle, count: expectedCount}
* interpolate_text(
* ngettext("{numUsersAdded} student has been added to this cohort group",
* "{numUsersAdded} students have been added to this cohort group", numUsersAdded),
* ngettext("{numUsersAdded} student has been added to this cohort",
* "{numUsersAdded} students have been added to this cohort", numUsersAdded),
* {numUsersAdded: numUsersAdded}
* );
*
......
......@@ -104,7 +104,7 @@ class MembershipPageCohortManagementSection(PageObject):
def _get_cohort_options(self):
"""
Returns the available options in the cohort dropdown, including the initial "Select a cohort group".
Returns the available options in the cohort dropdown, including the initial "Select a cohort".
"""
return self.q(css=self._bounded_selector("#cohort-select option"))
......@@ -122,7 +122,7 @@ class MembershipPageCohortManagementSection(PageObject):
def get_cohorts(self):
"""
Returns, as a list, the names of the available cohorts in the drop-down, filtering out "Select a cohort group".
Returns, as a list, the names of the available cohorts in the drop-down, filtering out "Select a cohort".
"""
return [
self._cohort_name(opt.text)
......@@ -227,7 +227,7 @@ class MembershipPageCohortManagementSection(PageObject):
def set_cohort_associated_content_group(self, content_group=None, select_settings=True):
"""
Sets the content group associated with the cohort currently being edited.
If content_group is None, un-links the cohort group from any content group.
If content_group is None, un-links the cohort from any content group.
Presses Save to update the cohort's settings.
"""
if select_settings:
......
......@@ -41,7 +41,7 @@ class CohortTestMixin(object):
def setup_cohort_config(self, course_fixture, auto_cohort_groups=None):
"""
Sets up the course to use cohorting with the given list of auto_cohort_groups.
If auto_cohort_groups is None, no auto cohort groups are set.
If auto_cohort_groups is None, no auto cohorts are set.
"""
course_fixture._update_xblock(course_fixture._course_location, {
"metadata": {
......@@ -67,7 +67,7 @@ class CohortTestMixin(object):
def add_manual_cohort(self, course_fixture, cohort_name):
"""
Adds a cohort group by name, returning the ID for the group.
Adds a cohort by name, returning its ID.
"""
url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + '/cohorts/'
data = json.dumps({"name": cohort_name})
......@@ -77,7 +77,7 @@ class CohortTestMixin(object):
def add_user_to_cohort(self, course_fixture, username, cohort_id):
"""
Adds a user to the specified cohort group.
Adds a user to the specified cohort.
"""
url = LMS_BASE_URL + "/courses/" + course_fixture._course_key + "/cohorts/{}/add".format(cohort_id)
data = {"users": username}
......
......@@ -89,12 +89,12 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
"""
self.verify_cohort_description(
self.manual_cohort_name,
'Students are added to this cohort group only when you provide '
'Students are added to this cohort only when you provide '
'their email addresses or usernames on this page',
)
self.verify_cohort_description(
self.auto_cohort_name,
'Students are added to this cohort group automatically',
'Students are added to this cohort automatically',
)
def test_no_content_groups(self):
......@@ -104,7 +104,7 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
Given I have a course with a cohort defined but no content groups
When I view the cohort in the instructor dashboard and select settings
Then the cohort group is not linked to a content group
Then the cohort is not linked to a content group
And there is text stating that no content groups are defined
And I cannot select the radio button to enable content group association
And there is a link I can select to open Group settings in Studio
......@@ -113,7 +113,7 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
self.assertIsNone(self.cohort_management_page.get_cohort_associated_content_group())
self.assertEqual(
"Warning:\nNo content groups exist. "
"Create a content group to associate with cohort groups. Create a content group",
"Create a content group to associate with cohorts. Create a content group",
self.cohort_management_page.get_cohort_related_content_group_message()
)
self.assertFalse(self.cohort_management_page.select_content_group_radio_button())
......@@ -167,7 +167,7 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
confirmation_messages = self.cohort_management_page.get_cohort_confirmation_messages()
self.assertEqual(
[
"2 students have been added to this cohort group",
"2 students have been added to this cohort",
"1 student was removed from " + self.manual_cohort_name
],
confirmation_messages
......@@ -235,8 +235,8 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
self.assertEqual(
[
"0 students have been added to this cohort group",
"1 student was already in the cohort group"
"0 students have been added to this cohort",
"1 student was already in the cohort"
],
self.cohort_management_page.get_cohort_confirmation_messages()
)
......@@ -359,7 +359,7 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
"Your file '{}' has been uploaded. Allow a few minutes for processing.".format(filename)
)
# student_user is moved from manual cohort group to auto cohort group
# student_user is moved from manual cohort to auto cohort
self.assertEqual(
self.event_collection.find({
"name": "edx.cohort.user_added",
......@@ -378,7 +378,7 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
}).count(),
1
)
# instructor_user (previously unassigned) is added to manual cohort group
# instructor_user (previously unassigned) is added to manual cohort
self.assertEqual(
self.event_collection.find({
"name": "edx.cohort.user_added",
......@@ -388,7 +388,7 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
}).count(),
1
)
# unicode_student_user (previously unassigned) is added to manual cohort group
# unicode_student_user (previously unassigned) is added to manual cohort
self.assertEqual(
self.event_collection.find({
"name": "edx.cohort.user_added",
......@@ -467,7 +467,7 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
class CohortContentGroupAssociationTest(UniqueCourseTest, CohortTestMixin):
"""
Tests for linking between content groups and cohort groups in the instructor dashboard.
Tests for linking between content groups and cohort in the instructor dashboard.
"""
def setUp(self):
......@@ -515,7 +515,7 @@ class CohortContentGroupAssociationTest(UniqueCourseTest, CohortTestMixin):
Given I have a course with a cohort defined and content groups defined
When I view the cohort in the instructor dashboard and select settings
Then the cohort group is not linked to a content group
Then the cohort is not linked to a content group
And there is no text stating that content groups are undefined
And the content groups are listed in the selector
"""
......@@ -622,7 +622,7 @@ class CohortContentGroupAssociationTest(UniqueCourseTest, CohortTestMixin):
)
self.cohort_management_page.set_cohort_associated_content_group("Pears")
confirmation_messages = self.cohort_management_page.get_cohort_settings_messages()
self.assertEqual(["Saved cohort group."], confirmation_messages)
self.assertEqual(["Saved cohort"], confirmation_messages)
self.assertIsNone(self.cohort_management_page.get_cohort_related_content_group_message())
self.assertEquals(["Bananas", "Pears"], self.cohort_management_page.get_all_content_groups())
......@@ -652,7 +652,7 @@ class CohortContentGroupAssociationTest(UniqueCourseTest, CohortTestMixin):
Then refreshes the page and selects the cohort.
"""
confirmation_messages = self.cohort_management_page.get_cohort_settings_messages()
self.assertEqual(["Saved cohort group."], confirmation_messages)
self.assertEqual(["Saved cohort"], confirmation_messages)
self.browser.refresh()
self.cohort_management_page.wait_for_page()
self.cohort_management_page.select_cohort(cohort_name)
......@@ -36,10 +36,10 @@ class CohortedDiscussionTestMixin(BaseDiscussionMixin, CohortTestMixin):
"""
def setup_cohorts(self):
"""
Sets up the course to use cohorting with a single defined cohort group.
Sets up the course to use cohorting with a single defined cohort.
"""
self.setup_cohort_config(self.course_fixture)
self.cohort_1_name = "Cohort Group 1"
self.cohort_1_name = "Cohort 1"
self.cohort_1_id = self.add_manual_cohort(self.course_fixture, self.cohort_1_name)
def test_cohort_visibility_label(self):
......
......@@ -551,7 +551,7 @@ def upload_grades_csv(_xmodule_instance_args, _entry_id, course_id, _task_input,
task_progress = TaskProgress(action_name, enrolled_students.count(), start_time)
course = get_course_by_id(course_id)
cohorts_header = ['Cohort Group Name'] if course.is_cohorted else []
cohorts_header = ['Cohort Name'] if course.is_cohorted else []
partition_service = LmsPartitionService(user=None, course_id=course_id)
partitions = partition_service.course_partitions
......
......@@ -75,7 +75,7 @@ class TestInstructorGradeReport(TestReportMixin, InstructorTaskCourseTestCase):
report_csv_filename = report_store.links_for(course_id)[0][0]
with open(report_store.path_to(course_id, report_csv_filename)) as csv_file:
for row in unicodecsv.DictReader(csv_file):
cohort_groups_in_csv.append(row['Cohort Group Name'])
cohort_groups_in_csv.append(row['Cohort Name'])
self.assertEqual(cohort_groups_in_csv, expected_cohort_groups)
......@@ -97,12 +97,12 @@ class TestInstructorGradeReport(TestReportMixin, InstructorTaskCourseTestCase):
def test_unicode_cohort_data_in_grading(self):
"""
Test that cohort groups can contain unicode characters.
Test that cohorts can contain unicode characters.
"""
cohort_groups = [u'ÞrÖfessÖr X', u'MàgnëtÖ']
course = CourseFactory.create(cohort_config={'cohorted': True})
# Create users and manually assign cohort groups
# Create users and manually assign cohorts
user1 = UserFactory.create(username='user1')
user2 = UserFactory.create(username='user2')
CourseEnrollment.enroll(user1, course.id)
......
......@@ -54,7 +54,7 @@ var edx = edx || {};
event.preventDefault();
cohortFormView.saveForm()
.done(function() {
cohortFormView.showMessage(gettext('Saved cohort group.'));
cohortFormView.showMessage(gettext('Saved cohort'));
});
},
......@@ -145,8 +145,8 @@ var edx = edx || {};
numPresent = modifiedUsers.present.length;
if (numUsersAdded > 0 || numPresent > 0) {
title = interpolate_text(
ngettext("{numUsersAdded} student has been added to this cohort group",
"{numUsersAdded} students have been added to this cohort group", numUsersAdded),
ngettext("{numUsersAdded} student has been added to this cohort",
"{numUsersAdded} students have been added to this cohort", numUsersAdded),
{numUsersAdded: numUsersAdded}
);
......@@ -174,8 +174,8 @@ var edx = edx || {};
if (numPresent > 0) {
details.push(
interpolate_text(
ngettext("{numPresent} student was already in the cohort group",
"{numPresent} students were already in the cohort group", numPresent),
ngettext("{numPresent} student was already in the cohort",
"{numPresent} students were already in the cohort", numPresent),
{numPresent: numPresent}
)
);
......
......@@ -93,7 +93,7 @@ var edx = edx || {};
var errorMessages;
errorMessages = [];
if (!fieldData.name) {
errorMessages.push(gettext('You must specify a name for the cohort group'));
errorMessages.push(gettext('You must specify a name for the cohort'));
}
if (this.hasAssociatedContentGroup() && fieldData.group_id === null) {
if (this.$('.input-cohort-group-association').val() === 'None') {
......@@ -125,8 +125,7 @@ var edx = edx || {};
errorMessages = this.validate(fieldData);
if (errorMessages.length > 0) {
showErrorMessage(
isUpdate ? gettext("The cohort group cannot be saved")
: gettext("The cohort group cannot be added"),
isUpdate ? gettext("The cohort cannot be saved") : gettext("The cohort cannot be added"),
errorMessages
);
saveOperation.reject();
......
......@@ -78,8 +78,8 @@ var edx = edx || {};
additionalCohortControlElement.addClass(hiddenClass);
this.showNotification({
type: 'warning',
title: gettext('You currently have no cohort groups configured'),
actionText: gettext('Add Cohort Group'),
title: gettext('You currently have no cohorts configured'),
actionText: gettext('Add Cohort'),
actionClass: 'action-create',
actionIconClass: 'fa-plus'
});
......@@ -182,7 +182,7 @@ var edx = edx || {};
self.showNotification({
type: 'confirmation',
title: interpolate_text(
gettext('The {cohortGroupName} cohort group has been created. You can manually add students to this group below.'),
gettext('The {cohortGroupName} cohort has been created. You can manually add students to this cohort below.'),
{cohortGroupName: newCohort.get('name')}
)
});
......@@ -212,7 +212,7 @@ var edx = edx || {};
if (!this.fileUploaderView) {
this.fileUploaderView = new FileUploaderView({
el: uploadElement,
title: gettext("Assign students to cohort groups by uploading a CSV file."),
title: gettext("Assign students to cohorts by uploading a CSV file."),
inputLabel: gettext("Choose a .csv file"),
inputTip: gettext("Only properly formatted .csv files will be accepted."),
submitButtonText: gettext("Upload File and Assign Students"),
......
......@@ -540,7 +540,7 @@
}
}
// create or edit cohort group
// create or edit cohort
.cohort-management-settings,
.cohort-management-edit {
@extend %cohort-management-form;
......@@ -567,7 +567,7 @@
}
}
// cohort group
// cohort
.cohort-management-group-header {
padding: $baseline;
border-bottom: ($baseline/10) solid $gray-l4;
......
......@@ -373,7 +373,7 @@ function goto( mode)
%if modeflag.get('Manage Groups'):
%if instructor_access:
%if course.is_cohorted:
<p class="is-deprecated">${_("To manage beta tester roles and cohort groups, visit the Membership section of the Instructor Dashboard.")}</p>
<p class="is-deprecated">${_("To manage beta tester roles and cohorts, visit the Membership section of the Instructor Dashboard.")}</p>
%else:
<p class="is-deprecated">${_("To manage beta tester roles, visit the Membership section of the Instructor Dashboard.")}</p>
%endif
......
......@@ -399,7 +399,7 @@
${'<% }); %>'}
</select>
</label><div class="field-help">
${_("Discussion admins, moderators, and TAs can make their posts visible to all students or specify a single cohort group.")}
${_("Discussion admins, moderators, and TAs can make their posts visible to all students or specify a single cohort.")}
</div>
</div>
${'<% } %>'}
......
......@@ -13,10 +13,10 @@
<div class="cohort-management-group-setup">
<div class="setup-value">
<% if (cohort.get('assignment_type') == "none") { %>
<%- gettext("Students are added to this cohort group only when you provide their email addresses or usernames on this page.") %>
<%- gettext("Students are added to this cohort only when you provide their email addresses or usernames on this page.") %>
<a href="http://edx.readthedocs.org/projects/edx-partner-course-staff/en/latest/cohorts/cohort_config.html#assign-students-to-cohort-groups-manually" class="incontext-help action-secondary action-help"><%= gettext("What does this mean?") %></a>
<% } else { %>
<%- gettext("Students are added to this cohort group automatically.") %>
<%- gettext("Students are added to this cohort automatically.") %>
<a href="http://edx.readthedocs.org/projects/edx-partner-course-staff/en/latest/cohorts/cohorts_overview.html#all-automated-assignment" class="incontext-help action-secondary action-help"><%- gettext("What does this mean?") %></a>
<% } %>
</div>
......@@ -36,10 +36,10 @@
<div class="cohort-management-group-add tab-content tab-content-manage_students">
<form action="" method="post" id="cohort-management-group-add-form" class="cohort-management-group-add-form">
<h4 class="form-title"><%- gettext('Add students to this cohort group') %></h4>
<h4 class="form-title"><%- gettext('Add students to this cohort') %></h4>
<div class="form-introduction">
<p><%- gettext('Note: Students can be in only one cohort group. Adding students to this group overrides any previous group assignment.') %></p>
<p><%- gettext('Note: Students can be in only one cohort. Adding students to this group overrides any previous group assignment.') %></p>
</div>
<div class="cohort-confirmations"></div>
......
......@@ -2,7 +2,7 @@
<div class="cohort-management-settings">
<form action="" method="post" name="" id="cohort-management-settings-form" class="cohort-management-settings-form">
<% if (isNewCohort) { %>
<h3 class="form-title"><%- gettext('Add a New Cohort Group') %></h3>
<h3 class="form-title"><%- gettext('Add a New Cohort') %></h3>
<div class="tab-content is-visible new-cohort-form">
<% } %>
<div class="form-fields">
......@@ -14,12 +14,12 @@
<div class="form-field">
<div class="cohort-management-settings-form-name field field-text">
<label for="cohort-name" class="form-label">
<%- gettext('Cohort Group Name') %> *
<%- gettext('Cohort Name') %> *
<span class="sr"><%- gettext('(Required Field)')%></span>
</label>
<input type="text" name="cohort-name" value="<%- cohort ? cohort.get('name') : '' %>" class="input cohort-name"
id="cohort-name"
placeholder="<%- gettext("Enter the name of the cohort group") %>" required="required" />
placeholder="<%- gettext("Enter the name of the cohort") %>" required="required" />
</div>
</div>
<% } %>
......@@ -96,7 +96,7 @@
<%=
interpolate(
// Translators: Any text between %(screen_reader_start)s and %(screen_reader_end)s is only read by screen readers and never shown in the browser.
'%(screen_reader_start)sWarning:%(screen_reader_end)s No content groups exist. Create a content group to associate with cohort groups.',
'%(screen_reader_start)sWarning:%(screen_reader_end)s No content groups exist. Create a content group to associate with cohorts.',
{
screen_reader_start: '<span class="sr">',
screen_reader_end: '</span>'
......
<% if (!selectedCohort) { %>
<option value=""><%- gettext('Select a cohort group') %></option>
<option value=""><%- gettext('Select a cohort') %></option>
<% } %>
<% _.each(cohorts, function(cohort) { %>
<%
......
......@@ -4,23 +4,23 @@
</h2>
<div class="cohort-management-nav">
<h3 class="subsection-title"><%- gettext('Assign students to cohort groups manually') %></h3>
<h3 class="subsection-title"><%- gettext('Assign students to cohorts manually') %></h3>
<form action="" method="post" name="" id="cohort-management-nav-form" class="cohort-management-nav-form">
<div class="cohort-management-nav-form-select field field-select">
<label for="cohort-select" class="label sr"><%- gettext("Select a cohort group to manage") %></label>
<label for="cohort-select" class="label sr"><%- gettext("Select a cohort to manage") %></label>
<select class="input cohort-select" name="cohort-select" id="cohort-select">
</select>
</div>
<div class="form-actions">
<button class="form-submit button action-primary action-view sr"><%- gettext('View Cohort Group') %></button>
<button class="form-submit button action-primary action-view sr"><%- gettext('View Cohort') %></button>
</div>
</form>
<a href="" class="action-primary action-create">
<i class="icon fa fa-plus"></i>
<%- gettext('Add Cohort Group') %>
<%- gettext('Add Cohort') %>
</a>
</div>
......@@ -35,14 +35,14 @@
<hr class="divider divider-lv1" />
<!-- Uploading a CSV file of cohort assignments. -->
<a class="toggle-cohort-management-secondary" href="#cohort-management-file-upload"><%- gettext('Assign students to cohort groups by uploading a CSV file') %></a>
<a class="toggle-cohort-management-secondary" href="#cohort-management-file-upload"><%- gettext('Assign students to cohorts by uploading a CSV file') %></a>
<div class="cohort-management-file-upload csv-upload is-hidden" id="cohort-management-file-upload"></div>
<div class="cohort-management-supplemental">
<p class="">
<i class="icon fa fa-info-circle"></i>
<%= interpolate(
gettext('To review student cohort group assignments or see the results of uploading a CSV file, download course profile information or cohort results on %(link_start)s the Data Download page. %(link_end)s'),
gettext('To review student cohort assignments or see the results of uploading a CSV file, download course profile information or cohort results on %(link_start)s the Data Download page. %(link_end)s'),
{link_start: '<a href="" class="link-cross-reference" data-section="data_download">', link_end: '</a>'},
true
) %>
......
"""
This file contains the logic for cohort groups, as exposed internally to the
This file contains the logic for cohorts, as exposed internally to the
forums, and to the cohort admin views.
"""
......@@ -88,8 +88,8 @@ class CohortAssignmentType(object):
# No automatic rules are applied to this cohort; users must be manually added.
NONE = "none"
# One of (possibly) multiple cohort groups to which users are randomly assigned.
# Note: The 'default cohort' group is included in this category iff it exists and
# One of (possibly) multiple cohorts to which users are randomly assigned.
# Note: The 'default' cohort is included in this category iff it exists and
# there are no other random groups. (Also see Note 2 above.)
RANDOM = "random"
......
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