Commit Graph

86 Commits

Author SHA1 Message Date
Usama Sadiq
82406e970a reafctor: ran pyupgrade on lms/djangoapps/courseware (#26739) 2021-03-12 14:43:44 +05:00
Aarif
0112339b20 replaced unittest assertions pytest assertions (#26543) 2021-02-19 11:58:27 +05:00
Jawayria
03e6a874d0 Applied pylint-amnesty to courseware 2021-02-03 21:56:24 +05:00
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
Waheed Ahmed
f54b9a42e7 Disallow NaN value for speed key.
The VideoBlock `handle_ajax` is allowing NaN values for speed key
and causing videos to not load. Also added a data migration to fix
the data for learners.

PROD-1148
2020-03-11 18:45:49 +05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -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
Awais Qureshi
3959bdf1ea BOM-937
Open a file in read binary mode to avoid bytes issues.
2019-10-23 10:44:21 +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
Ayub
732dfce14d Merge pull request #21996 from edx/BOM-test-fix-test_download_srt_exist
BOM test_download_srt_exist test fix
2019-10-11 13:01:47 +05:00
Feanil Patel
2cd474c72d Merge pull request #21970 from edx/feanil/fix_xmodule_video_tests
Fix video module tests related to transcript conversion.
2019-10-10 13:32:44 -04:00
Awais Qureshi
750b554637 BOM-915
Fixing bytes and ordering issue.
2019-10-10 18:00:12 +05:00
Ayub khan
198743f7b0 BOM test_download_srt_exist test fix
need unicode to compare with unicode string
2019-10-10 17:17:29 +05:00
Feanil Patel
76c578df36 Fix more transcript related tests to be consistent. 2019-10-09 11:00:23 -04:00
Aarif
7be6acb880 Merge pull request #21856 from edx/BOM-851
BOM-851
2019-10-02 11:44:45 +05:00
Ayub
ac3718055a Merge pull request #21855 from edx/BOM-842
BOM-842
2019-10-01 10:37:15 +05:00
aarif
bec80bb34b python 3 fixes 2019-09-30 16:02:00 +05:00
Ayub khan
73a453d3c2 BOM-842 2019-09-30 15:59:36 +05:00
Awais Qureshi
c96c172b3a BOM-829
Python3 fix.
2019-09-30 15:23:03 +05:00
Feanil Patel
3427c1abf3 BOM-618 Pass unicode to json.loads 2019-09-18 16:28:11 -04:00
aarif
129cc739e0 python 3 fixes 2019-09-03 16:27:45 +05:00
Ayub khan
8a95a8e520 BOM-95
assertItemsEqual with six.assertCountEqual
2019-08-21 17:01:40 +05:00
Feanil Patel
dc078bb5da Create a new SRT file for this test.
Usingthe shared file with the other tests wolud sometimes cause this
test to fail.  Made this change to make it less flaky.
2019-08-13 16:33:09 -04:00
Feanil Patel
9d7f0ca46e Get LMS test collection working in python 3.
This should be all the changes needed to get test collection working in
python 3 for the `lms` folder.
2019-08-13 16:32:40 -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
alangsto
4a1346b068 INCR-265 Run python-modernize on lms/djangoapps/courseware/management and lms/djangoapps/courseware/tests (#20716)
* updated files according to INCR-265

* fixed docstring and line-length problems from quality test

* Revert "fixed docstring and line-length problems from quality test"

This reverts commit d050f55a4ecfaa38f46b80ec4bb85ff399a79a8c.

* fixed errors reported in quality report

* had error, fixed it

* reversed change

* fixed over/under indentation, and added line to import.py that Ned had suggested

* tried disabling pylint for this line

* testing new email

* testing email in different window

* re-added symlink and docstring
2019-05-31 14:07:18 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
muhammad-ammar
aaaafee2b2 remove video transcript enabled flag 2018-04-30 15:59:32 +05:00
muhammad-ammar
d5758bd1f9 delete transcript from advance tab
EDUCATOR-1759
2018-04-24 16:49:33 +05:00
Qubad786
cadd4378c7 updload/download/replace transcripts
EDUCATOR-2167
EDUCATOR-2168
EDUCATOR-2169
2018-04-23 18:28:35 +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
Qubad786
c90aa33cb8 Integrate with the updated VAL api utils. 2018-02-16 19:06:44 +05:00
Jeremy Bowman
ebc54c8f1a PLAT-1890 Fixed assorted ModifyingEnforceTypeWarning warnings 2018-01-24 11:49:42 -05:00
J. Cliff Dyer
1fc43bf60d Define custom completion for VideoModule
Update the VideoModule to publish a completion event when the player
reaches 95% complete, and submit a BlockCompletion when that event
occurs.

OC-3091
MCKIN-5897
2017-12-19 14:12:28 -05:00
John Eskew
b14d2e9cf7 Fix video transcript model import before Django initialization occurs. 2017-12-07 09:56:44 -05:00
Qubad786
4aef8d1c7b exclude bumper 2017-10-26 16:28:25 +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
Jeremy Bowman
fd6af6b05e ddt usage cleanup 2017-09-05 17:25:51 -04:00
Andy Armstrong
a815003b3b Handle anonymous and unenrolled users on the new course home page
LEARNER-1696
2017-07-10 17:52:28 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Andy Armstrong
684aec8740 Move contentserver to openedx/core 2016-10-11 12:49:33 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Toby Lawrence
4e22affb24 [PERF-344] Add versioning of cached course assets to allow graceful cache invalidation
When releasing the versioned assets work, we stumbled on a problem with old pickled
versions of the StaticContent objects residing in cache, which triggered a bug in the
code. Not wanting to blow away all cached items, we ended up having to revert and add
in some backwards-compatible helper code to ease the transition.

With this, we'll now utilize the version argument that Django's caching interface
allows, in conjunction with a constant value that can be modified when breaking changes
are being made, to let us gracefully ignore older cached course assets.
2016-07-05 15:15:47 -04:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
cahrens
2b57603436 Handle case of video in a content library with no transcripts.
This partially addresses TNL-1776
2015-08-07 13:19:12 -04:00
Alexander Kryklia
4c7bfb44dd Add Video Bumper.
Fix n-click behaviour on poster.
Fix unit tests.
Fix handler for non_en lang for bumper.
Add more tests.
Fix docstrings.
Fix pep8.
Fix static redirection with bumper.
Fix button in IE11.
Add video_bumper field in bok_choy.

Fix pylink violations.

Update docstrings and some clean up.

Rename edx_video_id in bumper tests.

Fix too long lines in help text.

Address ui comments.

Fix bumper events.

Refactor bumper-transcripts code, fix bugs, address comments.
Squashed commits:
Fix download transcript button.
[74e0c8c] Fix quality
[a759f33] Fix error, when sub contains extension.
[b30755c] Revert "Add video files to host for transcripts."

This reverts commit cf8a96bf84346e17b6ad57ad4cc6a27d7a9118cd.
[36f038a] Add video files to host for transcripts.
[23f1655] Fix pep8 and pyling issues.
[0f1f9d2] Update acceptance test.
[765a27d] Wait for ajax in captions.
[8ae72a3] Fix logic.
[063450f] Fix unit tests.
[d1075fc] Fix handlers tests.
[25d31ad] Update bumper_utils.
[cb5f9df] Remove maxDiff.
[8738b1a] Code cleanup.
[87dbcb7] Fix issues with transcripts.
[ec899de] Fix transcripts in serializers.
[444b1fc] Fix transcripts typo.
[d524cb5] Fix bumper.
[f62cf22] Fix video mongo tests.
[8f1b55a] Fix dispatches.
[53bc308] Add more fixes.
[d5e3723] Fix test_video_handlers and rename the method.
[93efc23] Fix mobile tests.
[740e2ae] Fix pep8 and pylint.
[47cfb66] Address comments, add fixes.
[4e499d9] Add fixes.
[8353553] Add improvements.

Updated dispatch values)
.

Use ddt in bumper handler tests.

Move common metadata to single place.

Fix style.

Update docstring.

Fix poster button.

Improve bumper events.

Fix test after rebase.

Address comments.

Download transcript: use def video lang, not bump.

Renamed date_last_view_bumper to bumper_last_view_date.

Rename do_not_show_again_bumper to bumper_...

Address comments.

Fix tests for download for en lang.

Fix bumper logic.

Update strings.

Update resizer.

Remove resizer.

Fix unit tests.

Add tests.

Fix bumper events.

Clean up tests.

Fix pylint violations.

Fix pep8 and pylint violations.

Update docs and method names.

Update events.

Make /static/ prefix a must.

Fix wrong code.
2015-05-31 14:45:31 +03:00