Include works in allGrades
This commit is contained in:
parent
93b5857fa6
commit
a9bb758e99
5 changed files with 31 additions and 21 deletions
|
|
@ -20,7 +20,7 @@
|
|||
<small class="text-muted">Notes</small>
|
||||
</h2>
|
||||
|
||||
{#await getSurveys()}
|
||||
{#await getSurveys(true)}
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="spinner-border me-2" role="status"></div>
|
||||
Chargement des questionnaires corrigés…
|
||||
|
|
@ -38,9 +38,15 @@
|
|||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Login</th>
|
||||
{#each surveys as survey (survey.id)}
|
||||
{#if survey.corrected && (promo === null || survey.promo == promo)}
|
||||
<th><a href="surveys/{survey.id}" style="text-decoration: none">{survey.title}</a></th>
|
||||
{#each surveys as survey}
|
||||
{#if survey.corrected && (!promo || survey.promo == promo)}
|
||||
<th>
|
||||
{#if survey.kind == "survey"}
|
||||
<a href="surveys/{survey.id}" style="text-decoration: none">{survey.title}</a>
|
||||
{:else}
|
||||
<a href="works/{survey.id}" style="text-decoration: none">{survey.title}</a>
|
||||
{/if}
|
||||
</th>
|
||||
{/if}
|
||||
{/each}
|
||||
</tr>
|
||||
|
|
@ -57,13 +63,15 @@
|
|||
</tr>
|
||||
{:then users}
|
||||
{#each users as user (user.id)}
|
||||
{#if promo === null || user.promo === promo}
|
||||
{#if !promo || user.promo == promo}
|
||||
<tr>
|
||||
<td><a href="users/{user.id}" style="text-decoration: none">{user.id}</a></td>
|
||||
<td><a href="users/{user.login}" style="text-decoration: none">{user.login}</a></td>
|
||||
{#each surveys as survey (survey.id)}
|
||||
{#if survey.corrected && (promo === null || survey.promo == promo)}
|
||||
<td>{grades[user.id] && grades[user.id][survey.id]?grades[user.id][survey.id]:""}</td>
|
||||
{#each surveys as survey}
|
||||
{#if survey.corrected && (!promo || survey.promo == promo)}
|
||||
<td>
|
||||
{grades[user.id] && grades[user.id][survey.kind + "." + survey.id]?grades[user.id][survey.kind + "." + survey.id]:""}
|
||||
</td>
|
||||
{/if}
|
||||
{/each}
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
export async function load({ params }) {
|
||||
return {
|
||||
promo: params.promo,
|
||||
promo: parseInt(params.promo),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue