[MICROBA-1806] We are aware of product issue where it is possible for a self-paced course-run to get have a `certificate_availability_date` created in the course settings. This can have an adverse effect on the Credentials IDA where a learner's Program Record does not correctly display the course certificates they have earned because of this data. This not only causes confusion for our learners, as it appears that a course certificate a learner can access and share in the LMS is displayed as unearned in the Credential's program record, but this can also cause issues when a learner attempts to share their program record through a credit pathway and the program record would not accurately reflect their program completion. Unfortunately, the settings that manage the certificate availability date are hidden for self-paced courses in Studio (as they should only be used in instructor-paced courses). For this reason, we are introducing a management command that will remove a certificate available date for a specified (self-paced) course-run. This will allow us to fix issues for individual learners while we work on a longer-term fix for the larger issue. * Add new `clean_stale_certificate_available_dates` management command * Add new `CleanStaleCertificateAvailabilityDates` Configuration Model * Add tests for the new management command * (Unrelated cleanup) Fix potential issue with private.py settings in the CMS being overwritten in devstack.py for developers using devstack.
31 lines
1.5 KiB
Python
31 lines
1.5 KiB
Python
# Generated by Django 3.2.13 on 2022-07-11 17:08
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('contentstore', '0007_backfillcoursetabsconfig'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='CleanStaleCertificateAvailabilityDatesConfig',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
|
|
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
|
|
('arguments', models.TextField(blank=True, help_text="A space seperated collection of arguments to be used when running the `clean_stale_certificate_available_dates` management command.' See the management command for options.")),
|
|
('changed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Changed by')),
|
|
],
|
|
options={
|
|
'verbose_name': "Arguments for 'clean_stale_certificate_availability_dates'",
|
|
'verbose_name_plural': "Arguments for 'clean_stale_certificate_availability_dates'",
|
|
},
|
|
),
|
|
]
|