From 33c2afcc97f60b9f99f9587422a005b27c407c27 Mon Sep 17 00:00:00 2001 From: ilee2u Date: Fri, 28 Jul 2023 12:25:45 -0400 Subject: [PATCH] chore: fix acs review create location --- edx_exams/apps/lti/views.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/edx_exams/apps/lti/views.py b/edx_exams/apps/lti/views.py index 91432f2c..3c3122fb 100644 --- a/edx_exams/apps/lti/views.py +++ b/edx_exams/apps/lti/views.py @@ -159,25 +159,25 @@ def acs(request, lti_config_id): ) log.info(success_msg) + # Create a record of the ACS result + AssessmentControlResult.objects.create( + attempt=attempt, + action_type=action, + incident_time=incident_time, + severity=severity, + reason_code=reason_code, + ) + log.info( + f'Created AssessmentControlResult for attempt with id {attempt.id}, ' + f'action_type {action}, incident_time {incident_time}, severity {severity}, ' + f'and reason_code {reason_code}.' + ) + # Base case for unsupported or invalid action types else: log.info(f'Received ACS request containing invalid or unsupported action: {action}') return Response(status=status.HTTP_400_BAD_REQUEST) - # Create a record of the ACS result - AssessmentControlResult.objects.create( - attempt=attempt, - action_type=action, - incident_time=incident_time, - severity=severity, - reason_code=reason_code, - ) - log.info( - f'Created AssessmentControlResult for attempt with id {attempt.id}, ' - f'action_type {action}, incident_time {incident_time}, severity {severity}, ' - f'and reason_code {reason_code}.' - ) - # Send back the status of terminated for the terminate action per LTI specs # for ACS Response data: http://www.imsglobal.org/spec/proctoring/v1p0#h.r9n0nket2gul return Response(data={'status': 'terminated'}, status=status.HTTP_200_OK)