Skip to content

Commit

Permalink
chore: fix acs review create location
Browse files Browse the repository at this point in the history
  • Loading branch information
ilee2u committed Jul 28, 2023
1 parent a0f0b6d commit 33c2afc
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions edx_exams/apps/lti/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 33c2afc

Please sign in to comment.