Finessed remaining block question counter
This commit is contained in:
parent
79073f3d92
commit
6fb8b62e5b
@ -347,7 +347,13 @@ function render_question() {
|
|||||||
if ('block_q_no' in question) {
|
if ('block_q_no' in question) {
|
||||||
block_q_no = question['block_q_no'];
|
block_q_no = question['block_q_no'];
|
||||||
}
|
}
|
||||||
header_text = header_text.replace('<block_remaining>', (block_length - block_q_no).toString());
|
let remaining_qs = (block_length - block_q_no).toString();
|
||||||
|
if (block_length - block_q_no > 1) {
|
||||||
|
remaining_qs += ' questions';
|
||||||
|
} else {
|
||||||
|
remaining_qs += ' question';
|
||||||
|
}
|
||||||
|
header_text = header_text.replace('<block_remaining_questions>', remaining_qs);
|
||||||
$question_header.html(header_text);
|
$question_header.html(header_text);
|
||||||
$question_text.html(question.text);
|
$question_text.html(question.text);
|
||||||
$question_title.html(`Question ${current_question + 1} of ${ questions.length }.`);
|
$question_title.html(`Question ${current_question + 1} of ${ questions.length }.`);
|
||||||
|
Loading…
Reference in New Issue
Block a user