Commit Graph

136 Commits

Author SHA1 Message Date
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
Simon Chen
6dbfb3261e Support the display of downloadable PDF course certs ECOM-5790 2016-12-08 16:52:36 -05:00
Sanford Student
54d34e834d update all references to instructor module 2016-10-12 11:35:02 -04:00
Matjaz Gregoric
344c72b3e2 Use non-ascii PLATFORM_NAME in tests.
It should help catch unicode encoding problems earlier.

This also updates python-saml dependency to a version that includes a
patch for unicode strings.
2016-09-23 15:38:23 +02:00
Sanford Student
fc943ff539 moving milestones check to access.py and upgrading milestones version 2016-08-04 14:47:15 -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
Saleem Latif
8ae92901ef 1. Merge microsites into Comprehensive Theming
2. Add site configuration overrides to theming/helpers.py
3. Move microsite.get_value from theming/helpers to site_configuration/helpers
4. Move microsite_configuration.microsite.get_value usages to site_configuration.helpers.values
2016-07-27 13:55:14 +05:00
Nimisha Asthagiri
1ada5c3487 Create Grades djangoapp
https://openedx.atlassian.net/browse/TNL-5008
2016-07-22 00:09:43 -04:00
J. Cliff Dyer
d2670a1110 Certificate Tests: remove EventTrackingTestCase when unneeded 2016-06-23 20:22:33 -04:00
Syed Hasan raza
01c8b3499c Merge pull request #12790 from edx/shr/bug/ECOM-4645-Certificate-exception-whitelisted-users
exception_handling_for_unverified_cert_status
2016-06-22 15:46:49 +05:00
Syed Hassan Raza
5f7cdcd30a exception_handling_for_unverified_cert_status 2016-06-22 13:33:40 +05:00
Awais
7ae64b4fb6 If support user re-generates the cert. Removes the invalidation entry if exists.
ECOM-4199
2016-06-21 14:08:56 +05:00
Awais
0bd1f4ccdd Adding logic to check if cert is invalidate then user cannot see the regen button.
ECOM-4217
2016-06-15 19:02:06 +05:00
Ben Patterson
707b682fe0 Revert "Adding logic to check if cert is invalidate then user cannot see the …" 2016-06-14 12:03:17 -04:00
Awais
112aa71fe0 Adding logic to check if cert is invalidate then user cannot see the regen button.
ECOM-4217
2016-06-11 15:26:30 +05:00
Simon Chen
e6137dd6af ECOM-4007 Prevent the issuing of HC certs to verified learners that haven't ID verified 2016-05-23 11:44:14 -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
Waheed Ahmed
f246c6bbd6 Automatically enable Self Generating Certificates for Self Paced Courses.
ECOM-3437
2016-04-25 17:52:47 +05:00
Giovanni Di Milia
090cefcf44 Added REST API for certificates in LMS (#12055) 2016-04-21 17:15:06 -04:00
Adam Palay
9a4f80e5c0 update query for whitelisted users who haven't yet had certs run for them
remove CertificateStatuses.regenerating
2016-04-20 09:01:49 -04:00
Adam
7600d9b03d Merge pull request #12139 from edx/fix-certificate-display-issue
fix issue where the wrong text appeared for certificate generation hi…
2016-04-15 09:52:27 -04:00
Adam Palay
18474b2d18 raise 404 if non-int user is passed to cert view 2016-04-14 09:43:56 -04:00
Adam Palay
f985169225 fix issue where the wrong text appeared for certificate generation history (ECOM-4201) 2016-04-13 16:55:10 -04:00
Omar Khan
6fc4b38ea0 Disallow free verified course modes
The verification workflow assumes that all verified courses will have a
price. Free verified course modes cause a 404 when the user attempts to
enroll or upgrade.
2016-04-12 18:06:16 -07:00
Ned Batchelder
2e1238b83e Remove unused imports 2016-04-08 11:23:05 -04:00
Ben Patterson
c9e4a1d964 Revert "Disallow free verified course modes" 2016-04-06 13:58:41 -04:00
Simon Chen
e0995b8072 Merge pull request #11374 from open-craft/omar/verified-coursemode-price
Disallow free verified course modes
2016-04-06 12:32:00 -04:00
Jonathan Piacenti
ccb5b6c74c Adjust get_completion_badge usages to handle exceptions. 2016-04-01 10:13:09 -05:00
Jonathan Piacenti
61c76771f8 Add completion and enrollment badges. 2016-04-01 10:13:08 -05:00
Jonathan Piacenti
112a143589 Refactor badging, move into its own app. 2016-04-01 10:13:08 -05:00
Attiya Ishaque
751890b3da Email address with '+' is accepted by Student Support. 2016-03-14 18:11:19 +05:00
Peter Fogg
2d028f8246 Add an explicit cutoff date for audit cert granting.
The previous logic was a convoluted way of doing the same thing, and
has already led to one bug. Instead of hoping that the bugs are ironed
out now and that future devs maintain this logic properly, let's just
set a real cutoff date.
2016-02-10 12:16:37 -05:00
Peter Fogg
711e2e7f3c Correctly set certificate status for audit certs when regenerating.
COR-2403
2016-02-04 17:23:20 -05:00
Omar Khan
0b4fa6e5a5 Disallow free verified course modes
The verification workflow assumes that all verified courses will have a
price. Free verified course modes cause a 404 when the user attempts to
enroll or upgrade.
2016-02-03 21:19:45 +07:00
Douglas Hall
dce3d9ca81 Merge pull request #11014 from edx/douglashall/PHX-219/subsection_gating
PHX-219 Subsection Gating
2016-01-29 11:05:39 -05:00
Douglas Hall
37a7fdc0f2 Added subsection gating feature 2016-01-28 14:05:20 -05:00
Zia Fazal
463e8c82cf Cert Social Sharing customization
changes after feedback from matte
2016-01-28 14:26:48 +05:00
Peter Fogg
96cc38951d Disable audit certificates for new audit enrollments.
Two new certificate statuses are introduced, 'audit_passing' and
'audit_notpassing'. These signal that the GeneratedCertificate is not
to be displayed as a cert to the user, and that they either passed or
did not. This allows us to retain existing grading logic, as well as
maintaining correctness in analytics and reporting.

Ineligible certificates are hidden by using the
`eligible_certificates` manager on GeneratedCertificate. Some places
in the coe (largely reporting, analytics, and management commands) use
the default `objects` manager, since they need access to all
certificates.

ECOM-3040
ECOM-3515
2016-01-22 10:27:55 -05:00
Matt Drayer
2c1680a9cb Merge pull request #11080 from edx/saleem-latif/SOL-1529
SOL-1529: Allow PMs to Invalidate Certificates
2016-01-04 10:46:27 -05:00
Saleem Latif
9aa0a01cae Allow PMs to Invalidate Certificates 2016-01-04 14:28:32 +05:00
Peter Desjardins
2bf25b2f51 Merge pull request #11043 from edx/pdesjardins/DOC-2543-b
Edit text strings in default template for web certificates to make them more generally applicable
2015-12-22 08:56:57 -05:00
Saleem Latif
475429c0a6 Web Certificates: Platform Branding integration 2015-12-22 11:50:15 +05:00
Peter Desjardins
451ae3b2e7 Edited text strings in the default template for web certificates to remove wording specific to edx.org. Addresses DOC-2543. 2015-12-21 16:31:17 -05:00
Matt Drayer
17d1f9be0c Merge pull request #11037 from edx/ziafazal/SOL-1496
SOL-1496: added a slug field to reference template asset using this field
2015-12-21 10:31:39 -05:00
Zia Fazal
bb1c86baff added a slug field to reference template asset using this field
removed print statement

removed unnecessary status code assertion
2015-12-21 17:48:56 +05:00
asadiqbal
37aebaa73b SOL-1492 2015-12-18 18:19:17 +05:00
Matt Drayer
115b169259 mattdrayer/SOL-1519: Include course-level configuration in feature check 2015-12-13 09:57:29 -05:00
Matjaz Gregoric
f5c2f49eb5 Fix issue with unicode characters in certificates.
If platform name or "All rights reserved" translation contain non-ascii characters,
certificate HTML view would break with "'ascii' codec can't encode character...".
2015-12-09 09:54:09 +01:00