Commit Graph

933 Commits

Author SHA1 Message Date
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
Douglas Hall
06fa13f4df Allow for customization of course email template at the organization level 2017-02-06 14:23:58 -05:00
asadiqbal
8f5ba0115c WL-606 2017-01-25 15:05:57 +05:00
Nimisha Asthagiri
5a9179bf00 Update has_database_updated_with_new_score to handle all block types
TNL-6331
2017-01-23 15:50:16 -05:00
Eric Fischer
4b794372cd Add registration tracks as valid bulk_email targets
Hackathon XV project
2017-01-12 15:05:49 -05:00
Sanford Student
5fd94a6698 add verfication status and enrollment mode to user profile report
for TNL-6214
2016-12-29 16:44:41 -05:00
Eric Fischer
5a98a90eba Use timestamps in _has_database_updated_with_new_score check
Also fixes issue where ORA grades were never updated, by including
them in this check.

TNL-5994
TNL-5995
2016-12-09 13:46:34 -05:00
Sanford Student
5f2ffbe75b implementation of grading events
for TNL-5045
2016-12-07 14:47:08 -05:00
Eric Fischer
6ed02f3b73 Merge pull request #14067 from edx/efischer/staff_v_instructor
Clarify instructor vs staff accessible features on dashboard
2016-12-01 09:31:01 -05:00
Eric Fischer
d294a91fb1 Clarify instructor vs staff accessible features on dashboard
Using the guideline "Course staff should have access to features related to
individual learners, but not course-wide modifications", most tools on the
student admin sub-tab of the instructor dashboard should be available to
staff as well as instructors.

TNL-5907
2016-11-30 15:36:37 -05:00
Nimisha Asthagiri
e87388e24c Grades cleanup before updating grade report
Remove deprecated SingleSectionGrader.  TNL-5987
Remove display_name and module_id from Scores objects
Update CourseGradeFactory.__init__ to not be user-specific
Update some callers to use CourseGrade class instead of "summary" dict
Remove no longer needed course_grades.py module.
Renamed django signal from GRADES_UPDATED to COURSE_GRADE_CHANGED
2016-11-30 12:36:25 -05:00
Sanford Student
4eb5311ece Separating problem raw score changed and problem weighted score changed signals
For TNL-5993
2016-11-30 10:15:07 -05:00
Gregory Martin
89cf7ee90c Merge pull request #14022 from edx/yro_add-unset-dateutils
instructor dash course start and end
2016-11-18 16:34:23 -05:00
Gregory Martin
2d60c65e7b review fix 2016-11-18 13:56:52 -05:00
Gregory Martin
a6a7b7edb7 instructor dash course start and end 2016-11-18 11:06:14 -05:00
Nimisha Asthagiri
fda2ceac8d Fix Delete-Student-State CSM entry deletion 2016-11-18 10:27:12 -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
Eric Fischer
6a47311479 Update Persisted Course Grade on Subsection Grade update
Makes use of the new SUBSECTION_SCORE_CHANGED signal to trigger a task that
updates persisted course grade values. We've also renamed SCORE_CHANGED to
PROBLEM_SCORE_CHANGED to head off any issues with unclear signal names.

TNL-5740
2016-10-25 14:47:31 -04:00
Qubad786
65ef041a53 Add ability to generate certs for audit_passing/audit_notpassing learners 2016-10-21 16:03:29 +05:00
Mushtaq Ali
dacfcc985f Generate certificates for verified users with audit certificate statues - ECOM-5012 2016-10-21 16:03:28 +05:00
Nimisha Asthagiri
aa000c1a3d Support for rescoring a problem only if the new score is higher
TNL-5046
2016-10-20 15:08:54 -04:00
Eric Fischer
0928cfde80 Merge pull request #13734 from edx/efischer/async_grade
Update persistent grades asynchronously
2016-10-13 15:02:44 -04:00
Eric Fischer
70e029b1f5 Update persistent grades asynchronously
For better user-facing performance, the SCORE_CHANGED signal is now handled by
enqueueing an async task to update the relevant stored grade, rather than
making the request wait until that operation finishes.

TNL-5738
2016-10-13 14:06:06 -04:00
Andy Armstrong
4d4097e13c Move dark_lang and lang_pref apps to openedx/core 2016-10-13 11:56:24 -04:00
Sanford Student
54d34e834d update all references to instructor module 2016-10-12 11:35:02 -04:00
Sanford Student
79eaa4e2e9 update all references to instructor module 2016-10-12 10:04:32 -04:00
Brandon DeRosier
6e23a2ca95 Merge pull request #13196 from open-craft/haikuginger/change-coaches-to-staff
Change CCX coaches to have staff role on CCX courses.
2016-10-07 18:29:14 -04: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
Brandon DeRosier
9563b4d2fe Change content groups message when in a CCX 2016-10-07 11:59:16 -04:00
Brandon DeRosier
8c3224b4f0 Finish implementing CCX coach as staff 2016-10-07 11:53:32 -04:00
Nimisha Asthagiri
15d9883f76 Create core/url_utils.py, moving utilities from lms_xblock/runtime 2016-10-06 21:59:11 -04:00
Eric Fischer
50d55bbad6 Merge branch 'release' into release-10-06-conflict 2016-10-06 14:25:47 -04:00
Eric Fischer
e24915d286 Revert "Merge pull request #13614 from edx/efischer/revert_grades"
This reverts commit 9aa35cd8ad.
2016-10-06 14:25:27 -04:00
Eric Fischer
7be2093edb Break early if max_score is not defined
Some XModules are breaking their contracts and defining has_score but not
max_score.

TNL-5715
2016-10-06 09:15:14 -04:00
Brian Beggs
9ec45e8ed7 Merge pull request #13499 from mitocw/blarghmatey/update_compute_grades_command
Updated `compute_grades` command for Django 1.8
2016-10-04 18:38:43 -04:00
Sanford Student
bcaa873be0 bug fix for TNL-5601
fixes signal handling for delete student state
2016-10-01 23:23:09 -04:00
Eric Fischer
d772cb0ada Revert "Merge pull request #13614 from edx/efischer/revert_grades"
This reverts commit 0ea8e1b9b2, reversing
changes made to e3db08f194.
2016-09-30 16:52:05 -04:00
Adam
9aa35cd8ad Merge pull request #13614 from edx/efischer/revert_grades
Potential Grades revert PR
2016-09-30 14:08:58 -04:00
Eric Fischer
e00fe03d9d Revert "Merge pull request #13539 from edx/sstudent/TNL-5601"
This reverts commit e3db08f194, reversing
changes made to 51c2444de3.
2016-09-30 10:05:44 -04:00
sanfordstudent
e3db08f194 Merge pull request #13539 from edx/sstudent/TNL-5601
fire SCORE_CHANGED on student state reset
2016-09-30 09:34:59 -04:00
Sanford Student
e9f92bd05a fire SCORE_CHANGED on student state reset 2016-09-29 13:42:12 -04:00
asadiqbal
03ed0347c4 - WL-612 2016-09-29 18:23:44 +05:00
Tobias Macey
675f5e97b1 Updated compute_grades command for Django 1.8
The interface for custom management commands changed in Django 1.8 which
caused the `compute_grades` command to stop working. In order to fix it
I added an `add_arguments` method for specifying the accepted arguments
and updated the command to allow for passing a list of courses to run
the `offline_grade_calculation` against.
2016-09-28 15:22:30 -04:00
Eric Fischer
8857b35b15 Remove offline grade calc
This management command has been broken since before the django 1.8
upgrade, so I'm deleting it and all its tests, and updating a few
other files that used these methods but are easily refactored away.
2016-09-23 16:43:10 -04:00
Nimisha Asthagiri
5822919549 Cache Enrollment state for (user, course) in request cache. 2016-09-12 15:56:03 -04:00
Chris Rodriguez
b5efcc15f5 AC-530 fixing link-href ignores in the platform 2016-08-19 10:04:40 -04:00
Mushtaq Ali
fb2f9948e1 Fix dynamic load RequireJs issue on Maintenance Dashboard 2016-08-09 13:48:20 +00:00
Mushtaq Ali
abb6af9789 Basic architecture of Maintenance App - SUST-19, SUST-42. Implement Force Publish Course view. SUST-46 2016-08-09 18:16:13 +05:00
Sanford Student
fc943ff539 moving milestones check to access.py and upgrading milestones version 2016-08-04 14:47:15 -04:00
Calen Pennington
8582da4a97 Merge pull request #12286 from cpennington/shards-as-valued-attributes
Shards as valued attributes
2016-08-04 11:13:32 -04:00