Can display corrections in live sessions

This commit is contained in:
nemunaire 2022-09-01 19:14:57 +02:00
commit 89f61d1046
4 changed files with 47 additions and 9 deletions

View file

@ -89,6 +89,7 @@
console.log(data);
if (data.action && data.action == "new_question") {
show_question = data.question;
survey.corrected = data.corrected;
if (timer_cancel) {
clearInterval(timer_cancel);
timer_cancel = null;
@ -157,7 +158,7 @@
}
</script>
{#await surveyP then survey}
{#await surveyP then unused}
{#if $user && $user.is_admin}
<a href="surveys/{survey.id}/admin" class="btn btn-primary ms-1 float-end" title="Aller à l'interface d'administration"><i class="bi bi-pencil"></i></a>
<a href="surveys/{survey.id}/responses" class="btn btn-success ms-1 float-end" title="Voir les réponses"><i class="bi bi-files"></i></a>
@ -185,8 +186,9 @@
</div>
{:then question}
<QuestionForm
{survey}
{question}
readonly={timer >= 100}
readonly={timer >= 100 || survey.corrected}
bind:value={value}
on:change={sendValue}
>