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
0f3bce02
Commit
0f3bce02
authored
Dec 02, 2014
by
Shrhawk
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5888 from Shrhawk/shr/bug/TNL-590-encode-error
Handle Unicode for Incoming Keys
parents
8c946f8b
eec19992
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
common/lib/xmodule/xmodule/video_module/video_handlers.py
+1
-1
lms/djangoapps/courseware/tests/test_video_handlers.py
+5
-0
No files found.
common/lib/xmodule/xmodule/video_module/video_handlers.py
View file @
0f3bce02
...
@@ -55,7 +55,7 @@ class VideoStudentViewHandlers(object):
...
@@ -55,7 +55,7 @@ class VideoStudentViewHandlers(object):
if
dispatch
==
'save_user_state'
:
if
dispatch
==
'save_user_state'
:
for
key
in
data
:
for
key
in
data
:
if
hasattr
(
self
,
key
)
and
key
in
accepted_keys
:
if
key
in
accepted_keys
:
if
key
in
conversions
:
if
key
in
conversions
:
value
=
conversions
[
key
](
data
[
key
])
value
=
conversions
[
key
](
data
[
key
])
else
:
else
:
...
...
lms/djangoapps/courseware/tests/test_video_handlers.py
View file @
0f3bce02
...
@@ -131,6 +131,7 @@ class TestVideo(BaseTestXmodule):
...
@@ -131,6 +131,7 @@ class TestVideo(BaseTestXmodule):
{
'speed'
:
2.0
},
{
'speed'
:
2.0
},
{
'saved_video_position'
:
"00:00:10"
},
{
'saved_video_position'
:
"00:00:10"
},
{
'transcript_language'
:
'uk'
},
{
'transcript_language'
:
'uk'
},
{
'demoo�'
:
'sample'
}
]
]
for
sample
in
data
:
for
sample
in
data
:
response
=
self
.
clients
[
self
.
users
[
0
]
.
username
]
.
post
(
response
=
self
.
clients
[
self
.
users
[
0
]
.
username
]
.
post
(
...
@@ -152,6 +153,10 @@ class TestVideo(BaseTestXmodule):
...
@@ -152,6 +153,10 @@ class TestVideo(BaseTestXmodule):
self
.
item_descriptor
.
handle_ajax
(
'save_user_state'
,
{
'transcript_language'
:
"uk"
})
self
.
item_descriptor
.
handle_ajax
(
'save_user_state'
,
{
'transcript_language'
:
"uk"
})
self
.
assertEqual
(
self
.
item_descriptor
.
transcript_language
,
'uk'
)
self
.
assertEqual
(
self
.
item_descriptor
.
transcript_language
,
'uk'
)
response
=
self
.
item_descriptor
.
handle_ajax
(
'save_user_state'
,
{
u'demoo�'
:
"sample"
})
self
.
assertEqual
(
json
.
loads
(
response
)[
'success'
],
True
)
def
tearDown
(
self
):
def
tearDown
(
self
):
_clear_assets
(
self
.
item_descriptor
.
location
)
_clear_assets
(
self
.
item_descriptor
.
location
)
...
...
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