Commit Graph

72 Commits

Author SHA1 Message Date
Samuel Walladge
34516b9660 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.
2020-07-03 08:20:55 +09:30
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
David Ormsbee
a09c4e160b Merge pull request #22538 from open-craft/blockstore-video-transcripts
Support transcript files for video XBlocks in Blockstore
2019-12-19 11:24:27 -05:00
Braden MacDonald
e4eac68e9f Support transcript files for video XBlocks in Blockstore 2019-12-15 12:35:03 -08:00
Diana Huang
217228dffc Standardize input into SubRipFile. 2019-12-13 13:28:27 -05:00
Jeremy Bowman
0e1881f525 Fixes for celery worker Python 3 bugs (#22479) 2019-12-10 14:07:27 -05:00
aarif
164141def9 replaced json.loads with a util to handle bytes
changes made to fix jenkins/quality errors

changes made as suggested

added the docstring to fix quality issue

made a few changes to fix some tests

replaced json.loads with a util to handle bytes

changes made to fix jenkins/quality errors

changes made as suggested

added the docstring to fix quality issue

made a few changes to fix some tests

made changes as suggested

made changes as suggested

updated the requirements with make upgrade
2019-10-16 12:14:01 +05:00
aarif
ea4557ff70 removed unnecesary transcript decode 2019-10-14 17:28:47 +05:00
Feanil Patel
5ef86e2c3c Fix video module tests related to transcript conversion. 2019-10-09 09:51:02 -04:00
Feanil Patel
9610aab0f8 Fix more cms contentstore tests. 2019-10-08 15:26:52 -04:00
Feanil Patel
66382961a7 Fix all transcript related tests.
Treat transcript content as unicode strings and convert them at any edge
where we encounter them.  One decision made here was to not update
edx-val it treats transcripts as byte but is much closer to the actual
files so it makes more sense over there. But within the platform they
are generally passed around as serialized json and so it's much better
for them to be unicode.
2019-10-07 13:49:25 -04:00
Aarif
4e95024dc3 Merge pull request #21525 from edx/BOM-367
BOM-367 Python 3 fixes
2019-09-25 16:07:44 +05:00
Feanil Patel
cb64fed1af BOM-489 Studio tests with byte/str mismatch. 2019-09-18 14:21:16 -04:00
aarif
8e7406493c python 3 fixes
test fixes

changes made as suggested

test fixes

test fixes for python 2

test fixes

python 3 fixes

test fixes

changes made as suggested

test fixes

test fixes for python 2

test fixes

minor fixes

python 3 fixes

minor changes
2019-09-18 16:42:37 +05:00
Aarif
85f622f0e1 Merge pull request #21515 from edx/BOM-362
BOM-362 Python 3 fixes
2019-09-02 14:34:46 +05:00
Braden MacDonald
d3f6ed09d8 Learning Contexts, New XBlock Runtime, Blockstore API Client + Content Libraries
https://github.com/edx/edx-platform/pull/20645

This introduces:
* A new XBlock runtime that can read and write XBlocks that are persisted using
  Blockstore instead of Modulestore. The new runtime is currently isolated so
  that it can be tested without risk to the current courseware/runtime.
* Content Libraries v2, which store XBlocks in Blockstore not modulestore
* An API Client for Blockstore
* "Learning Context" plugin API. A learning context is a more abstract concept
  than a course; it's a collection of XBlocks that serves some learning purpose.
2019-08-30 10:31:15 -07:00
aarif
e60f767fc4 python 3 fixes
minor fix
2019-08-30 18:01:16 +05:00
Feanil Patel
602970ed90 Fix test collection for CMS in python 3. (#21338) 2019-08-13 13:54:49 -04:00
Usman Khalid
0b27c62ca6 Convert VideoModule to VideoBlock.
Some deprecated functionality has been removed:

- Reading data field and transforms being applied in the init() method.
- The source field.
- The source_visible attribute.
2019-06-20 22:12:39 +05:00
Brendan
6057527689 INCR-227: python-modernize on common/lib/xmodule/xmodule/video_module… (#20427)
* INCR-227: python-modernize on common/lib/xmodule/xmodule/video_module, partitions, and util

* pylint will ignore imports from six

* INCR-227 Fixing mangled comments and variable names
2019-05-07 12:13:02 -04:00
asadazam93
f7d918e7ca Fixed download txt transcript 500 2019-03-06 16:53:47 +05:00
asadazam93
12d20697c5 Added logs 2019-02-25 17:18:47 +05:00
Ned Batchelder
046fe60913 Remove unused imports 2018-11-07 10:31:51 -05:00
asadazam93
0ec8e38422 Fixed download transcript 500 error 2018-09-11 16:04:35 +05:00
irfanuddinahmad
bfbeeb1d84 added exception decorator 2018-04-26 16:02:09 +05:00
Mushtaq Ali
b181e6bb45 Update the get_transcript util with html5_sources - EDUCATOR-2651 2018-04-25 17:42:36 +05:00
Qubad786
d850fb2078 Refactor download, update, choose, rename and replace handlers to use DS as primary storage. Add/refactor relevent unit/acceptance/jasmine tests. 2018-04-23 17:37:13 +05:00
muhammad-ammar
9d7ed19b64 disable subs field syncying 2018-04-23 17:35:45 +05:00
Qubad786
597566a34f Upload transcript to basic tab, add/fix unit and acceptance tests 2018-04-23 17:35:44 +05:00
muhammad-ammar
cda7fe9a29 update available translations retrieval interface
EDUCATOR-2384
2018-04-23 17:35:43 +05:00
muhammad-ammar
d0cd247d08 Deprecate Contentstore for Video Component Preview LMS/CMS
EDUCATOR-1756
2018-04-23 17:35:43 +05:00
muhammad-ammar
f6315483cd update get_transcript util 2018-03-15 15:15:20 +05:00
muhammad-ammar
a01ba7621e transcript util
EDUCATOR-2131
2018-03-07 23:02:15 +05:00
Qubad786
c90aa33cb8 Integrate with the updated VAL api utils. 2018-02-16 19:06:44 +05:00
Jeremy Bowman
5289c7e828 PLAT-1915 Stop using deprecated BaseException.message 2018-01-31 17:22:01 -05:00
Qubad786
090e5dc534 Transcript upload backend for Video Upload Page – EDUCATOR-1854 2018-01-09 17:03:44 +05:00
John Eskew
b14d2e9cf7 Fix video transcript model import before Django initialization occurs. 2017-12-07 09:56:44 -05:00
Qubad786
9c06bb65b1 Use edx-val transcripts and translations collectively with contentstore.
Adds val trancripts in outcome of get_transcripts_info and rest of flow remains the same and also add fallback  to edx-val rtanscripts for mobile accessible video endpoints.
2017-10-16 19:23:18 +05:00
Qubad786
ec7b78d60e Use edx-val transcripts as a fallback on the video component
Purpose of this, is to serve transcripts from edx-val if the requested transcripts are not found in the contentstore i.e. that's where all the transcripts are living to date.
2017-10-16 19:23:18 +05:00
muhammad-ammar
2203de4a85 video ids info 2017-10-16 19:23:17 +05:00
Omar Al-Ithawi
302e1d923e Allow displaying videos without transcripts 2017-09-11 21:29:58 +03:00
Omar Al-Ithawi
ad4e3d50a5 Allow uploading subtitles with unicode filenames 2017-05-02 10:53:58 +03:00
Qubad786
0ff62e766e prioritize youtube transcripts over html5 ones 2017-03-16 14:38:51 +05:00
noraiz-anwar
7494e5e6c8 Revert "Error while exporting course with too long filename" 2017-01-05 23:07:56 +05:00
noraiz-anwar
9c139a87a6 Error while exporting course with too long filename 2017-01-05 14:43:48 +05:00
attiyaishaque
f3a30e6f08 TNL-6004 Fixing 500 in video transcripts. 2016-11-28 15:28:39 +05:00
Mushtaq Ali
11a07ca8c9 Show validation message when no transcript file uploaded for a language in a video component in studio.
Also, don't show respective transcript language in video language menu when a related transcript is not uploaded for that language.

TNL-5200
2016-10-07 19:15:44 +05:00
Sanford Student
24c4c8abed ma-1881 handling empty translations and testing
using lists for json serializability, if that's a word
2016-02-10 15:56:42 -05:00