Commit ced09a6b by Sarina Canelake

Switch default instructor dashboard to new dash

LMS-1296
parent d37006c6
...@@ -9,6 +9,10 @@ Studio: Add drag-and-drop support to the container page. STUD-1309. ...@@ -9,6 +9,10 @@ Studio: Add drag-and-drop support to the container page. STUD-1309.
Common: Add extensible third-party auth module. 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 Blades: Handle situation if no response were sent from XQueue to LMS in Matlab
problem after Run Code button press. BLD-994. problem after Run Code button press. BLD-994.
......
...@@ -79,7 +79,7 @@ def instructor_dashboard_2(request, course_id): ...@@ -79,7 +79,7 @@ def instructor_dashboard_2(request, course_id):
context = { context = {
'course': course, '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, 'studio_url': studio_url,
'sections': sections, 'sections': sections,
'disable_buttons': disable_buttons, 'disable_buttons': disable_buttons,
......
""" """
Instructor Views 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 from contextlib import contextmanager
import csv import csv
import json import json
...@@ -946,8 +949,7 @@ def instructor_dashboard(request, course_id): ...@@ -946,8 +949,7 @@ def instructor_dashboard(request, course_id):
'metrics_results': metrics_results, 'metrics_results': metrics_results,
} }
if settings.FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'): context['beta_dashboard_url'] = reverse('instructor_dashboard', kwargs={'course_id': course_id})
context['beta_dashboard_url'] = reverse('instructor_dashboard_2', kwargs={'course_id': course_id})
return render_to_response('courseware/instructor_dashboard.html', context) return render_to_response('courseware/instructor_dashboard.html', context)
......
...@@ -169,8 +169,8 @@ FEATURES = { ...@@ -169,8 +169,8 @@ FEATURES = {
# Enable instructor to assign individual due dates # Enable instructor to assign individual due dates
'INDIVIDUAL_DUE_DATES': False, 'INDIVIDUAL_DUE_DATES': False,
# Enable instructor dash beta version link # Enable legacy instructor dashboard
'ENABLE_INSTRUCTOR_BETA_DASHBOARD': True, 'ENABLE_INSTRUCTOR_LEGACY_DASHBOARD': True,
# Toggle to enable certificates of courses on dashboard # Toggle to enable certificates of courses on dashboard
'ENABLE_VERIFIED_CERTIFICATES': False, 'ENABLE_VERIFIED_CERTIFICATES': False,
......
...@@ -31,7 +31,7 @@ FEATURES['ENABLE_SERVICE_STATUS'] = True ...@@ -31,7 +31,7 @@ FEATURES['ENABLE_SERVICE_STATUS'] = True
FEATURES['ENABLE_INSTRUCTOR_EMAIL'] = True # Enable email for all Studio courses 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['REQUIRE_COURSE_EMAIL_AUTH'] = False # Give all courses email (don't require django-admin perms)
FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True
FEATURES['ENABLE_INSTRUCTOR_BETA_DASHBOARD'] = True FEATURES['ENABLE_INSTRUCTOR_LEGACY_DASHBOARD'] = True
FEATURES['MULTIPLE_ENROLLMENT_ROLES'] = True FEATURES['MULTIPLE_ENROLLMENT_ROLES'] = True
FEATURES['ENABLE_SHOPPING_CART'] = True FEATURES['ENABLE_SHOPPING_CART'] = True
FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True
......
...@@ -33,7 +33,7 @@ FEATURES['ENABLE_SERVICE_STATUS'] = True ...@@ -33,7 +33,7 @@ FEATURES['ENABLE_SERVICE_STATUS'] = True
FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True
FEATURES['ENABLE_INSTRUCTOR_BETA_DASHBOARD'] = True FEATURES['ENABLE_INSTRUCTOR_LEGACY_DASHBOARD'] = True
FEATURES['ENABLE_SHOPPING_CART'] = True FEATURES['ENABLE_SHOPPING_CART'] = True
......
## 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.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
...@@ -117,6 +120,13 @@ function goto( mode) ...@@ -117,6 +120,13 @@ function goto( mode)
<section class="container"> <section class="container">
<div class="instructor-dashboard-wrapper"> <div class="instructor-dashboard-wrapper">
<div class="beta-button-wrapper"><a href="${ beta_dashboard_url }">${_("Back To Standard Dashboard")}</a></div>
%if studio_url:
## not checking access because if user can see this, they are at least course staff (with studio edit access)
<div class="studio-edit-link"><a href="${studio_url}" target="_blank">${_('Edit Course In Studio')}</a></div>
%endif
<section class="instructor-dashboard-content" id="instructor-dashboard-content"> <section class="instructor-dashboard-content" id="instructor-dashboard-content">
<div class="wrap-instructor-info studio-view beta-button-wrapper"> <div class="wrap-instructor-info studio-view beta-button-wrapper">
%if studio_url: %if studio_url:
...@@ -129,6 +139,8 @@ function goto( mode) ...@@ -129,6 +139,8 @@ function goto( mode)
<h1>${_("Instructor Dashboard")}</h1> <h1>${_("Instructor Dashboard")}</h1>
# TODO put in a banner
<h2 class="navbar">[ <a href="#" onclick="goto('Grades');" class="${modeflag.get('Grades')}">Grades</a> | <h2 class="navbar">[ <a href="#" onclick="goto('Grades');" class="${modeflag.get('Grades')}">Grades</a> |
%if settings.FEATURES.get('ENABLE_PSYCHOMETRICS'): %if settings.FEATURES.get('ENABLE_PSYCHOMETRICS'):
<a href="#" onclick="goto('Psychometrics');" class="${modeflag.get('Psychometrics')}">${_("Psychometrics")}</a> | <a href="#" onclick="goto('Psychometrics');" class="${modeflag.get('Psychometrics')}">${_("Psychometrics")}</a> |
......
...@@ -53,35 +53,36 @@ ...@@ -53,35 +53,36 @@
<script language="JavaScript" type="text/javascript"></script> <script language="JavaScript" type="text/javascript"></script>
<section class="container"> <section class="container">
<div class="instructor-dashboard-wrapper-2"> <div class="instructor-dashboard-wrapper-2">
<section class="instructor-dashboard-content-2" id="instructor-dashboard-content"> <section class="instructor-dashboard-content-2" id="instructor-dashboard-content">
<div class="wrap-instructor-info studio-view"> <div class="wrap-instructor-info studio-view">
%if studio_url: %if studio_url:
<a class="instructor-info-action" href="${studio_url}">${_("View Course in Studio")}</a> <a class="instructor-info-action" href="${studio_url}">${_("View Course in Studio")}</a>
%endif %endif
<a class="instructor-info-action" href="${ old_dashboard_url }"> ${_("Back to Standard Dashboard")} </a> %if settings.FEATURES.get('ENABLE_INSTRUCTOR_LEGACY_DASHBOARD'):
</div> <a class="instructor-info-action" href="${ old_dashboard_url }"> ${_("Revert to Legacy Dashboard")} </a>
%endif
<h1>${_("Instructor Dashboard")}</h1> </div>
<hr />
## links which are tied to idash-sections below. <h1>${_("Instructor Dashboard")}</h1>
## the links are acativated and handled in instructor_dashboard.coffee <hr />
## when the javascript loads, it clicks on the first section ## links which are tied to idash-sections below.
<h2 class="instructor-nav"> ## the links are activated and handled in instructor_dashboard.coffee
% for section_data in sections: ## when the javascript loads, it clicks on the first section
<a href="" data-section="${ section_data['section_key'] }">${_(section_data['section_display_name'])}</a> <h2 class="instructor-nav">
% endfor % for section_data in sections:
</h2> <a href="" data-section="${ section_data['section_key'] }">${_(section_data['section_display_name'])}</a>
% endfor
## each section corresponds to a section_data sub-dictionary provided by the view </h2>
## to keep this short, sections can be pulled out into their own files
## each section corresponds to a section_data sub-dictionary provided by the view
% for section_data in sections: ## to keep this short, sections can be pulled out into their own files
<section id="${ section_data['section_key'] }" class="idash-section">
<%include file="${ section_data['section_key'] }.html" args="section_data=section_data" /> % for section_data in sections:
</section> <section id="${ section_data['section_key'] }" class="idash-section">
% endfor <%include file="${ section_data['section_key'] }.html" args="section_data=section_data" />
</section> </section>
</div> % endfor
</section>
</div>
</section> </section>
...@@ -269,15 +269,14 @@ if settings.COURSEWARE_ENABLED: ...@@ -269,15 +269,14 @@ if settings.COURSEWARE_ENABLED:
'courseware.views.progress', name="student_progress"), 'courseware.views.progress', name="student_progress"),
# For the instructor # For the instructor
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/instructor$', url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/instructor_dashboard$',
'instructor.views.legacy.instructor_dashboard', name="instructor_dashboard"), 'instructor.views.instructor_dashboard.instructor_dashboard_2', name="instructor_dashboard"),
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/instructor_dashboard/api/',
include('instructor.views.api_urls')),
# see ENABLE_INSTRUCTOR_BETA_DASHBOARD section for more urls # see ENABLE_INSTRUCTOR_LEGACY_DASHBOARD section for legacy dash urls
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/gradebook$', # Open Ended grading views
'instructor.views.legacy.gradebook', name='gradebook'),
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/grade_summary$',
'instructor.views.legacy.grade_summary', name='grade_summary'),
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/staff_grading$', url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/staff_grading$',
'open_ended_grading.views.staff_grading', name='staff_grading'), 'open_ended_grading.views.staff_grading', name='staff_grading'),
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/staff_grading/get_next$', url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/staff_grading/get_next$',
...@@ -364,13 +363,14 @@ if settings.COURSEWARE_ENABLED: ...@@ -364,13 +363,14 @@ if settings.COURSEWARE_ENABLED:
) )
if settings.COURSEWARE_ENABLED and settings.FEATURES.get('ENABLE_INSTRUCTOR_BETA_DASHBOARD'): if settings.COURSEWARE_ENABLED and settings.FEATURES.get('ENABLE_INSTRUCTOR_LEGACY_DASHBOARD'):
urlpatterns += ( urlpatterns += (
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/instructor_dashboard$', url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/gradebook$',
'instructor.views.instructor_dashboard.instructor_dashboard_2', name="instructor_dashboard_2"), 'instructor.views.legacy.gradebook', name='gradebook'),
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/grade_summary$',
url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/instructor_dashboard/api/', 'instructor.views.legacy.grade_summary', name='grade_summary'),
include('instructor.views.api_urls')) url(r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/instructor$',
'instructor.views.legacy.instructor_dashboard', name="instructor_dashboard_2"),
) )
if settings.FEATURES.get('CLASS_DASHBOARD'): if settings.FEATURES.get('CLASS_DASHBOARD'):
......
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