JSON quiz draft

A draft to create a JSON file for a quiz

JSON quiz draft

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 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

  • Add the draft
  • In the content object, type attribute support :
nametype
htmlthe string is a HTML string, it may contains HTML tags
markdownthe string is in a markdown format
stringthe string is normal