[APER-3241]
This PR updates the retirement pipeline to purge learners' names from certificate records when their account is being retired.
It also introduces a new management command that can be used by Open edX operators to purge the leftover name data (PII data) from the `certificates_generatedcertificate` table. This is designed as a one-time use data fixup, as the retirement functionality should clean this moving forward.
adds a management command to modify certificate templates, with a dry
run option. Inherently unsafe; just as a search and replace on the first
string match.
TODO:
* unit tests
* make sure the multi-line string replacements work via django admin
FIXES: APER-2851
MST-1161. The regeneration command for unverified certs has to be used to regenerate all unverified certs after the release of the honor code feature on January 19th. Because of this, the command is now updated to regenerate all unverified certificates if no specific course keys are provided. I've also included an option to include excluded keys, so that all unverified certs, except for those in an excluded course key, can be regenerated.
Only courses which actually have honor code on and only unverified
certs will be regenerated. All other certs wouldn't change so
don't cause trouble.
MST-855
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-1052]
We are removing the cert_whitelist management command because it does
not provide a clear value with the current state of Certificate
generation on edx-platform. It adds a user to the whitelist table, but
does not generate a certificate.
We recommend using the exceptions tab in the Instructor tab of the LMS
Course.
[MICROBA-1238]
- Remove unused `course` arguments from certificate generation functions
Part of our cleanup after removing use of the modulestore from the Certificates app.
* fix: 🐛 ENT-4525 fix learner portal experience courseEnrollment records are missing
sometimes integrations may create EnterpriseCourseEnrollments but for some reason missing courseEnrollment, in this case we want to just filter out the EnterpriseCourseEnrollments instead of erroring the learner poratl
ENT-4525
* fix: pylint fixes
pylint fixes
[MICROBA-1178]
* Remove use of modulestore in `queue.py`
* Remove use of modulestore in `ungenerated_certs.py`
* Remove use of modulestore in `resubmit_error_certificates.py`
* Update unit tests in `test_cert_management.py`
This helper is used by the LMS, CMS, _and_ `openedx.core`,
so let's move it to `openedx.core` to reduce import complexity.
The following files no longer import from LMS:
- cms/djangoapps/contentstore/management/commands/edit_course_tabs.py
- lms/djangoapps/ccx/migrations/0006_set_display_name_as_override.py
- openedx/core/djangoapps/ccxcon/api.py
- openedx/core/djangoapps/verified_track_content/models.py
- openedx/features/course_experience/plugins.py
Note: The LTI XBlock has a dependency on this import path (!?);
a fix can be found here [1].
- [1] https://github.com/edx/xblock-lti-consumer/pull/154
[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
[MICROBA-1100]
* Remove `cert_allowlist_generation` management command. This has been replaced by the `cert_generation` management command which can handle generation of allowlist and v2 certificates.
* Remove AllowListGenerationConfiguration configuration model.
[MICROBA-1100]
* Add CertificationGenerationCommandConfiguration model that will store the command arguments for the `cert_generation` mgmt command
* Add ability to add entries to the CertificationGenerationCommandConfiguration through Django admin
* Update mgmt command with ability to read arguments from the config model/database
* Fix failing test in `test_cert_generation.py`
* Add new test for missing `users` argument in `test_cert_generation.py`
[MICROBA-1025]
- Update management command to use the same logic that the Instructor Dashboard uses
- Fix bug in management command where processing stopped when encountering a user that did not exist
- Add more logging
- Add and update tests where needed