Skip to content

Commit

Permalink
feat: review cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharis278 committed Aug 7, 2023
1 parent 1ab724f commit af1abf7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export async function pollExamAttempt(pollUrl, sequenceId) {
);
const urlResponse = await getAuthenticatedHttpClient().get(edxProctoringURL.href);
data = urlResponse.data;
} else if (getConfig().EXAMS_BASE_URL) {
} else if (sequenceId && getConfig().EXAMS_BASE_URL) {
data = await fetchLatestExamAttempt(sequenceId);

// Update dictionaries returned by edx-exams to have correct status key for legacy compatibility
Expand All @@ -83,7 +83,9 @@ export async function pollExamAttempt(pollUrl, sequenceId) {
delete data.attempt_status;
}
} else {
logError('pollExamAttempt called but no pollUrl is set');
// sites configured with only edx-proctoring must have pollUrl set
// sites configured with edx-exams expect sequenceId if pollUrl is not set
logError('pollExamAttempt recieved unexpected parameters pollUrl=${pollUrl} sequenceId=${sequenceId}');

Check failure on line 88 in src/data/api.js

View workflow job for this annotation

GitHub Actions / tests

Unexpected template string expression

Check failure on line 88 in src/data/api.js

View workflow job for this annotation

GitHub Actions / tests

Unexpected template string expression
}
return data;
}
Expand Down

0 comments on commit af1abf7

Please sign in to comment.