Creating a quiz - ritikmishra/quizapp GitHub Wiki
At the moment, there is no UI for creating a quiz for QuizApp. To solve this, make a POST request to https://codebreakquizapp.herokuapp.com/upload containing a JSON. The JSON should be under the parameter quiz
.
#Format
Here is an example of a quiz JSON.
{
"multiple_choice": [
{
"answer": "questionanswer",
"options": [
"choice1",
"choice2",
"questionanswer"
],
"text": "the actual question"
}
],
"short_answer": [
{
"keywords": [
"keyword1",
"keyword2",
"keyword3",
"keyword4"
],
"text": "The actual question"
}
],
"title": "Quiz Title"
}
Let's explain this in more detail
Title
Make a descriptive title for your quiz. Put this under the attribute title
. This is the only required attribute, and technically, you could send just the title.
Multiple choice
This will be a list/array of objects, with each object representing a question. Each object should have the following attributes: answer
, options
, and text
.
Answer
This should be the answer to the question and should be included in options
.
Options
This will be a list of the possible options for that question. There is no limit to the amount of options
Text
This will be the question text. Make sure that your question is clear, but it is not necessary.
Short Answer
This will be a list/array of objects, with each object representing a short answer question, where users write their own response. Each object should have the following attributes: keywords
, and text
.
Keywords
This will be a list of words. Every word in this list should be a word that would be in every correct answer. For example, if the question was "What is the powerhouse of the cell?", a word that should be in the keywords list is "Mitochondria."
Text
This will be the question text. Make sure that your question is clear, but it is not necessary.
Examples
To see examples, look at quizzes.json
inside the repository. Keep in mind that all quizzes are stored in a single file under a unique Quiz ID.