diff --git a/frontend/src/lib/play/question.svelte b/frontend/src/lib/play/question.svelte index 386e79c..2821496 100644 --- a/frontend/src/lib/play/question.svelte +++ b/frontend/src/lib/play/question.svelte @@ -4,7 +4,7 @@ SPDX-FileCopyrightText: 2023 Marlon W (Mawoka) SPDX-License-Identifier: MPL-2.0 --> - -
+
{#if game_mode === 'normal'}

{@html question.question}

{#if question.image !== null && game_mode !== 'kahoot'} -
+
{/if} @@ -167,84 +167,94 @@ SPDX-License-Identifier: MPL-2.0 {/if} {#if timer_res !== '0'} {#if question.type === QuizQuestionType.ABCD || question.type === QuizQuestionType.VOTING} -
+
-
+
{#each question.answers as answer, i} {/each}
{:else if question.type === QuizQuestionType.RANGE} + {#await import('svelte-range-slider-pips')} {:then c} -
+
-
-
+
+
selectAnswer(slider_value[0])} - >{$t('words.submit')} + >{$t('words.submit')}
{/await} {:else if question.type === QuizQuestionType.TEXT} -
-

Enter your answer

+ +
+

Enter your answer

-
+
-
-
+
+
{ selectAnswer(text_input); @@ -258,9 +268,9 @@ SPDX-License-Identifier: MPL-2.0 {#if solution === undefined} {:else} -

+

Every number between {solution.answers.min_correct} and {solution.answers - .max_correct} was correct. You got {selected_answer}, so you have been + .max_correct} was correct. You got {selected_answer}, so you have been {#if solution.answers.min_correct <= parseInt(selected_answer) && parseInt(selected_answer) <= solution.answers.max_correct} correct {:else} @@ -272,10 +282,15 @@ SPDX-License-Identifier: MPL-2.0 -

+ +
{#each question.answers as answer, i (answer.id)}
@@ -283,59 +298,59 @@ SPDX-License-Identifier: MPL-2.0 on:click={() => { question.answers = swapArrayElements(question.answers, i, i - 1); }} - class="disabled:opacity-50 transition shadow-lg bg-black bg-opacity-30 w-full flex justify-center rounded-lg p-2 hover:bg-opacity-20 transition" - type="button" + class='disabled:opacity-50 transition shadow-lg bg-black bg-opacity-30 w-full flex justify-center rounded-lg p-2 hover:bg-opacity-20 transition' + type='button' disabled={i === 0 || selected_answer} > -

{answer.answer}

+

{answer.answer}

{/each} -
+
{ select_complex_answer(question.answers); @@ -353,13 +368,15 @@ SPDX-License-Identifier: MPL-2.0 bind:question bind:selected_answer bind:game_mode + {timer_res} + {circular_progress} /> -
-
+
+
selectAnswer(selected_answer)} - >{$t('words.submit')} + >{$t('words.submit')}
diff --git a/frontend/src/lib/play/questions/check.svelte b/frontend/src/lib/play/questions/check.svelte index 7067b8d..917671e 100644 --- a/frontend/src/lib/play/questions/check.svelte +++ b/frontend/src/lib/play/questions/check.svelte @@ -4,15 +4,20 @@ SPDX-FileCopyrightText: 2023 Marlon W (Mawoka) SPDX-License-Identifier: MPL-2.0 --> - -
+
+
+ +
-
+ +
{#each question.answers as answer, i} {/each}