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
[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.
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
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
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
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
[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
[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)
[MICROBA-1238]
- Remove unused `course` arguments from certificate generation functions
Part of our cleanup after removing use of the modulestore from the 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.
[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)
[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.
[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