Able to make corrections
This commit is contained in:
parent
df2da4221e
commit
11c49bcb34
22 changed files with 1085 additions and 80 deletions
47
atsebayt/src/components/Correction.svelte
Normal file
47
atsebayt/src/components/Correction.svelte
Normal file
|
@ -0,0 +1,47 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
import CorrectionResponses from './CorrectionResponses.svelte';
|
||||
|
||||
export let question = null;
|
||||
export let cts = null;
|
||||
export let child = null;
|
||||
export let filter = "";
|
||||
export let notCorrected = false;
|
||||
export let showStudent = false;
|
||||
export let templates = [];
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
</script>
|
||||
|
||||
{#if question && (question.kind == 'mcq' || question.kind == 'ucq')}
|
||||
{#await question.getProposals()}
|
||||
<div class="text-center mt-4">
|
||||
<div class="spinner-border text-primary mx-3" role="status"></div>
|
||||
<span>Récupération des propositions…</span>
|
||||
</div>
|
||||
{:then proposals}
|
||||
<CorrectionResponses
|
||||
{cts}
|
||||
bind:this={child}
|
||||
{filter}
|
||||
{question}
|
||||
{notCorrected}
|
||||
{proposals}
|
||||
{showStudent}
|
||||
{templates}
|
||||
on:nb_responses={(v) => dispatch('nb_responses', v.detail)}
|
||||
/>
|
||||
{/await}
|
||||
{:else}
|
||||
<CorrectionResponses
|
||||
{cts}
|
||||
bind:this={child}
|
||||
{filter}
|
||||
{question}
|
||||
{notCorrected}
|
||||
{showStudent}
|
||||
{templates}
|
||||
on:nb_responses={(v) => dispatch('nb_responses', v.detail)}
|
||||
/>
|
||||
{/if}
|
112
atsebayt/src/components/CorrectionReference.svelte
Normal file
112
atsebayt/src/components/CorrectionReference.svelte
Normal file
|
@ -0,0 +1,112 @@
|
|||
<script>
|
||||