gotoSurvey(survey)}>
{#if !survey.shown}{/if}
{survey.title}
{#if survey.group}{survey.group}{/if}
{#if $user && survey.kind === "w" && survey.startAvailability() < Date.now()}
{/if}
|
{#if survey.startAvailability() > Date.now()}
|
{:else}
|
{/if}
{#if $user}
{#if !survey.corrected && !$user.is_admin}
N/A |
{:else}
{#await getScore(survey)}
{:then score}
{#if score.count !== undefined}
0}
class:badge={survey.corrected}
class:bg-danger={survey.corrected && score.count-score.corrected > 0}
class:bg-dark={survey.corrected && score.count-score.corrected <= 0}
title="{score.count-score.corrected}/{score.count}"
>
{#if score.count == 0 || survey.corrected}
{score.count-score.corrected}
{:else}
{Math.trunc((1-score.corrected/score.count)*100)} %
{/if}
{:else}
= 18}
class:bg-info={score.score < 18 && score.score >= 15}
class:bg-warning={score.score < 15 && score.score >= 9}
class:bg-danger={score.score < 9}
>
{score.score}
{/if}
{:catch error}
{/await}
|
{/if}
{/if}
{/if}
{/if}
{/each}