🐛 Small cosmetic fixes
This commit is contained in:
@@ -65,7 +65,6 @@
|
|||||||
data.questions[selected_question].type = QuizQuestionType.ABCD;
|
data.questions[selected_question].type = QuizQuestionType.ABCD;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
console.log(data.questions[selected_question].type, 'moin');
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full h-full pb-20 px-20">
|
<div class="w-full h-full pb-20 px-20">
|
||||||
|
|||||||
@@ -198,8 +198,14 @@
|
|||||||
>
|
>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</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}
|
{:else}
|
||||||
<p>Hi!</p>
|
<p>Unknown Question Type (shouldn't happen)</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
import Editor from '$lib/editor.svelte';
|
import Editor from '$lib/editor.svelte';
|
||||||
import { getLocalization } from '$lib/i18n';
|
import { getLocalization } from '$lib/i18n';
|
||||||
import { navbarVisible } from '$lib/stores';
|
import { navbarVisible } from '$lib/stores';
|
||||||
|
import { QuizQuestionType } from '$lib/quiz_types';
|
||||||
|
|
||||||
navbarVisible.set(false);
|
navbarVisible.set(false);
|
||||||
|
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
interface Question {
|
interface Question {
|
||||||
question: string;
|
question: string;
|
||||||
time: string;
|
time: string;
|
||||||
|
type?: QuizQuestionType;
|
||||||
answers: Answer[];
|
answers: Answer[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +63,14 @@
|
|||||||
description: '',
|
description: '',
|
||||||
public: false,
|
public: false,
|
||||||
title: '',
|
title: '',
|
||||||
questions: [{ question: '', time: '20', answers: [{ right: false, answer: '' }] }]
|
questions: [
|
||||||
|
{
|
||||||
|
type: QuizQuestionType.ABCD,
|
||||||
|
question: '',
|
||||||
|
time: '20',
|
||||||
|
answers: [{ right: false, answer: '' }]
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
data = JSON.parse(from_localstorage);
|
data = JSON.parse(from_localstorage);
|
||||||
|
|||||||
Reference in New Issue
Block a user