diff --git a/edx_proctoring/api.py b/edx_proctoring/api.py index dd8228c91a6..80617d67899 100644 --- a/edx_proctoring/api.py +++ b/edx_proctoring/api.py @@ -669,8 +669,6 @@ def create_exam_attempt(exam_id, user_id, taking_as_proctored=False): exam, context=context, ) - if external_id: - attempt_code = external_id attempt = ProctoredExamStudentAttempt.create_exam_attempt( exam_id, diff --git a/edx_proctoring/backends/rest.py b/edx_proctoring/backends/rest.py index 465cbdc544a..1d4b6f44759 100644 --- a/edx_proctoring/backends/rest.py +++ b/edx_proctoring/backends/rest.py @@ -157,6 +157,8 @@ def register_exam_attempt(self, exam, context): url = self.create_exam_attempt_url.format(exam_id=exam['external_id']) payload = context payload['status'] = 'created' + # attempt code isn't needed in this API + payload.pop('attempt_code', False) log.debug('Creating exam attempt for %r at %r', exam['external_id'], url) response = self.session.post(url, json=payload) response = response.json()