JSON quiz draft

๐Ÿ”™ ๐Ÿ’ญ 2021-04-18

A draft to create a JSON file for a quiz

A quizz take twos majors parts :

The content object

{
    "type": "",
    "fr": "",
    "en": "",
}

Legend :

  • type: the type of the string, to change the display
  • en, 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 changes
  • versionQuiz: 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 quiz
  • author: an array of string, it contains the name of one ore multiple authors
  • name: a content object, it contains the name of the quizz
  • description: a content 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 cardcontains 3 fields :

{
    "title":{},
    "lesson": {},
    "quizzes":[{}]
}

Legend :

  • title: a content object, it contains the title of the card
  • lesson: a content object, it contains the lesson of the card
  • quizzes: an array of quiz object, it contains quiz 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 of content object, it contains the question
  • choices: an array of content object, it contains choices
  • answers: an array of number, each number indicate the index of the correct ansswers

Versions

- 0.0.0

nametype
htmlthe string is a HTML string, it may contains HTML tags
markdownthe string is in a markdown format
stringthe string is normal