Commit 84f3c33d by Daniel Friedman Committed by Diana Huang

Address doc review

parent 67fdca18
...@@ -717,9 +717,9 @@ class DataDownloadPage(PageObject): ...@@ -717,9 +717,9 @@ class DataDownloadPage(PageObject):
return self.q(css='input[name=calculate-grades-csv]') return self.q(css='input[name=calculate-grades-csv]')
@property @property
def generate_weighted_problem_grade_report_button(self): def generate_problem_grade_report_button(self):
""" """
Returns the "Generate Weighted Problem Grade Report" button. Returns the "Generate Problem Grade Report" button.
""" """
return self.q(css='input[name=problem-grade-report]') return self.q(css='input[name=problem-grade-report]')
......
...@@ -387,20 +387,20 @@ class DataDownloadsTest(BaseInstructorDashboardTest): ...@@ -387,20 +387,20 @@ class DataDownloadsTest(BaseInstructorDashboardTest):
self.verify_report_requested_event(report_name) self.verify_report_requested_event(report_name)
self.verify_report_download(report_name) self.verify_report_download(report_name)
def test_weighted_problem_grade_report_download(self): def test_problem_grade_report_download(self):
""" """
Scenario: Verify that an instructor can download a weighted problem grade report Scenario: Verify that an instructor can download a problem grade report
Given that I am an instructor Given that I am an instructor
And I visit the instructor dashboard's "Data Downloads" tab And I visit the instructor dashboard's "Data Downloads" tab
And I click on the "Generate Weighted Problem Grade Report" button And I click on the "Generate Problem Grade Report" button
Then a report should be generated Then a report should be generated
And a report requested event should be emitted And a report requested event should be emitted
When I click on the report When I click on the report
Then a report downloaded event should be emitted Then a report downloaded event should be emitted
""" """
report_name = u"problem_grade_report" report_name = u"problem_grade_report"
self.data_download_section.generate_weighted_problem_grade_report_button.click() self.data_download_section.generate_problem_grade_report_button.click()
self.data_download_section.wait_for_available_report() self.data_download_section.wait_for_available_report()
self.verify_report_requested_event(report_name) self.verify_report_requested_event(report_name)
self.verify_report_download(report_name) self.verify_report_download(report_name)
...@@ -1956,7 +1956,7 @@ def calculate_grades_csv(request, course_id): ...@@ -1956,7 +1956,7 @@ def calculate_grades_csv(request, course_id):
@require_level('staff') @require_level('staff')
def problem_grade_report(request, course_id): def problem_grade_report(request, course_id):
""" """
Request a CSV showing students' weighted grades for all problems in the Request a CSV showing students' grades for all problems in the
course. course.
AlreadyRunningError is raised if the course's grades are already being AlreadyRunningError is raised if the course's grades are already being
...@@ -1965,13 +1965,11 @@ def problem_grade_report(request, course_id): ...@@ -1965,13 +1965,11 @@ def problem_grade_report(request, course_id):
course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id)
try: try:
instructor_task.api.submit_problem_grade_report(request, course_key) instructor_task.api.submit_problem_grade_report(request, course_key)
# TODO: verify copy with documentation team success_status = _("Your problem grade report is being generated! "
success_status = _("Your weighted problem 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 Instructor Tasks' section.")
return JsonResponse({"status": success_status}) return JsonResponse({"status": success_status})
except AlreadyRunningError: except AlreadyRunningError:
# TODO: verify copy with documentation team already_running_status = _("A problem grade report is already being generated. "
already_running_status = _("A weighted problem generation task is already in progress. "
"Check the 'Pending Instructor Tasks' table for the status of the task. " "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.") "When completed, the report will be available for download in the table below.")
return JsonResponse({ return JsonResponse({
......
...@@ -337,7 +337,7 @@ def submit_calculate_grades_csv(request, course_key): ...@@ -337,7 +337,7 @@ def submit_calculate_grades_csv(request, course_key):
def submit_problem_grade_report(request, course_key): def submit_problem_grade_report(request, course_key):
""" """
Submits a task to generate a CSV grade report containing weighted problem Submits a task to generate a CSV grade report containing problem
values. values.
""" """
task_type = 'grade_problems' task_type = 'grade_problems'
......
...@@ -159,7 +159,7 @@ def calculate_grades_csv(entry_id, xmodule_instance_args): ...@@ -159,7 +159,7 @@ def calculate_grades_csv(entry_id, xmodule_instance_args):
@task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable @task(base=BaseInstructorTask, routing_key=settings.GRADES_DOWNLOAD_ROUTING_KEY) # pylint: disable=not-callable
def calculate_problem_grade_report(entry_id, xmodule_instance_args): def calculate_problem_grade_report(entry_id, xmodule_instance_args):
""" """
Generate a CSV for a course containing all students' weighted problem Generate a CSV for a course containing all students' problem
grades and push the results to an S3 bucket for download. grades and push the results to an S3 bucket for download.
""" """
# Translators: This is a past-tense phrase that is inserted into task progress messages as {action}. # Translators: This is a past-tense phrase that is inserted into task progress messages as {action}.
......
...@@ -271,7 +271,7 @@ class TestInstructorGradeReport(TestReportMixin, InstructorTaskCourseTestCase): ...@@ -271,7 +271,7 @@ class TestInstructorGradeReport(TestReportMixin, InstructorTaskCourseTestCase):
class TestProblemGradeReport(TestReportMixin, InstructorTaskModuleTestCase): class TestProblemGradeReport(TestReportMixin, InstructorTaskModuleTestCase):
""" """
Test that the weighted problem CSV generation works. Test that the problem CSV generation works.
""" """
def setUp(self): def setUp(self):
super(TestProblemGradeReport, self).setUp() super(TestProblemGradeReport, self).setUp()
......
...@@ -112,7 +112,7 @@ class DataDownload ...@@ -112,7 +112,7 @@ class DataDownload
@onClickGradeDownload @$calculate_grades_csv_btn, gettext("Error generating grades. Please try again.") @onClickGradeDownload @$calculate_grades_csv_btn, gettext("Error generating grades. Please try again.")
@$problem_grade_report_csv_btn.click (e) => @$problem_grade_report_csv_btn.click (e) =>
@onClickGradeDownload @$problem_grade_report_csv_btn, gettext("Error generating weighted problem report. Please try again.") @onClickGradeDownload @$problem_grade_report_csv_btn, gettext("Error generating problem grade report. Please try again.")
onClickGradeDownload: (button, errorMessage) -> onClickGradeDownload: (button, errorMessage) ->
# Clear any CSS styling from the request-response areas # Clear any CSS styling from the request-response areas
......
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