{#await surveyP then survey}
{#if $user && $user.is_admin}
{response.value}
<
{survey.title}
{#if exportview}Réponses{:else}Corrections{/if}
{#each questions as question (question.id)}
Question
Réponses
Moyenne
{/each}
{question.title}
{#await question.getResponses()}
Chargement …
{:then responses}
{#if responses}
{responses.filter((r) => !r.time_scored || (r.time_reported && r.time_reported >= r.time_scored)).length} /
{responses.length}
{#await usersP then users}
{Math.trunc(responses.length/users.length*1000)/10} %
{/await}
{:else}
0
{/if}
{#if responses && responses.filter((r) => r.time_scored).length}
{Math.trunc(responses.reduce((p, c) => (p + (c.score?c.score:0)), 0)/responses.filter((r) => r.time_scored).length*10)/10} %
{:else}
-- %
{/if}
{/await}
{question.title}
{#if question.kind == "text" || (exportview_list && question.kind.indexOf("list") == 0)}
{#await question.getResponses() then responses}
{#each responses as response (response.id)}
{/each}
{/if}
{/await}
{/await}