Commit Graph

17727 Commits

Author SHA1 Message Date
Aarif
d89a1b872d Merge pull request #22713 from edx/BOM-1131
Updated the Mako Loader to remove deprecated methods
2020-01-10 21:34:04 +05:00
edX cache uploader bot
6eefba4e14 Updating Bokchoy testing database cache (#22792) 2020-01-10 09:44:26 -05:00
Awais Qureshi
390bae36e8 Bom-1146
Due to some recent schema changes this test is failing. Temporarily skipping it. Fix it in other PR.
2020-01-10 10:59:45 +05:00
mraarif
ecdf2a3ebd updated the custom Loader to remove deprecated methods 2020-01-10 03:16:29 +05:00
Stu Young
6fa7940792 Add django simple history to student.ManualEnrollmentAudit (#22629)
add django simple history to student.ManualEnrollmentAudit
2020-01-09 16:29:18 -05:00
David Ormsbee
bb271e10e8 Revert "Request cache context processor output."
This reverts commit ad5cc3d5d9.

This was causing middleware errors while processing 404s.
2020-01-09 10:51:42 -05:00
Mahyar Damavand
f1c5981fab Removing deprecated management commands which intended to clear historical data (#21522) 2020-01-08 12:50:34 -05:00
edX cache uploader bot
460a08d3f4 Updating Bokchoy testing database cache (#22762) 2020-01-08 09:41:42 -05:00
edX cache uploader bot
58b6247d6b Updating Bokchoy testing database cache (#22759) 2020-01-08 07:54:57 -05:00
Usama Sadiq
2de89d6e49 Merge pull request #22732 from edx/usama/bom-1136
BOM-1136
2020-01-08 11:49:04 +05:00
Troy Sankey
1178ad8b8b Rename order in CreditRequirement (3/3)
This stage does the following:

- Includes a migration to delete the old column.
- NO code changes.
2020-01-07 19:17:56 +05:00
usama sadiq
1c52f19f19 Deprecation of the direct assignment to the forward side of a many-to-many set
Changed the direct assignments with the use of set() method.
2020-01-07 14:40:23 +05:00
edX cache uploader bot
02daf89745 Updating Bokchoy testing database cache (#22706) 2020-01-03 15:56:55 -05:00
Ned Batchelder
ae6132c2eb Merge pull request #22693 from cclauss/patch-1
from xmodule.modulestore.exceptions import MultipleLibraryBlocksFound
2020-01-03 13:00:42 -05:00
Troy Sankey
407c8cb076 Rename order in CreditRequirement (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-01-03 18:07:28 +05:00
Christian Clauss
69f286c90c from xmodule.modulestore.exceptions import MultipleLibraryBlocksFound
Undefined name: __MultipleLibraryBlocksFound__ is raised on line 1096 but is never defined or imported.
2020-01-02 23:49:32 +01:00
Ned Batchelder
471bb41b5b Merge pull request #22680 from edx/nedbat/remove-accepts
Remove unused code
2020-01-02 11:17:13 -05:00
Manjinder Singh
6c69b6d435 Adding code to output pytest warnings. (#22570)
* Added pytest-json-report plugin
	- modifying app-opts in setup.cfg
	- adding hook to all conftest.py files in repo
	- setting report to be saved to test_root/log/warnings.json
	- Writing custom logic to save json report to avoid overwrite if pytest called twice
This was created to allow us to easily parse through test warnings in jenkins
2020-01-02 10:01:52 -05:00
edX cache uploader bot
f4bb9b4b8e Updating Bokchoy testing database cache (#22681) 2020-01-02 09:45:19 -05:00
Ned Batchelder
05700f724e Remove unused code 2020-01-02 07:22:17 -05:00
Zainab Amir
43a06fe385 Fix failing bokchoy test (#22670) 2020-01-02 11:03:01 +05:00
David Ormsbee
ad5cc3d5d9 Request cache context processor output.
In Django template rendering, context processors only run once.
But when we do template rendering through edxmako (which we do for
each and every web fragment/XBlock), we can end up having hundreds
of invocations of templates and run context processors for each
separately. This removes that work.
2019-12-30 16:38:46 -05:00
David Ormsbee
2cb2265ffe Add request caching to reduce ORM queries
This adds request caching to the following places:
* course expiration wrapper (displayed in Units)
* offer banner generation (displayed in Units)
* get_enrollment
* user_by_anonymous_id
* youtube_disabled_for_course

On a sample course with edx-val enabled, this reduced the queries
for a large sequence from 450 to 155.
2019-12-30 16:19:25 -05:00
edX cache uploader bot
e326520c03 Updating Bokchoy testing database cache (#22655) 2019-12-30 15:57:43 -05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
39d3a7ca17 Fix pep8 issues caused by the fixer. 2019-12-30 11:42:04 -05:00
Feanil Patel
61e1eda20d Merge pull request #22644 from edx/feanil/2to3_imports
Run `2to3 -f future . -w`
2019-12-30 11:21:05 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
edX cache uploader bot
a6f374c90b Updating Bokchoy testing database cache (#22640) 2019-12-30 09:55:34 -05:00
Jeremy Bowman
63574e12b8 Remove pytest version constraint (#22626)
Fix the issue that was preventing us from upgrading pytest.  pytest does some manipulation of test packages that prevents `pkg_resources` from loading resources from them, but used to contain a workaround for the problem.  That workaround was [removed](https://github.com/pytest-dev/pytest/issues/5392) in 4.6.0 as a performance enhancement when pytest switched from `pkg_resources` to `importlib-metadata` for its own entrypoint handling.  This tripped up one of our test modules which defined classes that loaded templates from inside a test package.  Moving these resources to the parent package fixes the problem.

More and more, `pkg_resources` is being abandoned in favor of `importlib-metadata` and `importlib_resources` as they have a simpler design with much better performance.  However, `importlib_resources` doesn't support loading files from any directory which isn't itself a Python package (and doesn't allow direct use of paths including directories within the package).  Jinja2 chose a [different approach](https://github.com/pallets/jinja/pull/1082) that we may want to emulate in our resource handling.

Also fixed usage of a removed `pytest.raises()` parameter and a bug in our configuration of the `common/lib` tests that became a problem after the upgrade.
2019-12-30 09:10:57 -05:00
Awais Qureshi
c7c6242a0e Merge pull request #22617 from edx/awais786/BOM-1124
BOM-1124
2019-12-30 15:09:27 +05:00
Zainab Amir
257c635a68 Fix Targeted Feedback HTML (#22606)
etree.tostring returns bytes instead of string which when converted
back to XML, to be rendered as etree element, presents stray
characters.

PROD-1116
2019-12-30 15:06:02 +05:00
Awais Qureshi
804a84f9cf BOM-1124
Direct assignment to the forward side of a many-to-many set is deprecated Fixing this issue.
2019-12-28 00:04:15 +05:00
Feanil Patel
59808c82f1 Merge pull request #22611 from edx/feanil/fix_mathjax_bug
Don't try to typset mathjax if Hub has not loaded.
2019-12-27 11:22:22 -05:00
edX cache uploader bot
1cbe81f747 Updating Bokchoy testing database cache (#22614) 2019-12-27 09:19:10 -05:00
edX cache uploader bot
fe1f69741e Updating Bokchoy testing database cache (#22608) 2019-12-26 16:39:55 -05:00
Feanil Patel
ff40369990 Don't try to typset mathjax if Hub has not loaded.
In our tests there are times when Mathjax has been initialized but
Hub is still undefied.  In this case don't queue up typesetting.
2019-12-26 16:13:58 -05:00
Jeremy Bowman
b2046f6674 Switch make upgrade to Python 3.5 (#22609)
* Switch make upgrade to Python 3.5

* bok-choy fixes, constrain django-debug-toolbar

* Remove flaky bok-choy test
2019-12-26 15:13:02 -05:00
David Ormsbee
10cc7895bd Merge pull request #22607 from appsembler/omar-matej/fix-image-ratio-studio
fix uploaded image aspect ratio in tinymce
2019-12-26 12:33:27 -05:00
Feanil Patel
f359c9cd8f Merge pull request #21197 from open-craft/giovanni/upgrade-pymongo
BB-1744: Bump pymongo version and fix course export issue
2019-12-26 11:16:15 -05:00
David Ormsbee
a4b64c3a79 Merge pull request #21166 from open-craft/guruprasad/fix-courseenrollment-mode-default
[BB-1506] Use a callable as the default value for CourseEnrollment.mode
2019-12-26 10:25:27 -05:00
Matej Grozdanović
4b2bf9c4ac fix uploaded image aspect ratio in tinymce 2019-12-26 16:39:39 +03:00
Adeel Khan
51da469762 Fix html editor for adding �
This patch would fix html editor
for adding � characters in
html attributes whenever cursor
is inside quotes. � characters
are added on save.

PROD-1076
2019-12-23 15:47:48 +05:00
Andytr1
b1b5403041 Merge pull request #22559 from edx/andytr1/studio_teamsconfiguration_svc
EDUCATOR-4846 - added team config service for xblocks.
2019-12-20 10:46:04 -05:00
atesker
e0d57fe1a7 EDUCATOR-4846 - added team config service for xblocks.
Quality / encoding

Remove comments

remove debug

Changed service implementation to make unit testing easier

Corrected service

code style

unit test cleanup

Clean up imports
2019-12-20 09:57:30 -05:00
Braden MacDonald
f31dc19887 Support anonymous users in the Blockstore-based XBlock runtime
Implementation details:
* Anonymous users are assigned a unique ID (like 
  `anon42c08f9996194e2a9339`) which gets stored in the django session.
  `block.scope_ids.user_id` and `block.runtime.anonymous_student_id`
  will both return this value.
* User state for anonymous users is stored in the django cache and
  automatically expires as the cache gets pruned. Because user state is
  stored, anonymous users can use interactive blocks like capa problems.
* There is no mechanism for upgrading to a registered account and
  keeping user state since the user state store for anonymous users
  (EphemeralKeyValueStore) is completely different than the one for
  registered users (DjangoKeyValueStore/"CSM"), and has no "list all
  keys" functionality.
* "User State Summary" field values are shared among [recently active]
  anonymous users but are not shared with registered users.
* Anonymous users can only access the `public_view` of XBlocks, not the
  regular `student_view`.
2019-12-19 16:12:24 -08:00
Calen Pennington
529b2312db Merge pull request #22582 from cpennington/pull-in-overwrite-storage
OverwriteStorage was removed from django-storages, so pull it into ed…
2019-12-19 14:49:15 -05:00