Commit Graph

7897 Commits

Author SHA1 Message Date
David Ormsbee
ca1f76cedb Move more tests to use bulk_operations. 2017-02-24 15:21:45 -05:00
David Ormsbee
47e606b3ca Find the courses a user has certs for up front.
Before this commit, we had to do a separate query for every course a
user was enrolled in when determining whether a course was refundable
(if you have a certificate, it isn't). Now the student dashboard will
make a one-time query to grab all of a user's cert-issued courses. This
is indexed, so it should be much faster than grabbing each one
separately.
2017-02-23 22:24:00 -05: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
Matt Drayer
685524bb70 Merge pull request #14541 from edx/mattdrayer/direct-idp-login
ENT-228: Allow tpa_hint to match hidden providers
2017-02-22 17:10:54 -05:00
Eric Fischer
06c3445609 Short-term fix for TNL-6559 task failures 2017-02-22 14:34:36 -05:00
edx-pipeline-bot
95aa2b61ba Merge pull request #14549 from edx/release-mergeback-to-master
Merge release back to master
2017-02-22 10:08:23 -05:00
Sanford Student
c4461191bc reset grades management command choose database 2017-02-21 16:00:33 -05:00
Matt Drayer
6e661404a4 mattdrayer/direct-idp-login: Allow tpa_hint to match hidden providers 2017-02-21 14:57:43 -05:00
Ben Patterson
c0dd2b878f Lettuce-on-Xenial CMS fix. Iterate through a list to avoid quotation string confusion.
Also change some selenium settings (they were not necessary at this time).
2017-02-20 17:22:36 -05:00
Ben Patterson
0e596dd517 Multi-thread stub servers. 2017-02-20 17:22:23 -05:00
Ben Patterson
e7b0c28d57 Fixes for chrome reliability in selenium.
Fix for rendering timing issue. See https://bugs.chromium.org/p/chromedriver/issues/detail?id=1552
2017-02-20 17:22:02 -05:00
Ben Patterson
452a1f1fbb Refactor click since it was resulting in timeout errors; use correct id for one of the LTI stub's buttons. 2017-02-20 17:21:42 -05:00
Ben Patterson
c58e514231 Properly wait for LTI stub's buttons to render 2017-02-20 17:21:41 -05:00
Umar Nawaz
e6e32d7964 Merge pull request #14521 from edx/unawaz/ECOM-6949-sailthru-cookie-test
Unawaz/ecom 6949 sailthru cookie test
2017-02-19 23:19:09 -08:00
Simon Chen
c38de9638c Revert "edx.org/login?next= should not be able to point to an asset"
This reverts commit bc418c47c5.
2017-02-17 14:53:57 -05:00
Eric Fischer
e04dbbe1e5 Merge pull request #14529 from edx/efischer/unclean_grades
Unclean Grades
2017-02-17 14:16:38 -05:00
Albert (AJ) St. Aubin
e3fe2f9780 Merge pull request #14533 from edx/aj/TNL-6552_upgrade_cookie
update session cookie with the course id
2017-02-17 11:09:42 -05:00
Eric Fischer
7d82f32f5b Fix issue with test ordering
The second test here is not idempotent, so we must needs reset the
course before each test.
2017-02-17 09:48:56 -05:00
Eric Fischer
fd1ed2ce6d Remove unneeded validation on grades model
These checks are causing SQL query numbers to scale linearly with the
number of subsections being created/updated, and the errors they
check for have not been seen in prod.

TNL-6225
2017-02-17 09:48:56 -05:00
umar-nawaz
d2f370dd38 Sailthru cookie name statements in add_email_marketing_cookies function 2017-02-17 16:35:39 +05:00
Albert St. Aubin
13ee3056ff update session cookie with the course id 2017-02-16 14:41:37 -05:00
Ahsan Ulhaq
bc418c47c5 edx.org/login?next= should not be able to point to an asset
ECOM-6463
2017-02-16 14:44:01 +05:00
Nimisha Asthagiri
a4f70ba4da Merge pull request #14505 from edx/beryl/cbs_tranformer_version_hash
Block Transformers: Version Hash
2017-02-14 14:44:35 -05:00
Nimisha Asthagiri
b99e9ae252 Block Transformers: Transformers Version Hash
TNL-6519
2017-02-14 11:34:29 -05:00
Douglas Hall
3055f9b259 Merge pull request #14339 from edx/hasnain-naveed/program-backend/WL-912
WL-766 Program marketing page data layer
2017-02-14 04:53:53 -05:00
Hasnain
41f3bba058 Backend code for program detail page.
This adds functions to the catalog utils which munge data
collected from the program endpoint and LMS database to construct
data structures that are ready for use by view and templates
related to the Open EdX marketing pages that live in LMS.

WL-766
2017-02-13 20:37:56 -05:00
Douglas Hall
58f0154ee2 Add support for multi-org sites
WL-926
2017-02-13 19:33:47 -05:00
Nimisha Asthagiri
6626725781 Merge pull request #14504 from edx/beryl/cbs_transformer_versions
Block Transformers: distinguish between READ and WRITE versions
2017-02-13 13:32:05 -05:00
Nimisha Asthagiri
71cce9bb73 Block Transformers: distinguish between READ and WRITE versions
TNL-6522
2017-02-13 12:20:22 -05:00
Ayesha Baig
61f2067935 [YONK-513]: Add feature flag which allows for disabling of account creation 2017-02-13 12:28:57 +05:00
J. Cliff Dyer
be8a898e68 Add logging to recalculate grades base task.
TNL-6294

* Use external celery_utils in edx-platform (TNL-6454)
* Remove old openedx.core celery_utils implementation.
2017-02-10 16:07:51 -05:00
Albert (AJ) St. Aubin
c1e2d39b38 Merge pull request #14444 from edx/aj/TNL-6381_upsell_msg
Aj/tnl 6381 upsell msg
2017-02-10 07:25:23 -05:00
Albert St. Aubin
97d7633774 Added upgrade upsell to course info banner and url parameter
TNL-6381
2017-02-09 20:21:39 -05:00
Jesse Shapiro
424b4356a5 Merge pull request #14400 from open-craft/haikuginger/enterprise-course-consent
[ENT-101] Add course-specific data sharing consent hooks for Enterprise app
2017-02-09 18:37:55 -05:00
Renzo Lucioni
dda0e03f65 Merge pull request #14488 from edx/renzo/finish-catalog-transition
Finish transition to catalog for program data
2017-02-09 16:10:44 -05:00
Renzo Lucioni
0e06e90599 Finish transition to catalog for program data
Updates Mako and Underscore templates as well as Backbone models and views so they work with catalog programs. Removes all remaining response munging from the back end.

ECOM-4422
2017-02-09 14:51:26 -05:00
Jesse Shapiro
9a573de533 Add consent check to course access prerequisites; add utility functions to provide interface to course-specific consent in Enterprise app 2017-02-09 13:49:57 -05:00
Nimisha Asthagiri
31ec562168 Merge pull request #14490 from edx/beryl/request-cache-feature-flag
request-cache grades feature flag to avoid 400+ memcached hits
2017-02-08 11:41:55 -05:00
Nimisha Asthagiri
2026a518d5 Merge pull request #14489 from edx/beryl/new-relic
Add new relic parameters to grades task
2017-02-08 11:41:30 -05:00
Nimisha Asthagiri
f2abce53cb request-cache grades feature flag to avoid 400+ memcached hits 2017-02-08 10:01:52 -05:00
sanfordstudent
37c266f08f Merge pull request #14423 from edx/sstudent/TNL-6219
add course and user id to library content assigned
2017-02-08 09:47:59 -05:00
Nimisha Asthagiri
697b3d7d98 Add new relic parameters to grades task 2017-02-07 19:29:17 -05:00
Sanford Student
1a5e15fd5c add course and user id to library content assigned 2017-02-07 13:52:15 -05:00
Renzo Lucioni
9be3191829 Merge pull request #14462 from edx/renzo/programs-from-catalog
Load all programs from the catalog
2017-02-07 10:42:17 -05:00
Renzo Lucioni
e7771148b7 Load all programs from the catalog
This commit contains back end changes necessary to load programs from the catalog in all contexts. The existing program munging utility is applied as late as possible to avoid conflating this work with changes to the front end; those will be made separately.

ECOM-4422
2017-02-06 23:16:29 -05:00
Douglas Hall
06fa13f4df Allow for customization of course email template at the organization level 2017-02-06 14:23:58 -05:00
Nimisha Asthagiri
9436edf856 Merge pull request #14446 from edx/beryl/grades-mongo-query
Fix mongo query count for Grades API
2017-02-02 11:13:06 -05:00
Nimisha Asthagiri
7cc08399c6 Fix mongo query count for Grades API 2017-02-01 17:58:36 -05:00
Nimisha Asthagiri
1912176c5a Merge pull request #14438 from edx/beryl/cohort_integrity_error
Fix cohort IntegrityErrors
2017-02-01 15:35:21 -05:00
Jesse Zoldak
b0647e7d83 Revert "Fix mongo query count for Grades API" 2017-02-01 11:09:43 -05:00