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
40c1090c
Commit
40c1090c
authored
Mar 11, 2014
by
polesye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload files explicitly in tests.
parent
ddf41ce9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
lms/djangoapps/courseware/features/video.feature
+22
-7
lms/djangoapps/courseware/features/video.py
+0
-14
No files found.
lms/djangoapps/courseware/features/video.feature
View file @
40c1090c
...
...
@@ -81,8 +81,11 @@ Feature: LMS Video component
# 10
Scenario
:
Language menu works correctly in Video component
Given the course has a Video component in Youtube mode
:
|
transcripts
|
sub
|
Given
I am registered for the course
"test_course"
And
I have a
"chinese_transcripts.srt"
transcript file in assets
And
I have a
"subs_OEoXaMPEzfM.srt.sjson"
transcript file in assets
And it has a video in "Youtube" mode
:
|
transcripts
|
sub
|
|
{"zh":
"chinese_transcripts.srt"}
|
OEoXaMPEzfM
|
And
I make sure captions are closed
And
I see video menu
"language"
with correct items
...
...
@@ -93,7 +96,9 @@ Feature: LMS Video component
# 11
Scenario
:
CC button works correctly w/o english transcript in HTML5 mode of Video component
Given the course has a Video component in HTML5 mode
:
Given
I am registered for the course
"test_course"
And
I have a
"chinese_transcripts.srt"
transcript file in assets
And it has a video in "HTML5" mode
:
|
transcripts
|
|
{"zh":
"chinese_transcripts.srt"}
|
And
I make sure captions are opened
...
...
@@ -111,7 +116,9 @@ Feature: LMS Video component
# 13
Scenario
:
CC button works correctly w/o english transcript in Youtube mode of Video component
Given the course has a Video component in Youtube mode
:
Given
I am registered for the course
"test_course"
And
I have a
"chinese_transcripts.srt"
transcript file in assets
And it has a video in "Youtube" mode
:
|
transcripts
|
|
{"zh":
"chinese_transcripts.srt"}
|
And
I make sure captions are opened
...
...
@@ -132,7 +139,9 @@ Feature: LMS Video component
# 16
Scenario
:
Video is aligned correctly if transcript is visible in fullscreen mode
Given the course has a Video component in HTML5 mode
:
Given
I am registered for the course
"test_course"
And
I have a
"subs_OEoXaMPEzfM.srt.sjson"
transcript file in assets
And it has a video in "HTML5" mode
:
|
sub
|
|
OEoXaMPEzfM
|
And
I make sure captions are opened
...
...
@@ -147,7 +156,9 @@ Feature: LMS Video component
# 18
Scenario
:
Video is aligned correctly on transcript toggle in fullscreen mode
Given the course has a Video component in Youtube mode
:
Given
I am registered for the course
"test_course"
And
I have a
"subs_OEoXaMPEzfM.srt.sjson"
transcript file in assets
And it has a video in "Youtube" mode
:
|
sub
|
|
OEoXaMPEzfM
|
And
I make sure captions are opened
...
...
@@ -159,6 +170,7 @@ Feature: LMS Video component
# 19
Scenario
:
Download Transcript button works correctly in Video component
Given
I am registered for the course
"test_course"
And
I have a
"subs_OEoXaMPEzfM.srt.sjson"
transcript file in assets
And it has a video "A" in "Youtube" mode in position "1" of sequential
:
|
sub
|
download_track
|
|
OEoXaMPEzfM
|
true
|
...
...
@@ -179,7 +191,10 @@ Feature: LMS Video component
# 20
Scenario
:
Youtube video has correct transcript if fields for other speeds are filled.
Given the course has a Video component in Youtube mode
:
Given
I am registered for the course
"test_course"
And
I have a
"subs_OEoXaMPEzfM.srt.sjson"
transcript file in assets
And
I have a
"subs_b7xgknqkQk8.srt.sjson"
transcript file in assets
And it has a video in "Youtube" mode
:
|
sub
|
youtube_id_1_5
|
|
OEoXaMPEzfM
|
b7xgknqkQk8
|
And
I make sure captions are opened
...
...
lms/djangoapps/courseware/features/video.py
View file @
40c1090c
...
...
@@ -95,8 +95,6 @@ def add_video_to_course(course, player_mode, hashes, display_name='Video'):
'metadata'
:
{},
}
course_location
=
world
.
scenario_dict
[
'COURSE'
]
.
location
if
hashes
:
kwargs
[
'metadata'
]
.
update
(
hashes
[
0
])
...
...
@@ -135,18 +133,6 @@ def add_video_to_course(course, player_mode, hashes, display_name='Video'):
'html5_sources'
:
HTML5_SOURCES_INCORRECT
})
if
kwargs
[
'metadata'
]
.
get
(
'sub'
):
filename
=
_get_sjson_filename
(
kwargs
[
'metadata'
][
'sub'
],
'en'
)
_upload_file
(
filename
,
course_location
)
if
kwargs
[
'metadata'
]
.
get
(
'transcripts'
):
for
lang
,
filename
in
kwargs
[
'metadata'
][
'transcripts'
]
.
items
():
_upload_file
(
filename
,
course_location
)
if
kwargs
[
'metadata'
]
.
get
(
'youtube_id_1_5'
):
filename
=
_get_sjson_filename
(
kwargs
[
'metadata'
][
'youtube_id_1_5'
],
'en'
)
_upload_file
(
filename
,
course_location
)
world
.
scenario_dict
[
'VIDEO'
]
=
world
.
ItemFactory
.
create
(
**
kwargs
)
...
...
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