Only show banner on legacy dash for edx.org

LMS-1296
This commit is contained in:
Sarina Canelake
2014-05-07 17:10:32 -04:00
parent b90f1e41e5
commit a5381db070
6 changed files with 19 additions and 11 deletions

View File

@@ -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();
});

View File

@@ -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;
}