diff --git a/lms/djangoapps/instructor/views/api.py b/lms/djangoapps/instructor/views/api.py index f7a4c38c6e..55c5fcda3b 100644 --- a/lms/djangoapps/instructor/views/api.py +++ b/lms/djangoapps/instructor/views/api.py @@ -1107,13 +1107,15 @@ def get_students_features(request, course_id, csv=False): # pylint: disable=red else: try: 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 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}) except AlreadyRunningError: - 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.") + 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}) @@ -1232,13 +1234,15 @@ def get_enrollment_report(request, course_id): course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) try: instructor_task.api.submit_detailed_enrollment_features_csv(request, course_key) - success_status = _("Your detailed enrollment report is being generated! " - "You can view the status of the generation task in the 'Pending Tasks' section.") + success_status = _( + "Your detailed enrollment report is being generated! " + "You can view the status of the generation task in the 'Pending Tasks' section.") return JsonResponse({"status": success_status}) except AlreadyRunningError: - already_running_status = _("A detailed enrollment 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.") + already_running_status = _( + "A detailed enrollment 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 }) @@ -1255,8 +1259,9 @@ def get_exec_summary_report(request, course_id): course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) try: instructor_task.api.submit_executive_summary_report(request, course_key) - status_response = _("Your executive summary report is being created. " - "To view the status of the report, see the 'Pending Tasks' section.") + status_response = _( + "Your executive summary report is being created. " + "To view the status of the report, see the 'Pending Tasks' section.") except AlreadyRunningError: status_response = _( "An executive summary report is currently in progress. " @@ -2136,13 +2141,15 @@ def calculate_grades_csv(request, course_id): course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) try: instructor_task.api.submit_calculate_grades_csv(request, course_key) - success_status = _("Your grade report is being generated! " - "You can view the status of the generation task in the 'Pending Tasks' section.") + success_status = _( + "Your grade report is being generated! " + "You can view the status of the generation task in the 'Pending Tasks' section.") return JsonResponse({"status": success_status}) except AlreadyRunningError: - already_running_status = _("A grade 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.") + already_running_status = _( + "A grade 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 }) @@ -2162,13 +2169,15 @@ def problem_grade_report(request, course_id): course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) try: instructor_task.api.submit_problem_grade_report(request, course_key) - success_status = _("Your problem grade report is being generated! " - "You can view the status of the generation task in the 'Pending Tasks' section.") + success_status = _( + "Your problem grade report is being generated! " + "You can view the status of the generation task in the 'Pending Tasks' section.") return JsonResponse({"status": success_status}) except AlreadyRunningError: - already_running_status = _("A problem grade report is already being generated. " - "Check the 'Pending Tasks' table for the status of the task. " - "When completed, the report will be available for download in the table below.") + already_running_status = _( + "A problem grade report is already being generated. " + "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 })