Consolidate get_transcript methods
There were two get_transcript methods. The broken one that was being used (VideoTranscriptsMixin.get_transcript) is stripped out here - it has been superseded by transcripts_utils.get_transcript. The latter includes support for blockstore and VAL, while the former did not. This fixes the `AttributeError: 'LibraryLocatorV2' object has no attribute 'make_asset_key'` error seen when attempting to load a transcript from a video through the xblock api when the video had the transcript stored in blockstore. Note that if you were previously using video.get_transcript, you should now use `transcripts_utils.get_transcript(video, ...)`, and note that the returned 'filename' will be prefixed with the language code, as other `get_transcript*` functions already do.
Showing
- common/lib/xmodule/xmodule/video_module/transcripts_utils.py 4 additions, 44 deletionscommon/lib/xmodule/xmodule/video_module/transcripts_utils.py
- common/lib/xmodule/xmodule/video_module/video_module.py 3 additions, 11 deletionscommon/lib/xmodule/xmodule/video_module/video_module.py
- lms/djangoapps/courseware/tests/test_video_handlers.py 23 additions, 20 deletionslms/djangoapps/courseware/tests/test_video_handlers.py
Loading
Please register or sign in to comment