JSON quiz draft
๐ ๐ญ 2021-04-18
A draft to create a JSON file for a quiz
A quizz take twos majors parts :
- information about the quiz
- questions and answers in a
card
object
The content object
{
"type": "",
"fr": "",
"en": "",
}
Legend :
type
: the type of the string, to change the displayen
,fr
: languages code, with the content
Information about the quiz
{
"version": "",
"versionQuiz": "",
"keywords": [""],
"name": {
"type": "string",
...
},
"author": [""],
"description": {
"type": "string",
...
},
}
Legend :
version
: a string, it contains the version of the interpretor to use, for compabitily with future changesversionQuiz
: a string, it contains the version of the quiz file (useful if we send quiz and have copy of them)description
: an array of strings, it contains keywords to found the quizauthor
: an array of string, it contains the name of one ore multiple authorsname
: acontent object
, it contains the name of the quizzdescription
: acontent object
, it contains a description of the quiz
In the name
and description
fields, the type
attribute of the content object
is string
. This attribute isnโt required.
Quiz data
The data of the quiz is in an array of object named cards
.
The name card
represent here one object of the cards
array.
Each card
contains 3 fields :
{
"title":{},
"lesson": {},
"quizzes":[{}]
}
Legend :
title
: acontent object
, it contains the title of the cardlesson
: acontent object
, it contains the lesson of the cardquizzes
: an array ofquiz object
, it containsquiz object
quiz object
The quiz object contains a quiz.
A quiz can have multiple form, the quiz object contains the attribute type
which indicate what type of quiz it is.
{
"type": "qcm"
}
The qcm
type
{
"type": "qcm",
"question": {},
"choices": [{}, {}],
"answers": [0,]
}
Legend :
question
: an array ofcontent object
, it contains the questionchoices
: an array ofcontent object
, it contains choicesanswers
: an array of number, each number indicate the index of the correct ansswers
Versions
- 0.0.0
- Add the draft
- In the
content object
,type
attribute support :
name | type |
---|---|
html | the string is a HTML string, it may contains HTML tags |
markdown | the string is in a markdown format |
string | the string is normal |