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
7556ee2b
Commit
7556ee2b
authored
Feb 18, 2016
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find Video Errors Management Command.
parent
46533015
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
6 deletions
+9
-6
common/lib/xmodule/xmodule/video_module/video_module.py
+1
-0
lms/djangoapps/course_api/blocks/transformers/student_view.py
+1
-1
lms/djangoapps/courseware/tests/test_video_mongo.py
+7
-5
lms/djangoapps/mobile_api/management/__init__.py
+0
-0
lms/djangoapps/mobile_api/management/commands/__init__.py
+0
-0
lms/djangoapps/mobile_api/management/commands/find_video_errors.py
+0
-0
No files found.
common/lib/xmodule/xmodule/video_module/video_module.py
View file @
7556ee2b
...
@@ -872,4 +872,5 @@ class VideoDescriptor(VideoFields, VideoTranscriptsMixin, VideoStudioViewHandler
...
@@ -872,4 +872,5 @@ class VideoDescriptor(VideoFields, VideoTranscriptsMixin, VideoStudioViewHandler
"duration"
:
val_video_data
.
get
(
'duration'
,
None
),
"duration"
:
val_video_data
.
get
(
'duration'
,
None
),
"transcripts"
:
transcripts
,
"transcripts"
:
transcripts
,
"encoded_videos"
:
encoded_videos
,
"encoded_videos"
:
encoded_videos
,
"edx_video_id"
:
self
.
edx_video_id
,
}
}
lms/djangoapps/course_api/blocks/transformers/student_view.py
View file @
7556ee2b
...
@@ -8,7 +8,7 @@ class StudentViewTransformer(BlockStructureTransformer):
...
@@ -8,7 +8,7 @@ class StudentViewTransformer(BlockStructureTransformer):
"""
"""
Only show information that is appropriate for a learner
Only show information that is appropriate for a learner
"""
"""
VERSION
=
1
VERSION
=
2
STUDENT_VIEW_DATA
=
'student_view_data'
STUDENT_VIEW_DATA
=
'student_view_data'
STUDENT_VIEW_MULTI_DEVICE
=
'student_view_multi_device'
STUDENT_VIEW_MULTI_DEVICE
=
'student_view_multi_device'
...
...
lms/djangoapps/courseware/tests/test_video_mongo.py
View file @
7556ee2b
...
@@ -1055,7 +1055,7 @@ class TestVideoDescriptorStudentViewJson(TestCase):
...
@@ -1055,7 +1055,7 @@ class TestVideoDescriptorStudentViewJson(TestCase):
}
}
return
self
.
video
.
student_view_data
(
context
)
return
self
.
video
.
student_view_data
(
context
)
def
verify_result_with_fallback_url
(
self
,
result
):
def
verify_result_with_fallback_url
(
self
,
result
,
edx_video_id
):
"""
"""
Verifies the result is as expected when returning "fallback" video data (not from VAL).
Verifies the result is as expected when returning "fallback" video data (not from VAL).
"""
"""
...
@@ -1066,10 +1066,11 @@ class TestVideoDescriptorStudentViewJson(TestCase):
...
@@ -1066,10 +1066,11 @@ class TestVideoDescriptorStudentViewJson(TestCase):
"duration"
:
None
,
"duration"
:
None
,
"transcripts"
:
{
self
.
TEST_LANGUAGE
:
self
.
transcript_url
},
"transcripts"
:
{
self
.
TEST_LANGUAGE
:
self
.
transcript_url
},
"encoded_videos"
:
{
"fallback"
:
{
"url"
:
self
.
TEST_SOURCE_URL
,
"file_size"
:
0
}},
"encoded_videos"
:
{
"fallback"
:
{
"url"
:
self
.
TEST_SOURCE_URL
,
"file_size"
:
0
}},
"edx_video_id"
:
edx_video_id
,
}
}
)
)
def
verify_result_with_val_profile
(
self
,
result
):
def
verify_result_with_val_profile
(
self
,
result
,
edx_video_id
):
"""
"""
Verifies the result is as expected when returning video data from VAL.
Verifies the result is as expected when returning video data from VAL.
"""
"""
...
@@ -1083,6 +1084,7 @@ class TestVideoDescriptorStudentViewJson(TestCase):
...
@@ -1083,6 +1084,7 @@ class TestVideoDescriptorStudentViewJson(TestCase):
"only_on_web"
:
False
,
"only_on_web"
:
False
,
"duration"
:
self
.
TEST_DURATION
,
"duration"
:
self
.
TEST_DURATION
,
"transcripts"
:
{
self
.
TEST_LANGUAGE
:
self
.
transcript_url
},
"transcripts"
:
{
self
.
TEST_LANGUAGE
:
self
.
transcript_url
},
"edx_video_id"
:
edx_video_id
,
}
}
)
)
...
@@ -1093,7 +1095,7 @@ class TestVideoDescriptorStudentViewJson(TestCase):
...
@@ -1093,7 +1095,7 @@ class TestVideoDescriptorStudentViewJson(TestCase):
def
test_no_edx_video_id
(
self
):
def
test_no_edx_video_id
(
self
):
result
=
self
.
get_result
()
result
=
self
.
get_result
()
self
.
verify_result_with_fallback_url
(
result
)
self
.
verify_result_with_fallback_url
(
result
,
edx_video_id
=
''
)
@ddt.data
(
@ddt.data
(
*
itertools
.
product
([
True
,
False
],
[
True
,
False
],
[
True
,
False
])
*
itertools
.
product
([
True
,
False
],
[
True
,
False
],
[
True
,
False
])
...
@@ -1105,9 +1107,9 @@ class TestVideoDescriptorStudentViewJson(TestCase):
...
@@ -1105,9 +1107,9 @@ class TestVideoDescriptorStudentViewJson(TestCase):
self
.
setup_val_video
(
associate_course_in_val
)
self
.
setup_val_video
(
associate_course_in_val
)
result
=
self
.
get_result
(
allow_cache_miss
)
result
=
self
.
get_result
(
allow_cache_miss
)
if
video_exists_in_val
and
(
associate_course_in_val
or
allow_cache_miss
):
if
video_exists_in_val
and
(
associate_course_in_val
or
allow_cache_miss
):
self
.
verify_result_with_val_profile
(
result
)
self
.
verify_result_with_val_profile
(
result
,
edx_video_id
=
self
.
video
.
edx_video_id
)
else
:
else
:
self
.
verify_result_with_fallback_url
(
result
)
self
.
verify_result_with_fallback_url
(
result
,
edx_video_id
=
self
.
video
.
edx_video_id
)
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
...
...
lms/djangoapps/mobile_api/management/__init__.py
0 → 100644
View file @
7556ee2b
lms/djangoapps/mobile_api/management/commands/__init__.py
0 → 100644
View file @
7556ee2b
lms/djangoapps/mobile_api/management/commands/find_video_errors.py
0 → 100644
View file @
7556ee2b
This diff is collapsed.
Click to expand it.
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