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
1ff72e0b
Commit
1ff72e0b
authored
Jun 11, 2013
by
Peter Fogg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert show_captions to StringyBoolean.
parent
94ac7fba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
common/lib/xmodule/xmodule/video_module.py
+4
-4
No files found.
common/lib/xmodule/xmodule/video_module.py
View file @
1ff72e0b
...
...
@@ -12,8 +12,8 @@ from django.http import Http404
from
xmodule.x_module
import
XModule
from
xmodule.raw_module
import
RawDescriptor
from
xmodule.editing_module
import
MetadataOnlyEditingDescriptor
from
xblock.core
import
Integer
,
Scope
,
String
,
Boolean
from
fields
import
StringyFloat
from
xblock.core
import
Integer
,
Scope
,
String
from
fields
import
StringyFloat
,
StringyBoolean
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -21,7 +21,7 @@ log = logging.getLogger(__name__)
class
VideoFields
(
object
):
"""Fields for `VideoModule` and `VideoDescriptor`."""
position
=
Integer
(
help
=
"Current position in the video"
,
scope
=
Scope
.
user_state
,
default
=
0
)
show_captions
=
Boolean
(
help
=
"Whether or not captions are shown"
,
display_name
=
"Show Captions"
,
scope
=
Scope
.
settings
,
default
=
True
)
show_captions
=
Stringy
Boolean
(
help
=
"Whether or not captions are shown"
,
display_name
=
"Show Captions"
,
scope
=
Scope
.
settings
,
default
=
True
)
youtube_id_1_0
=
String
(
help
=
"Youtube ID for normal speed video"
,
display_name
=
"Normal Speed"
,
scope
=
Scope
.
settings
,
default
=
"OEoXaMPEzfM"
)
youtube_id_0_75
=
String
(
help
=
"Youtube ID for .75x speed video"
,
display_name
=
".75x"
,
scope
=
Scope
.
settings
,
default
=
"JMD_ifUUfsU"
)
youtube_id_1_25
=
String
(
help
=
"Youtube ID for 1.25x speed video"
,
display_name
=
"1.25x"
,
scope
=
Scope
.
settings
,
default
=
"AKqURZnYqpk"
)
...
...
@@ -75,7 +75,7 @@ class VideoModule(VideoFields, XModule):
'track'
:
self
.
track
,
'display_name'
:
self
.
display_name_with_default
,
'caption_asset_path'
:
"/static/subs/"
,
'show_captions'
:
'true'
if
self
.
show_captions
else
'false'
,
'show_captions'
:
self
.
show_captions
,
'start'
:
self
.
start_time
,
'end'
:
self
.
end_time
})
...
...
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