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
b87634d8
Commit
b87634d8
authored
Oct 22, 2015
by
Peter Pinch
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10268 from mitocw/fix/pdw/download-ccx-csv
Fix CCX grades csv file download
parents
d4f2fe12
5562f8ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
AUTHORS
+2
-2
lms/djangoapps/ccx/tests/test_views.py
+6
-0
lms/djangoapps/ccx/views.py
+4
-1
No files found.
AUTHORS
View file @
b87634d8
...
...
@@ -247,4 +247,5 @@ George Schneeloch <gschneel@mit.edu>
Dustin Gadal <Dustin.Gadal@gmail.com>
Robert Raposa <rraposa@edx.org>
Giovanni Di Milia <gdimilia@mit.edu>
Justin Abrahms <abrahms@mit.edu>
\ No newline at end of file
Peter Wilkins <pwilkins@mit.edu>
Justin Abrahms <abrahms@mit.edu>
lms/djangoapps/ccx/tests/test_views.py
View file @
b87634d8
...
...
@@ -733,6 +733,12 @@ class TestCCXGrades(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
)
response
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
# Are the grades downloaded as an attachment?
self
.
assertEqual
(
response
[
'content-disposition'
],
'attachment'
)
headers
,
row
=
(
row
.
strip
()
.
split
(
','
)
for
row
in
response
.
content
.
strip
()
.
split
(
'
\n
'
)
...
...
lms/djangoapps/ccx/views.py
View file @
b87634d8
...
...
@@ -615,4 +615,7 @@ def ccx_grades_csv(request, course, ccx=None):
for
row
in
rows
:
writer
.
writerow
(
row
)
return
HttpResponse
(
buf
.
getvalue
(),
content_type
=
'text/plain'
)
response
=
HttpResponse
(
buf
.
getvalue
(),
content_type
=
'text/csv'
)
response
[
'Content-Disposition'
]
=
'attachment'
return
response
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