Hiding Insights link for non-staff users

This commit is contained in:
Clinton Blackburn
2014-09-11 18:54:32 -04:00
parent 10bd2b003f
commit 8705694743

View File

@@ -106,7 +106,7 @@ def instructor_dashboard_2(request, course_id):
disable_buttons = enrollment_count > max_enrollment_for_buttons
analytics_dashboard_message = None
if settings.ANALYTICS_DASHBOARD_URL:
if settings.ANALYTICS_DASHBOARD_URL and access['admin']:
# Construct a URL to the external analytics dashboard
analytics_dashboard_url = '{0}/courses/{1}'.format(settings.ANALYTICS_DASHBOARD_URL, unicode(course_key))
link_start = "<a href=\"{}\" target=\"_blank\">".format(analytics_dashboard_url)