Commit Graph

55 Commits

Author SHA1 Message Date
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
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Nimisha Asthagiri
d7cf8b7fa0 Implement close_connections and drop_database on modulestores. 2014-07-14 16:01:10 -04:00
Don Mitchell
cc6dfbbc75 Asset support in split
LMS-2876
2014-07-07 17:11:43 -04:00
Nimisha Asthagiri
a9213509c3 Enable Mixed Modulestore STUD-1540
Refactor get_parent_locations STUD-1663
2014-06-26 18:00:11 -04:00
Alexander Kryklia
1f5c95ba9a Remove unused code when download from youtube. 2014-06-25 16:12:16 +03:00
Don Mitchell
acc02b0e09 Fix to excess asset query 2014-06-09 15:13:23 -04:00
Calen Pennington
0d88379eeb Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds all of cms.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-07 12:56:43 -04:00
Alexander Kryklia
dfa7c27e77 Add multiple transcripts editor.
Fix donwload subs for non youtube videos and non-en language - continue.
Add acceptance tests.
Add detetion of assets on request.
Updated docstring.
Add fixes and acceptance tests.
Fix acceptance tests.
Update docsrtings and cleanup code, resful for language_id.
Specify exception type in POST.
Fix url in upload module.
Improve exception handling.
Remove 'en' and catching in editable_metadata.
Move descriptor.get_context test to lms tests.
Add query parameter to translation dispatch.
Response to format parameter of translatin GET request.
Fix Acceprance test: Metadata Editor.
move handlers to proper scores.
Split video player into smaller files.
Add ugettext and fix typoes.
Add changelog.
Support for downloading non-ascii filenames.
Change event binding.
Add content-language to download requests.
Reractor POST handler to not update self.transcripts.
2014-03-31 18:49:56 +03:00
Alexander Kryklia
dd20e84c84 Fix donwload subs for non youtube videos and non-en language.
Check for status in test.
Add test for track url.
Fix test to use cookie.
Use download_track in feature file.
Add new tests for get_transcript.
Add html5 test.
Add content check.
Add tests for available_translations dispatch.
Disable flaky cms test.
Add  w/o english transcript tests.
Add to changelog.
2014-03-14 18:30:42 +02:00
Alexander Kryklia
7fe675b1d0 Allow uppercase transcripts srt extension. 2014-03-13 17:06:17 +02:00