diff --git a/common/djangoapps/course_modes/migrations/0002_coursemode_expiration_datetime_is_explicit.py b/common/djangoapps/course_modes/migrations/0002_coursemode_expiration_datetime_is_explicit.py new file mode 100644 index 0000000000000000000000000000000000000000..ea6a60134212f2798782c94ed18bdee075e68e2f --- /dev/null +++ b/common/djangoapps/course_modes/migrations/0002_coursemode_expiration_datetime_is_explicit.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('course_modes', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='coursemode', + name='expiration_datetime_is_explicit', + field=models.BooleanField(default=True), + ), + ] diff --git a/common/djangoapps/course_modes/models.py b/common/djangoapps/course_modes/models.py index 55d0148edbdfe6ffaad282ad7c2497b02a55dc15..2c43d80ceee7a476a164e48a2f954b6f39e66e4d 100644 --- a/common/djangoapps/course_modes/models.py +++ b/common/djangoapps/course_modes/models.py @@ -63,6 +63,11 @@ class CourseMode(models.Model): ), ) + # The system prefers to set this automatically based on default settings. But + # if the field is set manually we want a way to indicate that so we don't + # overwrite the manual setting of the field. + expiration_datetime_is_explicit = models.BooleanField(default=True) + # DEPRECATED: the `expiration_date` field has been replaced by `expiration_datetime` expiration_date = models.DateField(default=None, null=True, blank=True) diff --git a/lms/djangoapps/verify_student/migrations/0002_auto_20151124_1024.py b/lms/djangoapps/verify_student/migrations/0002_auto_20151124_1024.py new file mode 100644 index 0000000000000000000000000000000000000000..f8def88eef11c35fe48252f476f8160071080638 --- /dev/null +++ b/lms/djangoapps/verify_student/migrations/0002_auto_20151124_1024.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('verify_student', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='historicalverificationdeadline', + name='deadline_is_explicit', + field=models.BooleanField(default=True), + ), + migrations.AddField( + model_name='verificationdeadline', + name='deadline_is_explicit', + field=models.BooleanField(default=True), + ), + ] diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 0db3f3e50e0d5ee8d750c90888313b2b48e969be..2b42ce05dbe7155a19505009ecb07866de95a8fb 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -955,6 +955,11 @@ class VerificationDeadline(TimeStampedModel): ) ) + # The system prefers to set this automatically based on default settings. But + # if the field is set manually we want a way to indicate that so we don't + # overwrite the manual setting of the field. + deadline_is_explicit = models.BooleanField(default=True) + # Maintain a history of changes to deadlines for auditing purposes history = HistoricalRecords()