-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timeout and better error message to quiz submit request #1185
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -460,7 +460,8 @@ | |||||||||
data: formData, | ||||||||||
contentType: false, | ||||||||||
processData: false, | ||||||||||
dataType: "html" | ||||||||||
dataType: "html", | ||||||||||
timeout: 10000, | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could increase the timeout to 20 seconds. 10 seconds is not enough if there are issues with connecting to the grader. A+ retries the connection to the grader three times by default. 10 seconds is not enough for A+ to finish those three connection attempts to the grader. A+ shows the error message a-plus/exercise/protocol/aplus.py Line 36 in c76e3fb
Lines 60 to 62 in c76e3fb
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, the error If the timeout is increased, which message will show? Do we want both to show? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So A+ now actually shows different errors for questionnaires and asynchronous assignments when the timeout triggers. With the 10-second timeout, I would only see I already made a new commit that changes the chapter.js timeout to 20 seconds. There is still room to improve the error messages and remove unnecessary overlaps. |
||||||||||
}).fail(function(xhr, textStatus, errorThrown) { | ||||||||||
//$(form_element).find(":input").prop("disabled", false); | ||||||||||
//exercise.showLoader("error"); | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3842,7 +3842,7 @@ msgid "TOTAL_NUMBER_OF_SUBMITTERS" | |
msgstr "Total number of submitters" | ||
|
||
#: exercise/templates/exercise/_exercise_wait.html | ||
#: exercise/templates/exercise/exercise.html | ||
#: exercise/templates/exercise/exercise.html templates/base.html | ||
msgid "EXERCISE_ERROR_COMMUNICATION" | ||
msgstr "" | ||
"There was a problem loading the assignment. Try loading the page again " | ||
|
@@ -3979,9 +3979,10 @@ msgstr "Posting submission..." | |
#: exercise/templates/exercise/_submit_progress.html | ||
msgid "SUBMISSION_ERROR_ALERT_COMMUNICATION_ERROR_W_SERVICE" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After the latest changes, when is this string really used? I could see There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is shown, for example, when submitting a questionnaire fails because grader can't be reached. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I was testing with a programming assignment and I could only see |
||
msgstr "" | ||
"There was an error sending the submission for grading, so no submission was " | ||
"consumed. You can try again. Make sure you're connected to the internet. " | ||
"Course staff have been informed if the problem is with the service." | ||
"An error occurred while sending the submission for grading. Make sure you're " | ||
ihalaij1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"connected to the internet. If a submission was consumed, the submission will " | ||
"be automatically graded after the service is available again. Course staff " | ||
"have been informed in case the problem is with the service." | ||
|
||
#: exercise/templates/exercise/_template_files.html | ||
msgid "EXERCISE_HAS_NO_TEMPLATE" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit strange. What is the idea here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base.html
now includes a hiddendiv
withclass="modal-submit-error alert alert-danger"
.It has to be stripped away before asserting in the course cloning tests so that the tests don't fail, because they think course cloning failed and rendered a different alert.