From dc4d2c0142d0ec61cd0cb6e437d20e74585bce76 Mon Sep 17 00:00:00 2001 From: ilee2u Date: Thu, 19 Sep 2024 11:38:53 -0400 Subject: [PATCH 1/3] fix: add placeholder should_display_status_to_user --- lms/djangoapps/verify_student/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 23729c99a0b9..9df7fc4bf38d 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -1251,3 +1251,8 @@ def retire_user(cls, user_id): """ verification_attempts = cls.objects.filter(user_id=user_id) verification_attempts.delete() + + @classmethod + def should_display_status_to_user(cls): + """Temporary placeholder so that calls to this method do not break edx-platform""" + return From ead929e6e757b49f8ef5ceb25bebf14f421c69d1 Mon Sep 17 00:00:00 2001 From: ilee2u Date: Thu, 19 Sep 2024 12:09:24 -0400 Subject: [PATCH 2/3] fix: have VerificationAttempt inherit StatusModel - should_display_status_to_user now returns False --- lms/djangoapps/verify_student/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 9df7fc4bf38d..383855f7e3da 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -1214,7 +1214,7 @@ def __str__(self): return str(self.arguments) -class VerificationAttempt(TimeStampedModel): +class VerificationAttempt(TimeStampedModel, StatusModel): """ The model represents impelementation-agnostic information about identity verification (IDV) attempts. @@ -1255,4 +1255,4 @@ def retire_user(cls, user_id): @classmethod def should_display_status_to_user(cls): """Temporary placeholder so that calls to this method do not break edx-platform""" - return + return False From 50e09ded6ed9bc55fc142bff8029ad373dd212c3 Mon Sep 17 00:00:00 2001 From: ilee2u Date: Thu, 19 Sep 2024 12:17:43 -0400 Subject: [PATCH 3/3] chore: makemigrations --- ...0016_verificationattempt_status_changed.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lms/djangoapps/verify_student/migrations/0016_verificationattempt_status_changed.py diff --git a/lms/djangoapps/verify_student/migrations/0016_verificationattempt_status_changed.py b/lms/djangoapps/verify_student/migrations/0016_verificationattempt_status_changed.py new file mode 100644 index 000000000000..d5aba6fd369d --- /dev/null +++ b/lms/djangoapps/verify_student/migrations/0016_verificationattempt_status_changed.py @@ -0,0 +1,20 @@ +# Generated by Django 4.2.15 on 2024-09-19 16:17 + +from django.db import migrations +import django.utils.timezone +import model_utils.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('verify_student', '0015_verificationattempt'), + ] + + operations = [ + migrations.AddField( + model_name='verificationattempt', + name='status_changed', + field=model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed'), + ), + ]