Commit e473022c by Alison Hodges

Additional references to "Pending Instructor Tasks" changed

parent 473b43cb
...@@ -90,7 +90,7 @@ def click_a_button(step, button): # pylint: disable=unused-argument ...@@ -90,7 +90,7 @@ def click_a_button(step, button): # pylint: disable=unused-argument
world.css_click('input[name="calculate-grades-csv"]') world.css_click('input[name="calculate-grades-csv"]')
# Expect to see a message that grade report is being generated # Expect to see a message that grade report is being generated
expected_msg = "Your grade report is being generated! You can view the status of the generation task in the 'Pending Instructor Tasks' section." expected_msg = "Your grade report is being generated! You can view the status of the generation task in the 'Pending Tasks' section."
world.wait_for_visible('#report-request-response') world.wait_for_visible('#report-request-response')
assert_in( assert_in(
expected_msg, world.css_text('#report-request-response'), expected_msg, world.css_text('#report-request-response'),
......
...@@ -2553,7 +2553,7 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa ...@@ -2553,7 +2553,7 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa
CourseFinanceAdminRole(self.course.id).add_users(self.instructor) CourseFinanceAdminRole(self.course.id).add_users(self.instructor)
with patch(task_api_endpoint): with patch(task_api_endpoint):
response = self.client.get(url, {}) response = self.client.get(url, {})
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) success_status = "Your {report_type} report is being generated! You can view the status of the generation task in the 'Pending Tasks' section.".format(report_type=report_type)
self.assertIn(success_status, response.content) self.assertIn(success_status, response.content)
@ddt.data(*EXECUTIVE_SUMMARY_DATA) @ddt.data(*EXECUTIVE_SUMMARY_DATA)
...@@ -2573,7 +2573,7 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa ...@@ -2573,7 +2573,7 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa
with patch(task_api_endpoint): with patch(task_api_endpoint):
response = self.client.get(url, {}) response = self.client.get(url, {})
success_status = "Your {report_type} report is being created." \ success_status = "Your {report_type} report is being created." \
" To view the status of the report, see the 'Pending Instructor Tasks'" \ " To view the status of the report, see the 'Pending Tasks'" \
" section.".format(report_type=report_type) " section.".format(report_type=report_type)
self.assertIn(success_status, response.content) self.assertIn(success_status, response.content)
...@@ -2595,7 +2595,7 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa ...@@ -2595,7 +2595,7 @@ class TestInstructorAPILevelsDataDump(ModuleStoreTestCase, LoginEnrollmentTestCa
mock.side_effect = AlreadyRunningError() mock.side_effect = AlreadyRunningError()
response = self.client.get(url, {}) response = self.client.get(url, {})
already_running_status = "An {report_type} report is currently in progress." \ already_running_status = "An {report_type} report is currently in progress." \
" To view the status of the report, see the 'Pending Instructor Tasks' section." \ " To view the status of the report, see the 'Pending Tasks' section." \
" When completed, the report will be available for download in the table below." \ " When completed, the report will be available for download in the table below." \
" You will be able to download the" \ " You will be able to download the" \
" report when it is complete.".format(report_type=report_type) " report when it is complete.".format(report_type=report_type)
......
...@@ -1107,10 +1107,10 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=red ...@@ -1107,10 +1107,10 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=red
else: else:
try: try:
instructor_task.api.submit_calculate_students_features_csv(request, course_key, query_features) instructor_task.api.submit_calculate_students_features_csv(request, course_key, query_features)
success_status = _("Your enrolled student profile report is being generated! You can view the status of the generation task in the 'Pending Instructor Tasks' section.") success_status = _("Your enrolled student profile report is being generated! You can view the status of the generation task in the 'Pending Tasks' section.")
return JsonResponse({"status": success_status}) return JsonResponse({"status": success_status})
except AlreadyRunningError: except AlreadyRunningError:
already_running_status = _("An enrolled student profile 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.") already_running_status = _("An enrolled student profile report generation task is already in progress. Check the 'Pending Tasks' table for the status of the task. When completed, the report will be available for download in the table below.")
return JsonResponse({"status": already_running_status}) return JsonResponse({"status": already_running_status})
...@@ -1132,13 +1132,13 @@ def get_students_who_may_enroll(request, course_id): ...@@ -1132,13 +1132,13 @@ def get_students_who_may_enroll(request, course_id):
instructor_task.api.submit_calculate_may_enroll_csv(request, course_key, query_features) instructor_task.api.submit_calculate_may_enroll_csv(request, course_key, query_features)
success_status = _( success_status = _(
"Your students who may enroll report is being generated! " "Your students who may enroll report is being generated! "
"You can view the status of the generation task in the 'Pending Instructor Tasks' section." "You can view the status of the generation task in the 'Pending Tasks' section."
) )
return JsonResponse({"status": success_status}) return JsonResponse({"status": success_status})
except AlreadyRunningError: except AlreadyRunningError:
already_running_status = _( already_running_status = _(
"A students who may enroll report generation task is already in progress. " "A students who may enroll report generation task is already in progress. "
"Check the 'Pending Instructor Tasks' table for the status of the task. " "Check the 'Pending Tasks' table for the status of the task. "
"When completed, the report will be available for download in the table below." "When completed, the report will be available for download in the table below."
) )
return JsonResponse({"status": already_running_status}) return JsonResponse({"status": already_running_status})
...@@ -1230,11 +1230,11 @@ def get_enrollment_report(request, course_id): ...@@ -1230,11 +1230,11 @@ def get_enrollment_report(request, course_id):
try: try:
instructor_task.api.submit_detailed_enrollment_features_csv(request, course_key) instructor_task.api.submit_detailed_enrollment_features_csv(request, course_key)
success_status = _("Your detailed enrollment report is being generated! " success_status = _("Your detailed enrollment report is being generated! "
"You can view the status of the generation task in the 'Pending Instructor Tasks' section.") "You can view the status of the generation task in the 'Pending Tasks' section.")
return JsonResponse({"status": success_status}) return JsonResponse({"status": success_status})
except AlreadyRunningError: except AlreadyRunningError:
already_running_status = _("A detailed enrollment report generation task is already in progress. " already_running_status = _("A detailed enrollment report generation task is already in progress. "
"Check the 'Pending Instructor Tasks' table for the status of the task. " "Check the 'Pending Tasks' table for the status of the task. "
"When completed, the report will be available for download in the table below.") "When completed, the report will be available for download in the table below.")
return JsonResponse({ return JsonResponse({
"status": already_running_status "status": already_running_status
...@@ -1253,11 +1253,11 @@ def get_exec_summary_report(request, course_id): ...@@ -1253,11 +1253,11 @@ def get_exec_summary_report(request, course_id):
try: try:
instructor_task.api.submit_executive_summary_report(request, course_key) instructor_task.api.submit_executive_summary_report(request, course_key)
status_response = _("Your executive summary report is being created. " status_response = _("Your executive summary report is being created. "
"To view the status of the report, see the 'Pending Instructor Tasks' section.") "To view the status of the report, see the 'Pending Tasks' section.")
except AlreadyRunningError: except AlreadyRunningError:
status_response = _( status_response = _(
"An executive summary report is currently in progress. " "An executive summary report is currently in progress. "
"To view the status of the report, see the 'Pending Instructor Tasks' section. " "To view the status of the report, see the 'Pending Tasks' section. "
"When completed, the report will be available for download in the table below. " "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." "You will be able to download the report when it is complete."
) )
...@@ -2134,11 +2134,11 @@ def calculate_grades_csv(request, course_id): ...@@ -2134,11 +2134,11 @@ def calculate_grades_csv(request, course_id):
try: try:
instructor_task.api.submit_calculate_grades_csv(request, course_key) instructor_task.api.submit_calculate_grades_csv(request, course_key)
success_status = _("Your grade report is being generated! " success_status = _("Your grade report is being generated! "
"You can view the status of the generation task in the 'Pending Instructor Tasks' section.") "You can view the status of the generation task in the 'Pending Tasks' section.")
return JsonResponse({"status": success_status}) return JsonResponse({"status": success_status})
except AlreadyRunningError: except AlreadyRunningError:
already_running_status = _("A grade report generation task is already in progress. " already_running_status = _("A grade report generation task is already in progress. "
"Check the 'Pending Instructor Tasks' table for the status of the task. " "Check the 'Pending Tasks' table for the status of the task. "
"When completed, the report will be available for download in the table below.") "When completed, the report will be available for download in the table below.")
return JsonResponse({ return JsonResponse({
"status": already_running_status "status": already_running_status
...@@ -2160,11 +2160,11 @@ def problem_grade_report(request, course_id): ...@@ -2160,11 +2160,11 @@ def problem_grade_report(request, course_id):
try: try:
instructor_task.api.submit_problem_grade_report(request, course_key) instructor_task.api.submit_problem_grade_report(request, course_key)
success_status = _("Your problem grade report is being generated! " success_status = _("Your problem grade report is being generated! "
"You can view the status of the generation task in the 'Pending Instructor Tasks' section.") "You can view the status of the generation task in the 'Pending Tasks' section.")
return JsonResponse({"status": success_status}) return JsonResponse({"status": success_status})
except AlreadyRunningError: except AlreadyRunningError:
already_running_status = _("A problem grade report is already being generated. " already_running_status = _("A problem grade report is already being generated. "
"Check the 'Pending Instructor Tasks' table for the status of the task. " "Check the 'Pending Tasks' table for the status of the task. "
"When completed, the report will be available for download in the table below.") "When completed, the report will be available for download in the table below.")
return JsonResponse({ return JsonResponse({
"status": already_running_status "status": already_running_status
......
...@@ -292,12 +292,12 @@ class @PendingInstructorTasks ...@@ -292,12 +292,12 @@ class @PendingInstructorTasks
@$no_tasks_message.hide() @$no_tasks_message.hide()
@$running_tasks_section.show() @$running_tasks_section.show()
else else
console.log "No pending instructor tasks to display" console.log "No pending tasks to display"
@$running_tasks_section.hide() @$running_tasks_section.hide()
@$no_tasks_message.empty() @$no_tasks_message.empty()
@$no_tasks_message.append $('<p>').text gettext("No tasks currently running.") @$no_tasks_message.append $('<p>').text gettext("No tasks currently running.")
@$no_tasks_message.show() @$no_tasks_message.show()
error: std_ajax_err => console.error "Error finding pending instructor tasks to display" error: std_ajax_err => console.error "Error finding pending tasks to display"
### /Pending Instructor Tasks Section #### ### /Pending Instructor Tasks Section ####
class KeywordValidator class KeywordValidator
......
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