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
dc13bbe1
Commit
dc13bbe1
authored
May 07, 2015
by
Syed Hassan Raza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove table of contents
parent
3b9c13e0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
common/lib/xmodule/xmodule/video_module/video_module.py
+0
-3
common/test/acceptance/tests/video/test_studio_video_editor.py
+4
-4
No files found.
common/lib/xmodule/xmodule/video_module/video_module.py
View file @
dc13bbe1
...
...
@@ -179,8 +179,6 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers,
# OrderedDict for easy testing of rendered context in tests
sorted_languages
=
sorted
(
languages
.
items
(),
key
=
itemgetter
(
1
))
if
'table'
in
other_lang
:
sorted_languages
.
insert
(
0
,
(
'table'
,
'Table of Contents'
))
sorted_languages
=
OrderedDict
(
sorted_languages
)
return
track_url
,
transcript_language
,
sorted_languages
...
...
@@ -442,7 +440,6 @@ class VideoDescriptor(VideoFields, VideoTranscriptsMixin, VideoStudioViewHandler
languages
=
[{
'label'
:
label
,
'code'
:
lang
}
for
lang
,
label
in
settings
.
ALL_LANGUAGES
if
lang
!=
u'en'
]
languages
.
sort
(
key
=
lambda
l
:
l
[
'label'
])
languages
.
insert
(
0
,
{
'label'
:
'Table of Contents'
,
'code'
:
'table'
})
editable_fields
[
'transcripts'
][
'languages'
]
=
languages
editable_fields
[
'transcripts'
][
'type'
]
=
'VideoTranslations'
editable_fields
[
'transcripts'
][
'urlRoot'
]
=
self
.
runtime
.
handler_url
(
self
,
'studio_transcript'
,
'translation'
)
.
rstrip
(
'/?'
)
...
...
common/test/acceptance/tests/video/test_studio_video_editor.py
View file @
dc13bbe1
...
...
@@ -464,7 +464,7 @@ class VideoEditorTest(CMSVideoBaseTest):
def
test_table_of_contents
(
self
):
"""
Scenario: User can see
table of content
at the first position
Scenario: User can see
Abkhazian (ab) language option
at the first position
Given I have created a Video component
And I edit the component
And I open tab "Advanced"
...
...
@@ -482,13 +482,13 @@ class VideoEditorTest(CMSVideoBaseTest):
self
.
edit_component
()
self
.
open_advanced_tab
()
self
.
video
.
upload_translation
(
'uk_transcripts.srt'
,
'uk'
)
self
.
video
.
upload_translation
(
'chinese_transcripts.srt'
,
'
table
'
)
self
.
video
.
upload_translation
(
'chinese_transcripts.srt'
,
'
ab
'
)
self
.
save_unit_settings
()
self
.
assertTrue
(
self
.
video
.
is_captions_visible
())
unicode_text
=
"好 各位同学"
.
decode
(
'utf-8'
)
self
.
assertIn
(
unicode_text
,
self
.
video
.
captions_text
)
self
.
assertEqual
(
self
.
video
.
caption_languages
.
keys
(),
[
u'
table
'
,
u'uk'
])
self
.
assertEqual
(
self
.
video
.
caption_languages
.
keys
()[
0
],
'
table
'
)
self
.
assertEqual
(
self
.
video
.
caption_languages
.
keys
(),
[
u'
ab
'
,
u'uk'
])
self
.
assertEqual
(
self
.
video
.
caption_languages
.
keys
()[
0
],
'
ab
'
)
def
test_upload_transcript_with_BOM
(
self
):
"""
...
...
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