diff --git a/openassessment/xblock/static/js/src/lms/oa_response.js b/openassessment/xblock/static/js/src/lms/oa_response.js index adb4733f19..f306a54bbf 100644 --- a/openassessment/xblock/static/js/src/lms/oa_response.js +++ b/openassessment/xblock/static/js/src/lms/oa_response.js @@ -147,7 +147,7 @@ export class ResponseView { ); // Install a click handler for the resubmission button - sel.find(".reset__submission").click((eventObject) => { + sel.find('.reset__submission').click((eventObject) => { eventObject.preventDefault(); view.handleResubmissionClicked(); }); @@ -557,9 +557,9 @@ export class ResponseView { * */ handleResubmissionClicked() { const view = this; - const title = gettext("Confirm Resubmission"); + const title = gettext('Confirm Resubmission'); const msg = gettext( - "You're about to reset your response for this assignment. Are you sure you want to do this?" + 'You\'re about to reset your response for this assignment. Are you sure you want to do this?' ); this.confirmationDialog.confirm( title, @@ -580,7 +580,7 @@ export class ResponseView { }) .fail((errMsg) => { if (errMsg) { - this.baseView.toggleActionError("submit", errMsg); + this.baseView.toggleActionError('submit', errMsg); } }); } diff --git a/openassessment/xblock/static/js/src/oa_server.js b/openassessment/xblock/static/js/src/oa_server.js index c0bf8e051d..57a6e81bec 100644 --- a/openassessment/xblock/static/js/src/oa_server.js +++ b/openassessment/xblock/static/js/src/oa_server.js @@ -224,7 +224,7 @@ export class Server { * and which fails with an error message otherwise. */ resetSubmission() { - const url = this.url("reset_submission"); + const url = this.url('reset_submission'); return $.Deferred((defer) => { $.ajax({ type: 'POST', diff --git a/openassessment/xblock/utils/allow_resubmission.py b/openassessment/xblock/utils/allow_resubmission.py index 6373c4736e..2065bfcd77 100644 --- a/openassessment/xblock/utils/allow_resubmission.py +++ b/openassessment/xblock/utils/allow_resubmission.py @@ -21,9 +21,9 @@ def allow_resubmission(config_data, workflow_data, submission_data: dict) -> boo bool: True if the learner's submission is eligible for retry, False otherwise. """ return ( - allow_learner_resubmissions(config_data) - and not submission_date_exceeded(config_data, submission_data) - and not has_been_graded(workflow_data) + allow_learner_resubmissions(config_data) and + not submission_date_exceeded(config_data, submission_data) and + not has_been_graded(workflow_data) )