🐛 Small cosmetic fixes

This commit is contained in:
Mawoka
2022-08-02 13:25:42 +02:00
parent e314c4fb6f
commit df6ce8a8b2
3 changed files with 17 additions and 3 deletions
-1
View File
@@ -65,7 +65,6 @@
data.questions[selected_question].type = QuizQuestionType.ABCD;
}
*/
console.log(data.questions[selected_question].type, 'moin');
</script>
<div class="w-full h-full pb-20 px-20">
+7 -1
View File
@@ -198,8 +198,14 @@
>
{/each}
</div>
{:else if question.type === QuizQuestionType.RANGE}
<p class="text-center text-sm p-0.5">
All numbers between {question.answers.min_correct}
and {question.answers.max_correct} are correct, where numbers between {question
.answers.min} and {question.answers.max} can be selected.
</p>
{:else}
<p>Hi!</p>
<p>Unknown Question Type (shouldn't happen)</p>
{/if}
</div>
{/each}
+10 -1
View File
@@ -25,6 +25,7 @@
import Editor from '$lib/editor.svelte';
import { getLocalization } from '$lib/i18n';
import { navbarVisible } from '$lib/stores';
import { QuizQuestionType } from '$lib/quiz_types';
navbarVisible.set(false);
@@ -40,6 +41,7 @@
interface Question {
question: string;
time: string;
type?: QuizQuestionType;
answers: Answer[];
}
@@ -61,7 +63,14 @@
description: '',
public: false,
title: '',
questions: [{ question: '', time: '20', answers: [{ right: false, answer: '' }] }]
questions: [
{
type: QuizQuestionType.ABCD,
question: '',
time: '20',
answers: [{ right: false, answer: '' }]
}
]
};
} else {
data = JSON.parse(from_localstorage);