Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
84f3c33d
Commit
84f3c33d
authored
May 11, 2015
by
Daniel Friedman
Committed by
Diana Huang
May 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address doc review
parent
67fdca18
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
15 deletions
+13
-15
common/test/acceptance/pages/lms/instructor_dashboard.py
+2
-2
common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
+4
-4
lms/djangoapps/instructor/views/api.py
+3
-5
lms/djangoapps/instructor_task/api.py
+1
-1
lms/djangoapps/instructor_task/tasks.py
+1
-1
lms/djangoapps/instructor_task/tests/test_tasks_helper.py
+1
-1
lms/static/coffee/src/instructor_dashboard/data_download.coffee
+1
-1
No files found.
common/test/acceptance/pages/lms/instructor_dashboard.py
View file @
84f3c33d
...
...
@@ -717,9 +717,9 @@ class DataDownloadPage(PageObject):
return
self
.
q
(
css
=
'input[name=calculate-grades-csv]'
)
@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]'
)
...
...
common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py
View file @
84f3c33d
...
...
@@ -387,20 +387,20 @@ class DataDownloadsTest(BaseInstructorDashboardTest):
self
.
verify_report_requested_event
(
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
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
And a report requested event should be emitted
When I click on the report
Then a report downloaded event should be emitted
"""
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
.
verify_report_requested_event
(
report_name
)
self
.
verify_report_download
(
report_name
)
lms/djangoapps/instructor/views/api.py
View file @
84f3c33d
...
...
@@ -1956,7 +1956,7 @@ def calculate_grades_csv(request, course_id):
@require_level
(
'staff'
)
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.
AlreadyRunningError is raised if the course's grades are already being
...
...
@@ -1965,13 +1965,11 @@ 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
)
# TODO: verify copy with documentation team
success_status
=
_
(
"Your weighted problem 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."
)
return
JsonResponse
({
"status"
:
success_status
})
except
AlreadyRunningError
:
# TODO: verify copy with documentation team
already_running_status
=
_
(
"A weighted problem generation task is already in progress. "
already_running_status
=
_
(
"A problem grade report is already being generated. "
"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."
)
return
JsonResponse
({
...
...
lms/djangoapps/instructor_task/api.py
View file @
84f3c33d
...
...
@@ -337,7 +337,7 @@ def submit_calculate_grades_csv(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.
"""
task_type
=
'grade_problems'
...
...
lms/djangoapps/instructor_task/tasks.py
View file @
84f3c33d
...
...
@@ -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
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.
"""
# Translators: This is a past-tense phrase that is inserted into task progress messages as {action}.
...
...
lms/djangoapps/instructor_task/tests/test_tasks_helper.py
View file @
84f3c33d
...
...
@@ -271,7 +271,7 @@ class TestInstructorGradeReport(TestReportMixin, InstructorTaskCourseTestCase):
class
TestProblemGradeReport
(
TestReportMixin
,
InstructorTaskModuleTestCase
):
"""
Test that the
weighted
problem CSV generation works.
Test that the problem CSV generation works.
"""
def
setUp
(
self
):
super
(
TestProblemGradeReport
,
self
)
.
setUp
()
...
...
lms/static/coffee/src/instructor_dashboard/data_download.coffee
View file @
84f3c33d
...
...
@@ -112,7 +112,7 @@ class DataDownload
@
onClickGradeDownload
@
$calculate_grades_csv_btn
,
gettext
(
"Error generating grades. Please try again."
)
@
$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
)
->
# Clear any CSS styling from the request-response areas
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment