chore(deps): update module github.com/coreos/go-oidc to v3 - autoclosed #17

Closed
renovate-bot wants to merge 55 commits from renovate/github.com-coreos-go-oidc-3.x into master
2 changed files with 77 additions and 17 deletions
Showing only changes of commit df2da4221e - Show all commits

View File

@ -1,25 +1,77 @@
<script> <script>
import { getSurveys } from '../lib/surveys';
import { getUsers, getGrades, getPromos } from '../lib/users';
export let promo = null; export let promo = null;
</script> </script>
{#await getPromos() then promos}
<div class="float-end me-2">
<select class="form-select" bind:value={promo}>
<option value={null}>tous</option>
{#each promos as promo, pid (pid)}
<option value={promo}>{promo}</option>
{/each}
</select>
</div>
{/await}
<h2> <h2>
Étudiants {#if promo}{promo}{/if} Étudiants {#if promo !== null}{promo}{/if}
<small class="text-muted">Notes</small> <small class="text-muted">Notes</small>
</h2> </h2>
<table class="table table-striped table-hover"> {#await getSurveys()}
<thead> <div class="d-flex justify-content-center">
<tr> <div class="spinner-border me-2" role="status"></div>
<th>ID</th> Chargement des questionnaires corrigés&hellip;
<th>Login</th> </div>
<th ng-repeat="(sid,survey) in surveys" ng-if="survey.corrected">{ survey.title }</th> {:then surveys}
</tr> {#await getGrades()}
</thead> <div class="d-flex justify-content-center">
<tbody> <div class="spinner-border me-2" role="status"></div>
<tr ng-repeat="(uid,user) in users" ng-click="showUser(user)"> Chargement des notes&hellip;
<td>{ user.id }</td> </div>
<td>{ user.login }</td> {:then grades}
<td ng-repeat="(sid,survey) in surveys" ng-if="survey.corrected">{ grades[user.id][survey.id] }</td> <div class="card mb-5">
</tr> <table class="table table-striped table-hover mb-0">
</tbody> <thead>
</table> <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>
{/if}
{/each}
</tr>
</thead>
<tbody>
{#await getUsers()}
<tr>
<td colspan="20">
<div class="d-flex justify-content-center">
<div class="spinner-border me-2" role="status"></div>
Chargement des étudiants&hellip;
</div>
</td>
</tr>
{:then users}
{#each users as user (user.id)}
{#if promo === null || 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][survey.id]?grades[user.id][survey.id]:"N/A"}</td>
{/if}
{/each}
</tr>
{/if}
{/each}
{/await}
</tbody>
</table>
</div>
{/await}
{/await}

View File

@ -25,6 +25,14 @@ export async function getUser(uid) {
} }
} }
export async function getGrades(uid, survey) {
const res = await fetch(`api/grades`, {headers: {'Accept': 'application/json'}})
if (res.status == 200) {
return await res.json();
} else {
throw new Error((await res.json()).errmsg);
}
}
export async function getUserGrade(uid, survey) { export async function getUserGrade(uid, survey) {
const res = await fetch(`api/users/${uid}/surveys/${survey.id}/grades`, {headers: {'Accept': 'application/json'}}) const res = await fetch(`api/users/${uid}/surveys/${survey.id}/grades`, {headers: {'Accept': 'application/json'}})
if (res.status == 200) { if (res.status == 200) {