Commit Graph

65 Commits

Author SHA1 Message Date
farhan
386dfe3e99 chore: remove unused copy_or_rename_transcript method 2025-12-17 21:04:15 +05:00
Muhammad Farhan Khan
b57e2ac1ea chore: move get_transcript method to video service (#37635)
https://github.com/openedx/public-engineering/issues/445
2025-12-05 17:53:10 +05:00
Muhammad Farhan Khan
f51343c871 refactor: move transcripts_utils from xmodule to video-config (#37600)
As part of the ongoing effort to deprecate and eventually remove xmodule,
we’ve started gradually migrating the necessary code files from xmodule
to more appropriate locations within the codebase.

Ticket: https://github.com/openedx/public-engineering/issues/445

Also: this tweaks importlinter ignores & add follow-up issue links

Co-authored-by: Kyle McCormick <kyle@axim.org>
2025-11-14 18:26:35 +00:00
Jansen Kantor
5e61a1d959 feat: allow transcripts to work with more than two-letter language codes (#36419)
* feat: allow transcripts to work with more than two-letter language codes

* style: quality

* fixup! Merge branch 'master' into jkantor/video-transcript-codes

* fix: s/LANGUAGES_DICT/LANGUAGE_DICT/
2025-03-27 11:30:44 -04:00
Kristin Aoki
9f734a7a5e feat: update youtube transcript fetch to allow all languages (#34436)
* feat: allow all languages

* feat: add youtube transcript import functions as drf
2024-03-29 08:28:18 -04:00
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
0x29a
dd9f6936bc refactor: xmodule/video_module -> xmodule/video_block 2022-12-19 17:48:49 +01:00
Bernard Szabo
c3c8f725dc feat: TNL-9460 differentiated API GET
CMS youtube transcript tests call GET twice & need different responses on each of the two calls

Current solution (setup_caption_responses) decides what to return on basis of call number.

Former solution (mock_request_get()) decided what to return on the basis of kwargs, which would differ on first vs. second call
2022-12-07 15:07:57 -05:00
Bernard Szabo
6b0dce2911 feat: TNL-9460 remove unused transcript utility
Removed unused youtube_video_transcript_name() method & associated unit tests ( method supported defunct API)
2022-12-07 15:07:57 -05:00
Jawayria
c42e356f95 chore: Applied lint-amnesty on cms/djangoapps/contentstore/tests 2021-12-10 19:16:43 +05:00
connorhaugh
0d26738fce fix: Prevent Transcripts from Failing Export, Edit (#28242)
Instead of having json errors in transcript acquisition and conversion cause errors, have transcription conversion and acquisition simply return an error message in the transcription which can prompt a change from the user.

Although not uploading a transcript is handled, transcripts can often cause errors in edit, export, and other activities due to json errors. These errors block the entire use of these features, so to allow for reupload, etc, we add an error message instead of transcript and log the event.

In response to [TNL-8539](https://openedx.atlassian.net/secure/RapidBoard.jspa?rapidView=580&projectKey=TNL&modal=detail&selectedIssue=TNL-8539)

Testing: Unit tests coverage is included in the PR. Upload, import, and export of courses with transcriptions is also easily hand-testable. Just create a video in studio, add an irrelevant transcript. Then try to import, export, and edit the problem. Expected behavior is success.
2021-07-21 15:52:54 -04:00
Usama Sadiq
4f4be6538a BOM-2477: pylint warnings lint-amnesty (#27585) 2021-05-11 17:22:40 +05:00
David Ormsbee
d2389fb7fb fix: Don't break export when transcript is Latin-1 encoded.
Video SJSON transcripts are supposed to be UTF-8 encoded, but SJSON
is an ad hoc thing we made up to make it easier to build the
transcripts viewer in the VideoBlock, and it's not well specified.
Prior to this commit, if you had an SJSON file with Latin-1 encoded
text outside the standard ASCII range (e.g. û), then we'd error out
while trying to export it.

This was blocking an effort to export some Old Mongo courses (TNL-8007).
2021-04-02 13:33:16 -04:00
M. Zulqarnain
fa271dafe9 BOM-2369 (C): pyupgrade on contentstore/tests (#26759)
* pyupgrade on contentstore/tests
2021-03-04 14:37:39 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Kyle McCormick
538dbf696b Import CMS code using fully qualified module names
or, using proper the proper Python 3 relative imports
(e.g., 'from .views import x') which are standard and
unambiguous.
2020-10-19 09:34:31 -04: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
Jeremy Bowman
3db3403fc4 Fix mock transcript responses BOM-918 (#22020) 2019-10-11 16:22:52 -04:00
Feanil Patel
067d95f797 Fix transcript tests to be consistent. 2019-10-08 15:26:52 -04:00
aarif
ac38a76c48 python 3 fixes 2019-09-30 17:35:02 +05:00
Feanil Patel
cb64fed1af BOM-489 Studio tests with byte/str mismatch. 2019-09-18 14:21:16 -04:00
Ayub khan
4ed93be5ff INCR-328 python3 compatibility 2019-07-09 13:09:08 +05:00
Jeremy Bowman
d866fed2f1 Fix import order issues in contentstore 2019-02-14 14:20:47 -05:00
Jeremy Bowman
ca3316962d TE-2524 Stop using nose.plugins - LMS 1 2018-07-31 13:03:18 -04: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
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
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
Harry Rein
bc76ffe5dc Add message for setting course goal.
LEARNER-2307
2017-09-22 09:56:27 -04:00
Jeremy Bowman
ded294c420 pytest compatibility fixes 2017-09-06 14:20:34 -04:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
Omar Al-Ithawi
ad4e3d50a5 Allow uploading subtitles with unicode filenames 2017-05-02 10:53:58 +03: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
Toby Lawrence
fe545e058f Quality fixes. 2016-02-16 10:12:29 -05:00
Toby Lawrence
e2cbb547b1 Switch to SharedModuleStoreTestCase in the 'contentstore' app where possible. 2016-02-16 09:39:00 -05:00
Syed Hassan Raza
c9778a5f57 add name param check_transcripts 2015-06-12 16:34:45 +05:00
Syed Hassan Raza
ecc3473d36 transcript name param url 2015-06-09 20:04:16 +05:00
Ned Batchelder
81d17c516e Fix or remove tearDown methods that don't use super.
Update edx-lint to the version that checks if tearDown uses super.

Convert a number of tearDown methods into addCleanup.

Remove some unneeded tearDown methods: no need to call patch.stopall if
none of them were started with patch.start.
2015-03-17 15:14:52 -04:00
Ned Batchelder
7d799e34f3 Remove unused imports 2015-03-17 07:10:31 -04:00
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
stv
fb9f324f2f Fix PEP8: E303 too many blank lines 2014-11-10 11:00:14 -08:00