diff --git a/FORMAT.md b/FORMAT.md index f7cdaec..110ea38 100644 --- a/FORMAT.md +++ b/FORMAT.md @@ -39,6 +39,12 @@ D 1.1.1: "[...] a maximum of six drivers are allowed for each team" John Doe ``` +##### Time [minutes] + +```text +3 +``` + ## ChooseAny ##### Question Text @@ -81,6 +87,12 @@ Jane Doe https://i.ibb.co/m8C9VZp/image.png ``` +##### Time [minutes] + +```text +3 +``` + ## Text ##### Question Text @@ -120,3 +132,9 @@ Max Mustermann ```text https://i.ibb.co/tYTdw86/2a.png ``` + +##### Time [minutes] + +```text +7 +``` diff --git a/res/sample-questions.tsv b/res/sample-questions.tsv index 47a2fbe..455b66f 100644 --- a/res/sample-questions.tsv +++ b/res/sample-questions.tsv @@ -2,11 +2,11 @@ ChooseAny Which Materials can be used to fabricate the brake pedal? "Steel Aluminium Titanum All the above" "1 -2" +2" 3 ChooseOne What is depicted on the picture "7 speed double clutch transmission for AWD 8 speed double clutch transmission for AWD 7 speed double clutch transmission for 2WD -Automatic transmission with torque conventer" 1 This gearbox is from the 2017 Bugatti Chiron FSCzech https://i.ibb.co/56LM89v/chiron-transmission.jpg +Automatic transmission with torque conventer" 1 This gearbox is from the 2017 Bugatti Chiron FSCzech https://i.ibb.co/56LM89v/chiron-transmission.jpg 5 Text Calculate the (1) torsional- and (2) bending-nominal stress at the critical cross section for the load case shown below. Answer in N / mm² and round to one decimal place. Given: P = 12kW; n = 980 1/min; F = 500 N; xkrit = 110 mm; 0 ≤ x0 ≤ 120mm "torsional-nominal stress bending-nominal stress" "17.1 -18.2" https://i.ibb.co/1r3yqY7/2b.png https://i.ibb.co/tYTdw86/2a.png +18.2" https://i.ibb.co/1r3yqY7/2b.png https://i.ibb.co/tYTdw86/2a.png 7 diff --git a/web/index.html b/web/index.html index 54fb955..4215df8 100644 --- a/web/index.html +++ b/web/index.html @@ -54,7 +54,7 @@ switch (drf_sf.value) { case 'FSG': case 'FSA': - drf_ef.innerHTML = 'Minutes per question:
' + drf_ef.innerHTML = 'Default minutes per question:
' break case 'FSCzech': drf_ef.innerHTML = 'Seconds Timeout after handin:
' diff --git a/web/quiz.js b/web/quiz.js index 9d6e56b..9413c62 100644 --- a/web/quiz.js +++ b/web/quiz.js @@ -73,7 +73,7 @@ function updateSubmitTimer() { function startSubmitTimer(time) { - state.submitTimer = time || state.submitTime + state.submitTimer = time || state.questions[state.currentQuestion].time || state.submitTime if (state.submitTimer == null) return @@ -302,7 +302,6 @@ function showQuizResults() { el.querySelector(`input[value="${ans}"]`).classList.add('trueans') } - // TODO: Write out explanation, author var meta = document.createElement('div') meta.className = 'meta' meta.innerHTML = ` @@ -402,7 +401,7 @@ function submitQuiz() { } if (getRule('submitTimeout')) - startSubmitTimer() + startSubmitTimer(state.submitTime) } else { document.querySelector('#postscreen h1').innerHTML = (text + '
Maybe next time :)') endQuiz() diff --git a/web/ssparser.js b/web/ssparser.js index 9ed7b3c..a848525 100644 --- a/web/ssparser.js +++ b/web/ssparser.js @@ -52,6 +52,7 @@ function parseLine(line) { q.explanation = els[4] || null q.author = els[5] || null q.picture = els[6] || null + q.time = Math.floor(60 * els[7]) || state.submitTime return q