Skip to content

Commit

Permalink
Add timeout and better error message to quiz submit request
Browse files Browse the repository at this point in the history
Closes #852
  • Loading branch information
ihalaij1 committed May 30, 2023
1 parent ae4315c commit 95d4e31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion exercise/static/exercise/chapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@
data: formData,
contentType: false,
processData: false,
dataType: "html"
dataType: "html",
timeout: 10000,
}).fail(function(xhr, textStatus, errorThrown) {
//$(form_element).find(":input").prop("disabled", false);
//exercise.showLoader("error");
Expand Down
9 changes: 5 additions & 4 deletions locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-10 14:22+0300\n"
"POT-Creation-Date: 2023-05-30 12:30+0300\n"
"PO-Revision-Date: 2021-05-27 14:47+0300\n"
"Last-Translator: Jimmy Ihalainen <jimmy.ihalainen@aalto.fi>\n"
"Language-Team: English<>\n"
Expand Down Expand Up @@ -3962,9 +3962,10 @@ msgstr "Posting submission..."
#: exercise/templates/exercise/_submit_progress.html
msgid "SUBMISSION_ERROR_ALERT_COMMUNICATION_ERROR_W_SERVICE"
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 "
"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"
Expand Down
9 changes: 5 additions & 4 deletions locale/fi/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-10 14:22+0300\n"
"POT-Creation-Date: 2023-05-30 12:30+0300\n"
"PO-Revision-Date: 2019-08-14 12:16+0200\n"
"Last-Translator: Jimmy Ihalainen <jimmy.ihalainen@aalto.fi>\n"
"Language-Team: Finnish <>\n"
Expand Down Expand Up @@ -3971,9 +3971,10 @@ msgstr "Palautusta lähetetään..."
#: exercise/templates/exercise/_submit_progress.html
msgid "SUBMISSION_ERROR_ALERT_COMMUNICATION_ERROR_W_SERVICE"
msgstr ""
"Palautuksen lähettämisessä arvosteluun tapahtui virhe eikä palautuskertoja "
"kulunut. Voit yrittää vielä uudestaan. Tarkistathan internet-yhteytesi. "
"Henkilökunnalle on ilmoitettu mikäli onglema on palvelussa."
"Palautuksen lähettämisessä arvosteluun tapahtui virhe. Tarkistathan internet-"
"yhteytesi. Jos palautuskerta käytettiin, palautus arvostellaan "
"automaattisesti, kun palvelu on jälleen käytettävissä. Kurssihenkilökunnalle "
"on ilmoitettu mikäli onglema on palvelussa."

#: exercise/templates/exercise/_template_files.html
msgid "EXERCISE_HAS_NO_TEMPLATE"
Expand Down

0 comments on commit 95d4e31

Please sign in to comment.