From ced09a6b04efb05c52b453b05b16c58ba23d000d Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Fri, 7 Mar 2014 14:13:12 -0500 Subject: [PATCH 1/7] Switch default instructor dashboard to new dash LMS-1296 --- CHANGELOG.rst | 4 ++ .../instructor/views/instructor_dashboard.py | 2 +- lms/djangoapps/instructor/views/legacy.py | 6 +- lms/envs/common.py | 4 +- lms/envs/dev.py | 2 +- lms/envs/test.py | 2 +- .../courseware/instructor_dashboard.html | 12 ++++ .../instructor_dashboard_2.html | 61 ++++++++++--------- lms/urls.py | 26 ++++---- 9 files changed, 69 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 79de8c09f4..6f004b9657 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,10 @@ Studio: Add drag-and-drop support to the container page. STUD-1309. Common: Add extensible third-party auth module. +LMS: Switch default instructor dashboard to the new (formerly "beta") + instructor dashboard. Puts the old (now "legacy") dash behind a feature flag. + LMS-1296 + Blades: Handle situation if no response were sent from XQueue to LMS in Matlab problem after Run Code button press. BLD-994. diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index ed9520420b..774bc2cf19 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -79,7 +79,7 @@ def instructor_dashboard_2(request, course_id): context = { 'course': course, - 'old_dashboard_url': reverse('instructor_dashboard', kwargs={'course_id': course_id}), + 'old_dashboard_url': reverse('instructor_dashboard_2', kwargs={'course_id': course_id}), 'studio_url': studio_url, 'sections': sections, 'disable_buttons': disable_buttons, diff --git a/lms/djangoapps/instructor/views/legacy.py b/lms/djangoapps/instructor/views/legacy.py index 7f62501a12..45ecc746ca 100644 --- a/lms/djangoapps/instructor/views/legacy.py +++ b/lms/djangoapps/instructor/views/legacy.py @@ -1,6 +1,9 @@ """ Instructor Views """ +## NOTE: This is the code for the legacy instructor dashboard +## We are no longer supporting this file or accepting changes into it. + from contextlib import contextmanager import csv import json @@ -946,8 +949,7 @@ def instructor_dashboard(request, course_id): 'metrics_results': metrics_results, } - if settings.FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'): - context['beta_dashboard_url'] = reverse('instructor_dashboard_2', kwargs={'course_id': course_id}) + context['beta_dashboard_url'] = reverse('instructor_dashboard', kwargs={'course_id': course_id}) return render_to_response('courseware/instructor_dashboard.html', context) diff --git a/lms/envs/common.py b/lms/envs/common.py index 884e5d874b..4b4099f440 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -169,8 +169,8 @@ FEATURES = { # Enable instructor to assign individual due dates 'INDIVIDUAL_DUE_DATES': False, - # Enable instructor dash beta version link - 'ENABLE_INSTRUCTOR_BETA_DASHBOARD': True, + # Enable legacy instructor dashboard + 'ENABLE_INSTRUCTOR_LEGACY_DASHBOARD': True, # Toggle to enable certificates of courses on dashboard 'ENABLE_VERIFIED_CERTIFICATES': False, diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 4a2b9517e0..c5f07693f9 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -31,7 +31,7 @@ FEATURES['ENABLE_SERVICE_STATUS'] = True FEATURES['ENABLE_INSTRUCTOR_EMAIL'] = True # Enable email for all Studio courses FEATURES['REQUIRE_COURSE_EMAIL_AUTH'] = False # Give all courses email (don't require django-admin perms) FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True -FEATURES['ENABLE_INSTRUCTOR_BETA_DASHBOARD'] = True +FEATURES['ENABLE_INSTRUCTOR_LEGACY_DASHBOARD'] = True FEATURES['MULTIPLE_ENROLLMENT_ROLES'] = True FEATURES['ENABLE_SHOPPING_CART'] = True FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True diff --git a/lms/envs/test.py b/lms/envs/test.py index edaa4c7c45..110e7a48f6 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -33,7 +33,7 @@ FEATURES['ENABLE_SERVICE_STATUS'] = True FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True -FEATURES['ENABLE_INSTRUCTOR_BETA_DASHBOARD'] = True +FEATURES['ENABLE_INSTRUCTOR_LEGACY_DASHBOARD'] = True FEATURES['ENABLE_SHOPPING_CART'] = True diff --git a/lms/templates/courseware/instructor_dashboard.html b/lms/templates/courseware/instructor_dashboard.html index f80a94644a..cf549338f3 100644 --- a/lms/templates/courseware/instructor_dashboard.html +++ b/lms/templates/courseware/instructor_dashboard.html @@ -1,3 +1,6 @@ +## NOTE: This is the template for the legacy instructor dashboard +## We are no longer supporting this file or accepting changes into it. + <%! from django.utils.translation import ugettext as _ %> <%! from django.core.urlresolvers import reverse %> @@ -117,6 +120,13 @@ function goto( mode)
+ + + %if studio_url: + ## not checking access because if user can see this, they are at least course staff (with studio edit access) + + %endif +
%if studio_url: @@ -129,6 +139,8 @@ function goto( mode)

${_("Instructor Dashboard")}

+ # TODO put in a banner +