diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index 190e10fb7b..315b78413b 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -365,6 +365,14 @@ def _section_analytics(course, access): 'proxy_legacy_analytics_url': reverse('proxy_legacy_analytics', kwargs={'course_id': course_key.to_deprecated_string()}), } + if settings.ANALYTICS_DASHBOARD_URL: + # Construct a URL to the external analytics dashboard + analytics_dashboard_url = '{0}/courses/{1}'.format(settings.ANALYTICS_DASHBOARD_URL, unicode(course_key)) + dashboard_link = "{1}".format(analytics_dashboard_url, + settings.ANALYTICS_DASHBOARD_NAME) + message = _("Demographic data is now available in {dashboard_link}.").format(dashboard_link=dashboard_link) + section_data['demographic_message'] = message + return section_data diff --git a/lms/envs/common.py b/lms/envs/common.py index 97900cd92a..83f50778ec 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -288,6 +288,9 @@ FEATURES = { # to allow an upload of a CSV file that contains a list of new accounts to create # and register for course. 'ALLOW_AUTOMATED_SIGNUPS': False, + + # Display demographic data on the analytics tab in the instructor dashboard. + 'DISPLAY_ANALYTICS_DEMOGRAPHICS': True } # Ignore static asset files on import which match this pattern diff --git a/lms/templates/instructor/instructor_dashboard_2/instructor_analytics.html b/lms/templates/instructor/instructor_dashboard_2/instructor_analytics.html index 07c86b7809..c75501cd0b 100644 --- a/lms/templates/instructor/instructor_dashboard_2/instructor_analytics.html +++ b/lms/templates/instructor/instructor_dashboard_2/instructor_analytics.html @@ -44,24 +44,28 @@
${section_data['demographic_message']}
+%endif