Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-val
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-val
Commits
fc36990a
Unverified
Commit
fc36990a
authored
Mar 06, 2018
by
Mushtaq Ali
Committed by
GitHub
Mar 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #132 from edx/mushtaq/fix-no-transcript-file
Fix transcript has no file attached to it
parents
29e9063c
7e74f88e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
edxval/api.py
+10
-5
No files found.
edxval/api.py
View file @
fc36990a
...
@@ -843,11 +843,16 @@ def create_trancript_file(video_id, language_code, file_format, resource_fs, sta
...
@@ -843,11 +843,16 @@ def create_trancript_file(video_id, language_code, file_format, resource_fs, sta
language_code
=
language_code
,
language_code
=
language_code
,
file_format
=
file_format
file_format
=
file_format
)
)
transcript_data
=
get_video_transcript_data
(
video_id
,
language_code
)
try
:
if
transcript_data
:
transcript_data
=
get_video_transcript_data
(
video_id
,
language_code
)
transcript_content
=
transcript_data
[
'content'
]
if
transcript_data
:
with
resource_fs
.
open
(
transcript_name
,
'wb'
)
as
f
:
transcript_content
=
transcript_data
[
'content'
]
f
.
write
(
transcript_content
)
with
resource_fs
.
open
(
transcript_name
,
'wb'
)
as
f
:
f
.
write
(
transcript_content
)
except
Exception
:
# Do not raise exception in case no transcript file is found for now.
# TODO: Remove this - EDUCATOR-2173
pass
def
create_transcripts_xml
(
video_id
,
video_el
,
resource_fs
,
static_dir
):
def
create_transcripts_xml
(
video_id
,
video_el
,
resource_fs
,
static_dir
):
...
...
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