diff --git a/edx_exams/apps/api/test_utils/__init__.py b/edx_exams/apps/api/test_utils/__init__.py index 5d68c761..f27e2f4f 100644 --- a/edx_exams/apps/api/test_utils/__init__.py +++ b/edx_exams/apps/api/test_utils/__init__.py @@ -33,6 +33,7 @@ def setUp(self): lti_configuration_id='123456789', tech_support_phone='1118976309', tech_support_email='test@example.com', + tech_support_url='www.example.com', ) def tearDown(self): diff --git a/edx_exams/apps/api/v1/tests/test_views.py b/edx_exams/apps/api/v1/tests/test_views.py index 7fd5ae8c..59d071d7 100644 --- a/edx_exams/apps/api/v1/tests/test_views.py +++ b/edx_exams/apps/api/v1/tests/test_views.py @@ -1730,6 +1730,7 @@ def test_exam_provider(self): { 'provider_tech_support_email': self.test_provider.tech_support_email, 'provider_tech_support_phone': self.test_provider.tech_support_phone, + 'provider_tech_support_url': self.test_provider.tech_support_url, 'provider_name': self.test_provider.verbose_name, 'proctoring_escalation_email': self.config.escalation_email, } diff --git a/edx_exams/apps/api/v1/views.py b/edx_exams/apps/api/v1/views.py index e0836827..d6e74b50 100644 --- a/edx_exams/apps/api/v1/views.py +++ b/edx_exams/apps/api/v1/views.py @@ -744,6 +744,7 @@ class ProctoringSettingsView(ExamsAPIView): { provider_tech_support_email: '', provider_tech_support_phone: '', + provider_tech_support_site: '', provider_name: 'test provider', escalation_name: 'test@example.com', } @@ -766,6 +767,7 @@ def get(self, request, course_id, exam_id): if provider: data['provider_tech_support_email'] = provider.tech_support_email data['provider_tech_support_phone'] = provider.tech_support_phone + data['provider_tech_support_url'] = provider.tech_support_url data['provider_name'] = provider.verbose_name data['proctoring_escalation_email'] = config_data.escalation_email diff --git a/edx_exams/apps/core/migrations/0023_proctoringprovider_tech_support_url.py b/edx_exams/apps/core/migrations/0023_proctoringprovider_tech_support_url.py new file mode 100644 index 00000000..45cf46e4 --- /dev/null +++ b/edx_exams/apps/core/migrations/0023_proctoringprovider_tech_support_url.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.23 on 2023-12-19 19:49 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0022_courseexamconfiguration_escalation_email'), + ] + + operations = [ + migrations.AddField( + model_name='proctoringprovider', + name='tech_support_url', + field=models.URLField(max_length=255, null=True), + ), + ] diff --git a/edx_exams/apps/core/models.py b/edx_exams/apps/core/models.py index 821abbd5..53fc9aa9 100644 --- a/edx_exams/apps/core/models.py +++ b/edx_exams/apps/core/models.py @@ -88,6 +88,8 @@ class ProctoringProvider(TimeStampedModel): tech_support_email = models.CharField(max_length=255, null=True) + tech_support_url = models.URLField(max_length=255, null=True) + class Meta: """ Meta class for this Django model """ db_table = 'exams_proctoringprovider' diff --git a/edx_exams/apps/core/test_utils/factories.py b/edx_exams/apps/core/test_utils/factories.py index d778ed4b..a95352c5 100644 --- a/edx_exams/apps/core/test_utils/factories.py +++ b/edx_exams/apps/core/test_utils/factories.py @@ -54,6 +54,7 @@ class Meta: lti_configuration_id = factory.Sequence('11{}'.format) tech_support_phone = '1118976309' tech_support_email = 'test@example.com' + tech_support_url = 'www.example.com' class CourseExamConfigurationFactory(DjangoModelFactory):