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
3d8fe614
Commit
3d8fe614
authored
Jan 27, 2015
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6768 from edx/gprice/fix-video-upload-csv-bugs
Fix bugs in CSV download of video upload data
parents
9f872d39
715979d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
cms/djangoapps/contentstore/views/tests/test_videos.py
+3
-0
cms/djangoapps/contentstore/views/videos.py
+6
-2
No files found.
cms/djangoapps/contentstore/views/tests/test_videos.py
View file @
3d8fe614
...
...
@@ -347,7 +347,10 @@ class VideoUrlsCsvTestCase(VideoUploadTestMixin, CourseTestCase):
actual_video_ids
.
append
(
response_video
[
"Video ID"
])
original_video
=
self
.
_get_previous_upload
(
response_video
[
"Video ID"
])
self
.
assertEqual
(
response_video
[
"Name"
],
original_video
[
"client_video_id"
])
self
.
assertEqual
(
response_video
[
"Duration"
],
str
(
original_video
[
"duration"
]))
dateutil
.
parser
.
parse
(
response_video
[
"Date Added"
])
self
.
assertEqual
(
response_video
[
"Video ID"
],
original_video
[
"edx_video_id"
])
self
.
assertEqual
(
response_video
[
"Status"
],
StatusDisplayStrings
.
get
(
original_video
[
"status"
]))
for
profile
in
expected_profiles
:
response_profile_url
=
response_video
[
"{} URL"
.
format
(
profile
)]
original_encoded_for_profile
=
next
(
...
...
cms/djangoapps/contentstore/views/videos.py
View file @
3d8fe614
...
...
@@ -153,7 +153,7 @@ def video_encodings_download(request, course_key_string):
(
duration_col
,
duration_val
),
(
added_col
,
video
[
"created"
]
.
isoformat
()),
(
video_id_col
,
video
[
"edx_video_id"
]),
(
status_col
,
StatusDisplayStrings
.
get
(
video
[
"status"
])
),
(
status_col
,
video
[
"status"
]
),
]
+
[
(
get_profile_header
(
encoded_video
[
"profile"
]),
encoded_video
[
"url"
])
...
...
@@ -177,7 +177,11 @@ def video_encodings_download(request, course_key_string):
)
writer
=
csv
.
DictWriter
(
response
,
[
name_col
,
duration_col
,
added_col
,
video_id_col
,
status_col
]
+
profile_cols
,
[
col_name
.
encode
(
"utf-8"
)
for
col_name
in
[
name_col
,
duration_col
,
added_col
,
video_id_col
,
status_col
]
+
profile_cols
],
dialect
=
csv
.
excel
)
writer
.
writeheader
()
...
...
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