Skip to content
Extraits de code Groupes Projets
Valider 4c0be408 rédigé par Brieuc Dubois's avatar Brieuc Dubois
Parcourir les fichiers

Only display topic selection for tutors

parent 138fba5a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -124,30 +124,32 @@ ...@@ -124,30 +124,32 @@
{$t('utils.words.tasks')} {$t('utils.words.tasks')}
</h2> </h2>
{#if !taskInProgress || !currentTask} {#if !taskInProgress || !currentTask}
<div class="flex gap-2"> {#if user.is_tutor}
<select class="select select-bordered w-32" bind:value={level}> <div class="flex gap-2">
<option value="all">{$t('utils.words.all')}</option> <select class="select select-bordered w-32" bind:value={level}>
{#each availableLevels as l} <option value="all">{$t('utils.words.all')}</option>
<option value={l}>{l}</option> {#each availableLevels as l}
{/each} <option value={l}>{l}</option>
</select> {/each}
<select class="select select-bordered flex-1 overflow-hidden" bind:value={currentTask}> </select>
{#each availableLevels as l} <select class="select select-bordered flex-1 overflow-hidden" bind:value={currentTask}>
{#if level === 'all' || l === level} {#each availableLevels as l}
<optgroup label={l}> {#if level === 'all' || l === level}
{#each tasks.filter((task: Task) => task.level === l) as task (task.id)} <optgroup label={l}>
<option value={task}> {#each tasks.filter((task: Task) => task.level === l) as task (task.id)}
{#if completedTasks.includes(task)} <option value={task}>
{#if completedTasks.includes(task)}
{/if}
{task.shortTitle} {/if}
</option> {task.shortTitle}
{/each} </option>
</optgroup> {/each}
{/if} </optgroup>
{/each} {/if}
</select> {/each}
</div> </select>
</div>
{/if}
<button class="btn mt-2 w-full btn-primary" onclick={startTask}> <button class="btn mt-2 w-full btn-primary" onclick={startTask}>
{$t('button.select')} {$t('button.select')}
</button> </button>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter