Commit Graph

47 Commits

Author SHA1 Message Date
George Babey
26bac9f611 Moved paginators to edx_rest_framework_extensions package
Pagination should be standard and easy to adopt so moved the paginators
into the edx_rest_framework_extensions package so they can be easily
installed into other app/projects
2018-02-16 09:46:01 -05:00
Nimisha Asthagiri
51dcb5a536 Merge pull request #17392 from mitodl/hack18_bookmarks_django_plugin
Changed 'bookmarks' django app to follow plugin pattern
2018-02-06 14:21:38 -05:00
Jeremy Bowman
bf86b3da98 PLAT-1942 Handle xmodule_django field deprecations 2018-02-05 15:05:54 -05:00
Gavin Sidebottom
7f3ffcc047 Changed 'bookmarks' django app to follow plugin pattern 2018-02-01 15:30:06 -05:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
bmedx
95e76dcafe Small fixes to LMS unit 1 failures in Django 1.11 tests 2018-01-08 10:20:30 -05:00
bmedx
d827d47b48 Tag LMS Unit 2 tests that fail in Django 1.11 2017-11-22 15:47:22 -05:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
Clinton Blackburn
69eeca61d8 Opening courseware to anonymous users
Anonymous users may now view units in the courseware. This access is limited to units that are not considered problems/graded (e.g. homework, exams).
2017-11-06 16:42:06 -05:00
Brian Mesick
0255592c67 Merge pull request #16436 from edx/bmedx/django111_urls_openedx
openedx urls cleanup for Django 1.11
2017-11-06 10:36:20 -05:00
bmedx
68e3894c17 openedx urls cleanup for Django 1.11
- Remove usage of django.urls.patterns
- Change urls tuples to lists
- Make all string view names callables
2017-11-03 16:11:41 -04:00
John Eskew
3f99fe4c1b Move bookmarks startup.py over to AppConfig::ready 2017-11-03 12:47:58 -04:00
cahrens
fd62164563 Remove usages of deprecated SlashSeparatedCourseKey. 2017-08-08 12:32:58 -04:00
Andy Armstrong
0f808cec78 Implement theme admin UI to support previewing
LEARNER-2017
2017-07-27 17:24:31 -04:00
Jesse Shapiro
fa9c09f9fe Remove Enterprise SSO hooks 2017-07-21 18:24:09 -04:00
Uman Shahzad
8b65ca17c5 Migrate to latest, split python-social-auth.
PSA was monolothic, now split, with new features, like
a DB-backed partial pipeline. FB OAuth2 version also upped.

Partial pipelines don't get cleared except when necessary.
They persist for special cases like change of browser while
still mid-pipeline (i.e. email validation step).

Refactor, cleanup, and update of a lot of small things as well.

PLEASE NOTE the new `social_auth_partial` table.
2017-06-20 22:05:36 +05:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Calen Pennington
3deb3a3c1b Merge pull request #14977 from cpennington/cale/fix-learner-542
Cale/fix learner 542
2017-05-01 12:18:03 -04:00
Calen Pennington
1811f7235f Minimize the number of queries done while noop updating a user-preference 2017-04-28 12:26:41 -04:00
Ned Batchelder
4a568476fd Remove a number of unneeded super()-delegation methods 2017-04-27 14:12:56 -04:00
David Ormsbee
2051c90924 Test Speedup: Isolate Modulestore Signals
There are a number of Django Signals that are on the modulestore's
SignalHandler class, such as SignalHandler.course_published. These
signals can trigger very expensive processes to occur, such as course
overview or block structures generation. Most of the time, the test
author doesn't care about these side-effects.

This commit does a few things:

* Converts the signals on SignalHandler to be instances of a new
  SwitchedSignal class, that allows signal sending to be disabled.

* Creates a SignalIsolationMixin helper similar in spirit to the
  CacheIsolationMixin, and adds it to the ModuleStoreIsolationMixin
  (and thus to ModuleStoreTestCase and SharedModuleStoreTestCase).

* Converts our various tests to use this new mechanism. In some cases,
  this means adjusting query counts downwards because they no longer
  have to account for publishing listener actions.

Modulestore generated signals are now muted by default during test runs.
Calls to send() them will result in no-ops. You can choose to enable
specific signals for a given subclass of ModuleStoreTestCase or
SharedModuleStoreTestCase by specifying an ENABLED_SIGNALS class
attribute, like the following example:

    from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase

    class MyPublishTestCase(ModuleStoreTestCase):
        ENABLED_SIGNALS = ['course_published', 'pre_publish']

You should take great care when disabling signals outside of a
ModuleStoreTestCase or SharedModuleStoreTestCase, since they can leak
out into other tests. Be sure to always clean up, and never disable
signals outside of testing. Because signals are essentially process
globals, it can have a lot of unpleasant side-effects if we start
mucking around with them during live requests.

Overall, this change has cut the total test execution time for
edx-platform by a bit over a third, though we still spend a lot in
pre-test setup during our test builds.

[PERF-413]
2017-02-23 10:31:16 -05:00
J. Cliff Dyer
f33832a691 scoutrule: dedupe skip_unless_lms 2017-01-18 09:43:46 -05:00
Nimisha Asthagiri
99e6d53939 Preload definitions when collecting block structures 2016-12-29 08:51:26 -05:00
Felipe Montoya
38e787b65c Quick fixes for users with unicode usernames.
This changes fix the bookmarks feature and image upload
2016-10-25 15:30:52 -05:00
Nimisha Asthagiri
84bdd8598b Merge pull request #13686 from edx/openedx_cleanup/misc
Remove few LMS references from openedx/core
2016-10-07 13:33:51 -04:00
Nimisha Asthagiri
15d9883f76 Create core/url_utils.py, moving utilities from lms_xblock/runtime 2016-10-06 21:59:11 -04:00
John Eskew
3614eb2800 Move xmodule_django app to openedx.core.djangoapps 2016-10-06 14:50:40 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Ned Batchelder
8571ceabeb Fix many wrong-assert-type errors 2016-08-03 12:44:41 -04:00
cahrens
682ee5eac1 Rename helper method that was being run as a testpoint. 2016-07-25 16:17:40 -04:00
cahrens
d061b8ddbe Use request_cache for storing disabled xblock names.
TNL-5002
2016-07-25 16:17:30 -04:00
Matt Drayer
68312bdd2d Revert "Revert "saleem-latif/WL-328: Multi-Site Comprehensive Theming""
2. Update COMPREHNSIVE_THEME_DIR to COMPREHENSIVE_THEME_DIRS
3. Update paver commands to support multi theme dirs
4. Updating template loaders
5. Add ENABLE_COMPREHENSIVE_THEMING flag to enable or disable theming via settings
6. Update tests
7. Add backward compatibility for COMPREHEHNSIVE_THEME_DIR
2016-06-30 15:19:51 +05:00
Hasnain
11454640da Added middleware to redirect the user from expired course page to all courses page. 2016-06-01 14:56:27 -04:00
Adam Palay
a7d638de9e clear request cache after celery task finishes (TNL-2705)
set max_num_courses_in_cache on modulestore
2016-05-18 10:43:54 -04:00
Calen Pennington
853bfe7a36 Add a TestCase mixin for enabling caches in tests
By default, disable all caching in tests, to preserve test independence.
In order to enable caching, inherit from CacheSetupMixin, and specify
which cache configuration is needed.

[EV-32]
2016-05-04 14:51:30 -04:00
Ben Patterson
c504029b39 Create a third shard for lms unit tests.
This will leverage the nose attrib plugin to allow us
to break tests apart on our build system to run
in parallel on separate nodes.
2016-03-17 12:01:42 -04:00
muzaffaryousaf
509522414a Using display_name_with_default instead of display_name.
TNL-4103
2016-02-19 16:50:23 +05:00
David Ormsbee
8fa8b209a7 Remove query counts from Bookmarks HTTP API tests.
Query counts already happen at the model and Python API test layers.
Having query counts in the HTTP API tests makes things more brittle
because that includes middleware that this code should not be aware
of. We don't want to have to revisit these tests every time
another piece of middleware is added or removed.
2016-02-08 08:05:13 -05:00
David Ormsbee
be25bb8aba Clear caches between tests for ModuleStoreTestCase/SharedModuleStoreTestCase
Cached values were leaking across tests, causing difficult to debug errors,
particularly when using Config Models. As part of this work, certain tests
that had query counts that relied on those values being cached needed to
be adjusted up.
2016-02-06 00:01:15 -05:00
Nimisha Asthagiri
f3cb692472 Safe Session Cookies Middleware 2016-01-26 17:23:03 -05:00
muzaffaryousaf
b4189784da Fixed POST bookmarks bug when display_name is None.
Added tests & general message to js when parsing fails.

TNL-3989
2016-01-12 09:47:51 -05:00
ehtesham
3385d1e128 TNL-2810 backend implementation to limit the maximum bookmarks per course 2015-12-21 22:17:58 +05:00
Usman Khalid
27dcb811e7 Speedup the bookmarks tests. 2015-12-17 22:10:22 +05:00
Usman Khalid
8bdc097293 Fixes after rebase to Django 1.8 2015-12-17 22:10:21 +05:00
muzaffaryousaf
3792943960 Fixing the failing tests for XMLModule. 2015-12-17 22:07:35 +05:00
Usman Khalid
778b921c41 Do not include path or display name in the XBlockService cache. 2015-12-17 22:07:35 +05:00
Usman Khalid
4304c66c54 Performance optimizations and cache to keep the bookmarks info updated.
The cache uses the bookmarks.XBlockCache model.

TNL-1945
2015-12-17 22:07:34 +05:00