Skip to content

Commit

Permalink
Merge pull request #231 from edx/michaelroytman/COSMO-130-tech-suppor…
Browse files Browse the repository at this point in the history
…t-site

feat: add support for a tech_support_url on the ProctoringProvider
  • Loading branch information
MichaelRoytman authored Dec 19, 2023
2 parents 5fd4040 + d412b10 commit 19d2723
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions edx_exams/apps/api/test_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def setUp(self):
lti_configuration_id='123456789',
tech_support_phone='1118976309',
tech_support_email='[email protected]',
tech_support_url='www.example.com',
)

def tearDown(self):
Expand Down
1 change: 1 addition & 0 deletions edx_exams/apps/api/v1/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
2 changes: 2 additions & 0 deletions edx_exams/apps/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: '[email protected]',
}
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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),
),
]
2 changes: 2 additions & 0 deletions edx_exams/apps/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions edx_exams/apps/core/test_utils/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Meta:
lti_configuration_id = factory.Sequence('11{}'.format)
tech_support_phone = '1118976309'
tech_support_email = '[email protected]'
tech_support_url = 'www.example.com'


class CourseExamConfigurationFactory(DjangoModelFactory):
Expand Down

0 comments on commit 19d2723

Please sign in to comment.