@@ -215,6 +225,7 @@ class TestInstructorAPIDenyLevels(ModuleStoreTestCase, LoginEnrollmentTestCase):
('get_students_features',{}),
('get_enrollment_report',{}),
('get_students_who_may_enroll',{}),
('get_exec_summary_report',{}),
]
# Endpoints that only Instructors can access
self.instructor_level_endpoints=[
...
...
@@ -2544,9 +2555,36 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa
success_status="Your {report_type} report is being generated! You can view the status of the generation task in the 'Pending Instructor Tasks' section.".format(report_type=report_type)
@@ -2555,7 +2593,11 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa
withpatch(task_api_endpoint)asmock:
mock.side_effect=AlreadyRunningError()
response=self.client.get(url,{})
already_running_status="{report_type} report generation task is already in progress. Check the 'Pending Instructor Tasks' table for the status of the task. When completed, the report will be available for download in the table below.".format(report_type=report_type)
already_running_status="An {report_type} report is currently in progress." \
" To view the status of the report, see the 'Pending Instructor Tasks' section." \
" When completed, the report will be available for download in the table below." \
" You will be able to download the" \
" report when it is complete.".format(report_type=report_type)
$('#enrollment-report-request-response-error').text(gettext('There was a problem creating the report. Select "Create Executive Summary" to try again.'));
$('#exec-summary-report-request-response-error').text(gettext('There was a problem creating the report. Select "Create Executive Summary" to try again.'));