Commit Graph

57 Commits

Author SHA1 Message Date
Sagirov Evgeniy
42adcaaf4d FC-0001: Remove Persistent Course Grades Flags (#30978)
* feat: revert Fix certificate generation without persistent grades

* feat: Remove Persistent Course Grades Flags

* test: update tests
2022-09-14 14:00:01 -04:00
connorhaugh
45c2858d61 Revert "feat: FC-0001 Remove Persistent Course Grades Flags (#30540)" (#30744)
This reverts commit 4a9243ef9f.
2022-07-19 13:45:31 -04:00
Sagirov Evgeniy
4a9243ef9f feat: FC-0001 Remove Persistent Course Grades Flags (#30540)
* feat: revert Fix certificate generation without persistent grades

* feat: Remove Persistent Course Grades Flags

* test: update tests
2022-07-19 11:30:37 -04:00
Maria Grimaldi
e8fa890af7 feat: add filter before certificate creation starts
- Add filters interactions with code that used generate_certificate_task
- Add unit-testing for filters
- Upgrade to latest library update
2022-05-06 13:57:21 -04:00
Simon Chen
fcb29a6834 feat: introduce new setting to control IDV requirements for certificates (#30318)
Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2022-04-28 11:10:04 -04:00
Eugene Dyudyunov
aa501dea66 refactor: change the send_grade_signals to send_course_grade_signals 2022-03-24 10:53:30 +02:00
dyudyunov
956c985508 test: 🚑 add test to catch recursion when persistent grades disabled 2022-03-21 13:05:16 +02:00
dyudyunov
c4bc6e29ea fix: certificate generation without Persistent Grades
Fix for an error related to endless recursion

Dev Notes:
The student gets the passing grade
-> CourseGradeFactory sends the `COURSE_GRADE_NOW_PASSED` signal after the grade calculation
-> `listen_for_passing_grade` receives the signal and calls `generate_certificate_task`
-> `generate_certificate_task` calls `_generate_regular_certificate_task`
-> `_generate_regular_certificate_task` trying to get grade by calling the `_get_course_grade`
-> `_get_course_grade` calls `CourseGradeFactory().read()` but I have persistent grades off, so actually that ends with `CourseGradeFactory().update()`
-> `CourseGradeFactory().update()` sends the `COURSE_GRADE_NOW_PASSED`
And so on
2022-03-21 12:36:39 +02:00
Bianca Severino
af81b3a609 chore: replace integrity signature flag with django setting 2022-02-15 09:57:00 -05:00
Justin Hynes
df71aebdcf fix: [MICROBA-1594] fix cert generation logic for eligible modes that don't require IDV
[MICROBA-1594]

* Update course certificate generation logic when ID verification fails to check if the enrollment mode requires IDV.

This change fixes an issue where Honor certificates could not be generated in an Open edX installation unless a manual IDV override was added for the student.
2021-12-01 14:12:56 -05:00
Andy Shultz
1be408046b feat: explain certificate delay seconds and make it overrideable
this appears to be a throttling method on first glance but is instead
an async task handling hack, explain it

and then provide a way to override it for tight control of timing
while regenerating multiple certs
2021-10-26 14:32:33 -04:00
Andy Shultz
7e3ef93a63 feat: make IDV optional for cert generation
IDV is on its way to retirement, so it's not going to be necessary for cert
generation forever.

Introduces a function to combine the honor code flag with IDV to tell
cert generation if it should care about a missing verification.

Various tests expanded to cover the retired case. The additional calls
in test_task_helper.py are caused by one call to fetch course
overrides which finds none, and that forces one check of the
background flag per student, 71 + 1 + 5 = 77.

MST-854
2021-10-22 14:46:07 -04:00
Christie Rice
cf3a6c16d6 fix: Stop showing course certificate buttons to beta testers (#28416)
Beta testers can’t earn course certificates, so they should not see a “Request Certificate” button or other info describing how they can earn a cert.

MICROBA-992
2021-08-10 09:06:14 -04:00
Christie Rice
cdeda7a313 fix: Update mode in course certificate when marking cert as invalidated, not verified or not passing (#28330)
MICROBA-1410
2021-08-03 11:24:11 -04:00
Christie Rice
c7d06c6bfa fix: Retrieve grade and enrollment mode only once and pass their values to the generation task, so those values can be saved in the cert. Also protect against missing course grades.
MICROBA-1373
2021-07-16 13:43:07 -04:00
Christie Rice
f98b8e5be0 refactor: Replace references to V2 course certificates (#28180)
MICROBA-1227
2021-07-14 13:37:07 -04:00
Christie Rice
f42b36869e fix: Allow cert generation if enrollment mode is now eligible (#28153)
MICROBA-1380
2021-07-13 09:51:15 -04:00
Christie Rice
b6eb331436 fix: Remove v1 course certificate code, as this was previously globally disabled (#28155)
MICROBA-1227
2021-07-12 14:08:31 -04:00
Christie Rice
87a620612f fix: Remove V2 certificate checks from the certificates app, since V2 of course certificates has been enabled globally for all course runs (#28108)
MICROBA-1083 DEPR-155
2021-07-08 14:27:27 -04:00
Christie Rice
384bc6b514 fix: Fix cert status (#28097)
MICROBA-1372
2021-07-06 12:48:21 -04:00
Christie Rice
24367919bb fix: Update logic for certificate generation status, and create cert with all available info (#28004)
MICROBA-1306 CR-3792
2021-06-28 10:05:34 -04:00
Christie Rice
69580aa592 feat!: Read from the allowlist model, instead of from the whitelist model. Only write to the allowlist model. (#27974)
MICROBA-982
2021-06-25 09:47:32 -04:00
Christie Rice
532b97b4e2 fix: Temporarily disable generating certificates with a non-downloadable status (#28000)
CR-3792 MICROBA-1306
2021-06-22 15:56:11 -04:00
Christie Rice
59dc0a4a39 feat!: Enable v2 of course certificates for all course runs (#27817)
This moves all course runs that use certificates over to V2 of course certificates, and disables the option for a course run to use V1 of course certificates.

MICROBA-1082
2021-06-15 15:08:40 -04:00
Christie Rice
417b2cc959 fix: Handle missing course overviews (#27849)
MICROBA-1082
2021-06-14 12:57:45 -04:00
Albert (AJ) St. Aubin
c37e88fdbf refactor: Move CertificateStatuses to data.py file per OEP-49
[MICROBA-678]

To allow access to CertificateStatuses constants in other Django apps we are moving the
CertificateStatuses enum to data.py per OEP-49.
2021-06-08 08:56:21 -04:00
Justin Hynes
48f4f9f475 feat: add edx.certificate.revoked event
[MICROBA-1075]
- Adds a new `edx.certificate.revoked` event to the LMS.
- Refactor of our certificate revocation functions in the GeneratedCertificate model.

This new event will be emit when a GeneratedCertificate with the status of `downloadable` is revoked (through the `invalidate(), mark_notpassing(), or mark_unverified() functions). Event will have a `source` field that will allow us how our certificates are being revoked from learners and can be broken down in the following way:
*Invalidate*
- allowlist_removal
- certificate_generation
- certificate_regeneration
- certificate_service
- certificate_invalidation_list
- bulk_certificate_regeneration

*mark_notpassing*
- certificate_generation
- notpassing_signal

*unverified*
- certificate_generation
2021-05-25 13:44:01 -04:00
Justin Hynes
e0cfae745f Merge pull request #27646 from edx/jhynes/microba-1209_function-cleanup
refactor: consolidate (mostly) duplicated function
2021-05-17 12:59:42 -04:00
Justin Hynes
d4f3e11092 refactor: consolidate (mostly) duplicated functions
[MICROBA-1209]
Part of the modulestore cleanup/removal in the certificates app. The function `list_with_level_from_course_overview` was temporary. Cleaning this up. Modifying the original `list_with_level` to accept a course-id/course-key as it doesn't actually need the entire course object.
* Update `list_with_level` function to accept a course run id/course-key
* Remove `list_with_level_from_course_key` function (and update any functions using it to use `list_with_level` again)
2021-05-17 09:50:39 -04:00
Justin Hynes
70810879e0 refactor: remove unused course arguments from certificate generation functions
[MICROBA-1238]
- Remove unused `course` arguments from certificate generation functions

Part of our cleanup after removing use of the modulestore from the Certificates app.
2021-05-14 15:38:43 -04:00
Justin Hynes
dd06820cad refactor: consolidate duplicate utility functions in certificates app
[MICROBA-1208]
* consolidate `has_html_certificates_enabled` and `has_html_certificates_enabled_from_course_overview`, the latter of the two functions was created for use during our transition away from using the modulestore in the certificate app.
2021-05-13 07:52:02 -04:00
Justin Hynes
d09639fe77 Merge pull request #27563 from edx/jhynes/microba-1178_modulestore-removal-utils
refactor: remove use of modulestore in certificates app
2021-05-11 07:34:23 -04:00
Christie Rice
4dae1abd67 fix: Remove unused allowlist flag (#27576)
MICROBA-1073
2021-05-10 15:04:11 -04:00
Justin Hynes
80833406c7 refactor: remove use of modulestore in certificates app
[MICROBA-1178]

* remove use of modulestore in `utils.py` of the certificates django app
2021-05-07 15:30:03 -04:00
Justin Hynes
6313c1ba67 Merge pull request #27501 from edx/jhynes/microba-1178_modulestore
refactor: reduce certificate django apps dependence on the modulestore (generation_handler)
2021-05-04 13:03:15 -04:00
Justin Hynes
5db4fd5bb2 refactor: reduce certificate django apps dependence on the modulestore (generation_handler)
[MICROBA-1178]
- remove modulestore usage in `generation_handler.py`
- add duplicate functions that utilize a CourseKey or CourseOverview to remove dependence on modulestore (this will be cleaned up (if possible) at a later part of this refactor)
- add python API function to `content`/`course_overview` app that will retrieve a single CourseOverview (rather than a serialized list of dicts of CourseOverview data)
2021-05-04 07:47:58 -04:00
Christie Rice
912f2fa431 feat!: Enable the allowlist for all courses (#27468)
MICROBA-1013
2021-05-03 11:15:04 -04:00
Christie Rice
6e1f700cdc feat: Generate more certificate status for V2 course certs (#27326)
MICROBA-1106
2021-04-27 09:40:06 -04:00
Justin Hynes
19d1105d0f feat: skip bulk certificate invalidation during bulk regeneration in v2 certs
[MICROBA-1077]
* Skip bulk certificate invalidation during bulk regeneration. I couldn't come up with a reason to continue to invalidate certificates right before we attempted regeneration.
2021-04-14 07:33:21 -04:00
Justin Hynes
13d174fdda fix: update v2 certificate generation eligibility logic
[MICROBA-1109]
* Remove the requirement for the `auto_certificate_generation` waffle switch to be enabled in order for a learner to be eligible for a certificate. This switch should control _when_ a certificate is generated, not _if_ a certificate will be generated for a learner.
* Move the `auto_certificate_generation_enabled` check to happen before we try to generate v2 certificates in signals.py
* Update unit tests
* Update documentation
2021-04-06 08:50:54 -04:00
Christie Rice
b8afc30079 refactor: Combine checks for allowlist and regular certificates (#27204)
MICROBA-1039
2021-04-01 10:00:56 -04:00
Christie Rice
8f50edea6f feat: Implement generation of regular V2 course certificates (#27189)
MICROBA-1039
2021-03-31 14:12:19 -04:00
Christie Rice
8198606138 feat: Refactor code to check both regular and allowlist V2 certs (#27156)
MICROBA-1039
2021-03-30 10:23:23 -04:00
Christie Rice
9a24e72643 fix: Require web certs (#27120)
MICROBA-1039
2021-03-25 09:29:51 -04:00
Christie Rice
43f32a8f6b feat: Add initial certificate generation checks for updated (V2) course certificates (#27090)
MICROBA-923
2021-03-22 10:07:21 -04:00
Christie Rice
fa15afb062 fix: Update logging (#27065)
MICROBA-923
2021-03-18 15:00:52 -04:00
Christie Rice
90f5e42dbd MICROBA-1055 Require a valid enrollment mode, even on the allowlist (#27012) 2021-03-16 09:37:27 -04:00
Christie Rice
4aff07ad82 MICROBA-923 Add method to generate V2 course certificates (#26898) 2021-03-09 11:02:19 -05:00
Christie Rice
8c2ce91a15 MICROBA-1033 Remove temporary id verification code. Require users to have a current id verification. (#26834) 2021-03-04 09:08:56 -05:00
Usama Sadiq
cfb911966a Merge pull request #26520 from edx/usamasadiq/bom-2355-pyupgrade
Ran pyupgrade on lms/djangoapps-I
2021-03-01 15:54:01 +05:00