Commit Graph

126 Commits

Author SHA1 Message Date
Dave St.Germain
864f59ed1e Added the ability to assign learners to a cohort in the enrollment API. 2018-09-13 11:15:08 -04:00
Nimisha Asthagiri
700a902b68 Cleanup and remove deprecated RequestCache Django app
ARCH-223
2018-09-12 14:39:11 -04:00
Jeremy Bowman
d90afa4cde TE-2689 Remove useless pylint suppressions part 5 2018-08-21 11:07:52 -04:00
Jeremy Bowman
c290bf8a07 TE-2524 Stop using nose.plugins - openedx 2018-08-02 14:54:50 -04:00
Jeremy Bowman
4241249119 TE-2524 Stop using nose.plugins 2018-07-30 21:11:05 -04:00
Tyler Hallada
1f42d1b384 Merge pull request #18316 from edx/thallada/PLAT-1524-on-delete
PLAT-1524: Add on_delete kwarg to ForeignKey & OneToOneFields
2018-06-06 10:38:15 -04:00
Tyler Hallada
1540f9ec72 Add on_delete kwarg to ForeignKey & OneToOneFields
Django 2.0 will make this field required for `ForeignKey` and `OneToOneFields`.
In previous versions the option defaulted to `models.CASCADE` when not
specified. This change should make the deprecation warnings in the current
Django version go away.

The migrations where also modified, but the changes should not cause a change in
the database schema since `models.CASCADE` was already the old default.
2018-06-05 17:05:12 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
sandroroux
05a5631869 Allows UnregisteredLearnerCohortAssignments to delete_by_user_value. 2018-04-24 14:00:33 -04:00
Awais Jibran
02973250ea Merge pull request #17872 from edx/revert-17796-aj/COURSE_LOADING_ERROR
Revert "Logging: Error getting the course from modulestore"
2018-04-04 19:14:06 +05:00
Awais Jibran
e12120befe Revert "Logging: Error getting the course from modulestore" 2018-04-04 16:46:29 +05:00
Awais Jibran
52fba9840a Revert "Use get or create rather than create" 2018-04-04 16:44:12 +05:00
Awais Jibran
5ac5d9d532 Merge pull request #17796 from edx/aj/COURSE_LOADING_ERROR
Logging: Error getting the course from modulestore
2018-03-29 13:09:39 +05:00
Awais Jibran
5ac686bbb9 COURSE_LOADING_ERROR 2018-03-28 14:50:39 +05:00
Awais Jibran
16fda2322d Use get or create rather than create 2018-03-27 14:31:01 +05:00
Jeremy Bowman
bf86b3da98 PLAT-1942 Handle xmodule_django field deprecations 2018-02-05 15:05:54 -05:00
Jeremy Bowman
5289c7e828 PLAT-1915 Stop using deprecated BaseException.message 2018-01-31 17:22:01 -05:00
Qubad786
64555c60c0 Move request_cache to openedx.core.djangoapps 2018-01-26 15:09:25 +05:00
Jeremy Bowman
669aa13ad6 PLAT-1873 to_deprecated_string() cleanup part 2 2018-01-08 17:26:55 -05:00
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