Video: allow multiple transcripts - #2422
Conversation
|
@talbs can you review this in my place? |
|
Yep, I'm on it. @auraz, it looks like some tests are failing currently as well. |
There was a problem hiding this comment.
(Missing the opening quote on de') What are the values here? The complete text of the translated transcript? Or a filename?
|
@auraz I've reviewed all the code I understand. I've asked a few questions on the ticket also. Some things need to be fixed. |
|
@auraz I'm just starting to look at the PR as @singingwolfboy is out for a few days. Please fix the quality issues and also look at your code coverage. It looks like a lot of the video module Python code is not covered. |
|
When I created some new transcript entries, but the transcript files I referred to haven't been uploaded. When I save the video module, an error bar flashes briefly at the bottom. I think this is the error it is showing me: |
|
2014-02-12 16:58:19,756 INFO 12647 [xmodule.video_module.video_module] video_module.py:494 - Can't find uploaded transcripts: OEoXaMPEzfM |
|
@cahrens error that you've seen, was unrelated to this PR and has already been fixed today and merged to master from https://github.com/edx/edx-platform/pull/2586 |
|
@auraz Yes, that is the bug I was seeing. I created a story for a custom error handler for xblock ajax callbacks. In general, we need to handle errors thrown by xblocks in a better manner. |
|
I am having trouble determining if this feature is working. Frances gave me the test course that has transcripts for 3 languages. However, they actually all appear to be the same. I tried modifying the German one and re-uploading it to my course, but I still don't see the modified transcript when I click on German on the transcript popup menu. When I try it in the LMS, I don't see the modified transcript either, and the popup menu does not bold the currently selected language like it does in Studio. Furthermore, I don't see a link to download the transcript (which perhaps would tell me which one I am looking at). Please tell me what I am doing wrong! |
|
@polesye I am getting the following error: I have uploaded a new transcript file, and entered "EN", and "OEoXaMPEzfM-russian.srt" into the two Transcript Translations fields. |
|
@polesye This is the transcript file |
There was a problem hiding this comment.
This is in the beforeEach.
Removed.
|
@cahrens >
Answer: Studio: I wasn't able to reproduce # 1) on save. But I was able to reproduce error, when SJSON and SRT files where deleted while video player was using them. We've added handler for this case. |
Fixed styles. |
|
cache_toolbox code was removed, as we now getting transcripts via Xblock handler right from contentstore, not via assets urls. |
|
Removed import of modulestore inside functions, as modulestore can be accessed from xmodule.django |
|
Update: from xmodule.modulestlre.django import modulestore is not importable at module level in video_module due to https://gist.github.com/auraz/9120459 |
|
👍 I would recommend that you squash commits before submitting. It is still the case that if you modify a transcript (download, change, re-upload), the new version is not picked up automatically. Now it is slightly better in that the new transcript will be processed when you save the video component (without having to delete and re-add the filename). In the future, it would be nice to figure out a way to avoid the need to edit the video component. |
|
@cahrens Sure, commits will be squashed. It is possible to always regenerate subtitles, but it will slow down rendering of video player in LMS, that's why we intentionally disabled this functionality. If you think that we still need to do it, please let me know your opinion. |
|
I'd say wait until people complain before slowing down the rendering. Documentation around what is required to regenerate transcripts may be enough @mhoeber. |
|
@cahrens I've got you point. We will think about it. |
|
I have no further comments. :) |
|
@nedbat but you've not given thumbs up ) |
|
👍 |
Video: allow multiple transcripts
Ticket: BLD-642
XML should look like:
When the student hovers over the 'cc' button then a menu appears over the 'cc' button with languages.
The show/hide transcript functionality remains present upon clicking the 'cc' button
The "download transcript" button should download whichever transcript is currently selected by the student.
@nedbat, @singingwolfboy, @valera-rozuvan, @frrrances please review.
Current coverage is 84% and it is different from jenkins results because coverage.py configured such that tests in LMS/CMS don't count coverage for modules in common/lib.
common/lib/xmodule/xmodule/video_module/video_module.py (96.0%)
common/lib/xmodule/xmodule/video_module/transcripts_utils.py (49.7%)
common/lib/xmodule/xmodule/video_module/video_utils.py (100%)
Transcript_utils is covered by acceptance tests.