Commit Graph

107 Commits

Author SHA1 Message Date
bmedx
09e5156543 Remove use of non-relational fields in select_related queries
These changes should not change the actual queries at all, and those
will throw errors in Django 1.11.
2017-11-14 10:10:08 -05:00
Sanford Student
d0e68f2d24 recalculate course grade on user partition change 2017-09-21 15:32:07 -04:00
cahrens
819a56fee3 Remove usages of deprecated SlashSeparatedCourseKey. 2017-08-14 11:01:00 -04:00
cahrens
fd62164563 Remove usages of deprecated SlashSeparatedCourseKey. 2017-08-08 12:32:58 -04:00
cahrens
31d99e8d2d ED-549 Assign learner to a cohort before registration. 2017-06-16 10:23:13 +00:00
Brandon Baker
7d2d0657fe Merge pull request #15290 from edx/bbaker/educator-344
Bbaker/educator 344
2017-06-13 10:42:35 -04:00
Brandon Baker
f4c9044d2e EDUCATOR-344
Removed instances of track function
2017-06-09 18:51:10 +00:00
cahrens
3abc7dc07e isort updates 2017-06-05 13:47:48 -04:00
cahrens
36c51450c2 Adds in radio button patch request and text for page
EDUCATOR-229
2017-06-05 13:00:31 -04:00
Albert St. Aubin
c23c0b991b EDUCATOR-141: Moved the Discussions Mgt to its own tab and updated tests 2017-06-05 12:59:51 -04:00
cahrens
8951ac8c61 Refactor server-size code to enable enrollment tracks.
EDUCATOR-11
2017-06-05 12:59:50 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
John Eskew
3b57542ab0 Revert "Merge pull request #15170 from edx/jeskew/PLAT_1316_partitions_inheritance"
This reverts commit f97f052591, reversing
changes made to 800bcd8e20.
2017-05-30 12:42:54 -04:00
John Eskew
76389d8678 Run all files touched in inheritance/partition work through isort. 2017-05-25 13:24:08 -04:00
John Eskew
66f3aa5ccf Move fields.py, inheritance.py, and partitions to openedx/core. 2017-05-25 13:24:08 -04:00
Nimisha Asthagiri
adb88e21f3 Bulk-reads and Request caching in Course Grade Report
This reverts commit 5388d5d1fc.
2017-05-10 17:14:29 -04:00
Sanford Student
5388d5d1fc Revert "Bulk-reads and Request caching in Course Grade Report"
This reverts commit 16e9636513.
2017-05-09 16:25:46 -04:00
Nimisha Asthagiri
16e9636513 Bulk-reads and Request caching in Course Grade Report 2017-05-09 08:58:49 -04:00
Ahmed Jazzar
0da29d1786 Added unicode to CourseUserGroup 2017-05-01 13:14:20 +03:00
cahrens
31fbde9c1f Rename cohort methods to divided. 2017-04-27 14:58:08 -04:00
Christina Roberts
5bcf7422d9 Merge pull request #14830 from edx/christina/change-default-cohorting
Change default value for "always_cohort_inline_discussions" to False
2017-04-10 10:04:55 -04:00
cahrens
121078eb67 Change default value for "always cohort".
TNL-6815
2017-04-07 13:02:25 -04:00
Jeff LaJoie
413bce3d72 TNL-6739: adds in masquerading as enrollment track user 2017-04-06 09:35:08 -04:00
Albert St. Aubin
21ef60b4c4 Added filter to the cohort user count data to show the counts of only
active users
2017-03-30 12:02:34 -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
Nimisha Asthagiri
95b4cbbcf8 Fix cohort Integrity Errors
TNL-5725
2017-01-31 22:56:56 -05:00
cahrens
a6776f6973 Always check group access when masquerading.
TNL-6050
2017-01-19 14:47:10 -05:00
J. Cliff Dyer
f33832a691 scoutrule: dedupe skip_unless_lms 2017-01-18 09:43:46 -05:00
attiyaishaque
76e1d4a75c TNL-5621 Fix discussion topics in MIT course. 2016-11-09 22:26:48 +05:00
J. Cliff Dyer
9366c43a83 Fix issues with RequestFactory used as Request.
* Centralize creation of quick request objects.
* Isolate caches to individual tests to prevent test ordering
  dependencies.

TNL-5811
2016-11-07 10:51:04 -05:00
Toby Lawrence
6704e17afd [TNL-5632] Optimize the single_thread view.
Firstly, we're now explicitly instructing the comments service to not
return thread responses/comments if the request isn't AJAX.  So, if you
load the URL for a single discussion thread in your browser, this would
be a non-AJAX call and we'll avoid loading the responses for the entire
thread behind-the-scenes.  Big win here for large threads.

Next, we removed a redundant "get threads" call which was also happening
behind-the-scenes.  This call was redundant as the front-end JS also
grabs the thread list when a topic is chosen, so we were making an
extranenous call for no benefit.  Poof, gone!

Finally, we added some caching of database queries that are required to
drive a lot of the permissions/cohorts machinery around discussion.
This will have a minimal effect but introduced a cleaner way to apply
general memoization at the per-request level which will let us further
cache things as we identify them as issues.
2016-10-18 13:11:30 -04:00
John Eskew
3614eb2800 Move xmodule_django app to openedx.core.djangoapps 2016-10-06 14:50:40 -04:00
cahrens
9d8611374f Silence expected IntegrityErrors.
TNL-5181
2016-08-09 21:44:39 -04:00
Eric Fischer
3ba09221c1 Add Logging for CohortMembership 2016-08-05 22:15:50 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
cahrens
c195e7eb72 There is no need to call save after add/remove. 2016-07-27 16:15:16 -04:00
John Eskew
0899871958 Merge pull request #11042 from edx/jeskew/xml_removal
Remove XML modulestore code from most tests.
2016-04-27 11:20:02 -04:00
cahrens
1cd54d5fb7 Rename "is_default_cohort" method. 2016-04-14 16:38:34 -04:00
John Eskew
91c94977d5 Unify usage of a single test mixed modulestore called:
TEST_DATA_MIXED_MODULESTORE
Remove these test mixed modulestores:
TEST_DATA_MIXED_TOY_MODULESTORE
TEST_DATA_MIXED_CLOSED_MODULESTORE
TEST_DATA_MIXED_GRADED_MODULESTORE
2016-04-12 11:53:51 -04:00
John Eskew
4221ca6f2a Use ToyCourseFactory instead of the XMLModuleStore-backed toy course. 2016-04-12 11:53:50 -04:00
cahrens
28d743e2c8 Allow the "Default Group" to be renamed.
TNL-4355
2016-04-08 19:10:41 -04:00
Ned Batchelder
2e1238b83e Remove unused imports 2016-04-08 11:23:05 -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
cahrens
2f3e3a55bb Remove unused profile name.
The profile name requires escaping when displayed. Proactively removing since it is not being used. Also discovered some dead code.
2016-03-07 09:37:39 -05:00
Toby Lawrence
9654449302 Merge pull request #11465 from edx/perf/speed-up-courseware-tests
Switch to SharedModuleStoreTestCase in the 'courseware' app where possible.
2016-02-16 10:06:53 -05:00
Toby Lawrence
49d3a7d35d More quality fixes. 2016-02-16 07:58:33 -05:00
Toby Lawrence
ead2f0477b Quality fixes. 2016-02-15 21:18:53 -05:00
Ned Batchelder
432a40f035 Update post_cohort_management_fix to Django 1.8 2016-02-11 15:39:35 -05:00
Toby Lawrence
6a6ef0fd35 Fix some broken tests. 2016-02-08 14:13:36 -05:00