A vue 3 quiz app. Create your own tests and check your knowledge. Generated using vue version 3.3.4 and typescript.
To create a new quiz simply place your quiz.json file in "public/assets/quizzes/". Afterwards add your filename to "src/quizzes.ts". Thats it! Restart the app and your quiz should be displayed.
This framework is using json-files to save and load quizzes. A barebone quiz.json looks like this:
{
"title": "YOUR QUIZ NAME",
"questions": [
...
]
}
Currently there are 3 types of questions for Quizzes.
A single choice question is a question where only one answer is correct.
{
"type": "single_choice",
"title": "YOUR QUESTION HERE"
"answers": [
{
"text": "YOUR FIRST ANSWER",
"isCorrect": true
},
{
"text": "YOUR SECOND ANSWER",
"isCorrect": false
},
...
]
}
You can add as many answers as you like. Keep in mind that only one answer should have a positive "isCorrect" value.
A multiple choice question is a question where multiple answers are correct.
{
"type": "multiple_choice",
"title": "YOUR QUESTION HERE"
"answers": [
{
"text": "YOUR FIRST ANSWER",
"isCorrect": true
},
{
"text": "YOUR SECOND ANSWER",
"isCorrect": false
},
...
]
}
You can add as many answers as you like. There is no limit on how many answers are correct.
A drop list question is a question where you need to bring the answers in the correct order.
{
"type": "drop_list",
"title": "YOUR QUESTION HERE",
"answers": [
{
"text": "Answer A"
},
{
"text": "Answer B"
},
{
"text": "Answer C"
},
...
]
}
You can add as many answers as you like. Keep in mind that the order of your answers in the array is considered the correct order while submitting the quiz.
npm install
npm run dev
npm run build