diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 261e19456c..e20f1e9934 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -486,10 +486,12 @@ def _section_membership(course, access, is_white_label): def _section_cohort_management(course, access): """ Provide data for the corresponding cohort management section """ course_key = course.id + ccx_enabled = hasattr(course_key, 'ccx') section_data = { 'section_key': 'cohort_management', 'section_display_name': _('Cohorts'), 'access': access, + 'ccx_is_enabled': ccx_enabled, 'course_cohort_settings_url': reverse( 'course_cohort_settings', kwargs={'course_key_string': unicode(course_key)} diff --git a/lms/static/js/groups/views/cohort_form.js b/lms/static/js/groups/views/cohort_form.js index 1d7c987232..307ee2ac85 100644 --- a/lms/static/js/groups/views/cohort_form.js +++ b/lms/static/js/groups/views/cohort_form.js @@ -35,7 +35,8 @@ cohort: this.model, isDefaultCohort: this.isDefault(this.model.get('name')), contentGroups: this.contentGroups, - studioGroupConfigurationsUrl: this.context.studioGroupConfigurationsUrl + studioGroupConfigurationsUrl: this.context.studioGroupConfigurationsUrl, + isCcxEnabled: this.context.isCcxEnabled })); return this; }, diff --git a/lms/static/js/groups/views/cohorts_dashboard_factory.js b/lms/static/js/groups/views/cohorts_dashboard_factory.js index af63d0c676..e85ade7bdf 100644 --- a/lms/static/js/groups/views/cohorts_dashboard_factory.js +++ b/lms/static/js/groups/views/cohorts_dashboard_factory.js @@ -31,7 +31,8 @@ discussionTopicsSettingsModel: discussionTopicsSettings, uploadCohortsCsvUrl: cohortManagementElement.data('upload_cohorts_csv_url'), verifiedTrackCohortingUrl: cohortManagementElement.data('verified_track_cohorting_url'), - studioGroupConfigurationsUrl: studioGroupConfigurationsUrl + studioGroupConfigurationsUrl: studioGroupConfigurationsUrl, + isCcxEnabled: cohortManagementElement.data('is_ccx_enabled') } }); diff --git a/lms/templates/instructor/instructor_dashboard_2/cohort-form.underscore b/lms/templates/instructor/instructor_dashboard_2/cohort-form.underscore index 9f41c248ad..9321e29f15 100644 --- a/lms/templates/instructor/instructor_dashboard_2/cohort-form.underscore +++ b/lms/templates/instructor/instructor_dashboard_2/cohort-form.underscore @@ -17,7 +17,6 @@ var cohort_name = cohort.get('name'); var cohort_name_value = isNewCohort ? '' : cohort_name; var placeholder_value = isNewCohort ? gettext('Enter the name of the cohort') : ''; - %>