diff --git a/lms/envs/common.py b/lms/envs/common.py index 4b4099f440..c0dbab529f 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -171,6 +171,8 @@ FEATURES = { # Enable legacy instructor dashboard 'ENABLE_INSTRUCTOR_LEGACY_DASHBOARD': True, + # Is this an edX-owned domain? (used on instructor dashboard) + 'IS_EDX_DOMAIN': False, # 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 c5f07693f9..e1c68d92e4 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -36,6 +36,8 @@ FEATURES['MULTIPLE_ENROLLMENT_ROLES'] = True FEATURES['ENABLE_SHOPPING_CART'] = True FEATURES['AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'] = True FEATURES['ENABLE_S3_GRADE_DOWNLOADS'] = True +FEATURES['IS_EDX_DOMAIN'] = True # Is this an edX-owned domain? (used on instructor dashboard) + FEEDBACK_SUBMISSION_EMAIL = "dummy@example.com" diff --git a/lms/static/js/spec/staff_debug_actions_spec.js b/lms/static/js/spec/staff_debug_actions_spec.js index 347dd6d584..1a6a6a9691 100644 --- a/lms/static/js/spec/staff_debug_actions_spec.js +++ b/lms/static/js/spec/staff_debug_actions_spec.js @@ -6,7 +6,7 @@ describe('StaffDebugActions', function() { describe('get_url ', function() { it('defines url to courseware ajax entry point', function() { spyOn(StaffDebug, "get_current_url").andReturn("/courses/edX/Open_DemoX/edx_demo_course/courseware/stuff"); - expect(StaffDebug.get_url('rescore_problem')).toBe('/courses/edX/Open_DemoX/edx_demo_course/instructor_dashboard/api/rescore_problem'); + expect(StaffDebug.get_url('rescore_problem')).toBe('/courses/edX/Open_DemoX/edx_demo_course/instructor/api/rescore_problem'); }); }); @@ -40,7 +40,7 @@ describe('StaffDebugActions', function() { 'delete_module': false }); expect($.ajax.mostRecentCall.args[0]['url']).toEqual( - '/instructor_dashboard/api/reset_student_attempts' + '/instructor/api/reset_student_attempts' ); $('#' + fixture_id).remove(); }); @@ -59,7 +59,7 @@ describe('StaffDebugActions', function() { 'delete_module': true }); expect($.ajax.mostRecentCall.args[0]['url']).toEqual( - '/instructor_dashboard/api/reset_student_attempts' + '/instructor/api/reset_student_attempts' ); $('#' + fixture_id).remove(); @@ -79,7 +79,7 @@ describe('StaffDebugActions', function() { 'delete_module': false }); expect($.ajax.mostRecentCall.args[0]['url']).toEqual( - '/instructor_dashboard/api/rescore_problem' + '/instructor/api/rescore_problem' ); $('#' + fixture_id).remove(); }); diff --git a/lms/static/js/staff_debug_actions.js b/lms/static/js/staff_debug_actions.js index cf5bc85495..fb602a2388 100644 --- a/lms/static/js/staff_debug_actions.js +++ b/lms/static/js/staff_debug_actions.js @@ -7,7 +7,7 @@ var StaffDebug = (function(){ get_url = function(action){ var pathname = this.get_current_url(); - var url = pathname.substr(0,pathname.indexOf('/courseware')) + '/instructor_dashboard/api/' + action; + var url = pathname.substr(0,pathname.indexOf('/courseware')) + '/instructor/api/' + action; return url; } diff --git a/lms/templates/courseware/instructor_dashboard.html b/lms/templates/courseware/instructor_dashboard.html index c20da8d477..6ed4f90e02 100644 --- a/lms/templates/courseware/instructor_dashboard.html +++ b/lms/templates/courseware/instructor_dashboard.html @@ -1,5 +1,6 @@ -## NOTE: This is the template for the legacy instructor dashboard -## We are no longer supporting this file or accepting changes into it. +## NOTE: This is the template for the LEGACY instructor dashboard ## +## We are no longer supporting this file or accepting changes into it. ## +## Please see lms/templates/instructor for instructor dashboard templates ## <%! from django.utils.translation import ugettext as _ %> <%! from django.core.urlresolvers import reverse %> @@ -125,15 +126,18 @@ function goto( mode) %if studio_url: ${_("View Course in Studio")} %endif - ${_("Back To Standard Dashboard")} + ${_("Back To Instructor Dashboard")}

${_("Instructor Dashboard")}

+ %if settings.FEATURES.get('IS_EDX_DOMAIN', False): + ## Only show this banner on the edx.org website (other sites may choose to show this if they wish)
-

${_("You are using the legacy instructor dashboard, which we will retire in the near future.")} ${_("Return to the Standard Dashboard")}

-

${_("If the Standard Dashboard is missing functionality, please let us know.")}

+

${_("You are using the legacy instructor dashboard, which we will retire in the near future.")} ${_("Return to the Instructor Dashboard")}

+

${_("If the Instructor Dashboard is missing functionality, please contact your PM to let us know.")}

+ %endif

${_("Instructor Dashboard")}

-

${_("We've changed the look and feel of the Instructor Dashboard. During this transition time, you can still access the old Instructor Dashboard by clicking the 'Revert to Legacy Dashboard' button in the top right hand corner.")}

+

${_("We've changed the look and feel of the Instructor Dashboard. During this transition time, you can still access the old Instructor Dashboard by clicking the 'Revert to Legacy Dashboard' button above.")}

## links which are tied to idash-sections below.