Quiz

Models a quiz.

Supertype

Item

Subtypes

None

JSON Representation

{
    "id" : string,
    "title" : string,
    "visibility" : string,     
    "survey" : boolean,   
    "tags" : string[],
    "creationDate" : datetime,  
    "lastChangeDate" : datetime,    
    "author" : User,
    "nbQuestions" : unsigned integer,  
    ("questions" : Question[],)  
    ("defaultDuration" : string)
    ("favorite" : boolean,)
    ("imported" : boolean)
}

Fields description

Field Meaning Constraints
id Identifier of the quiz.
  • POST requests : ignored field.
  • GET requests : Valid API item identifier.
title Title of the quiz. Between 3 and 250 characters long.
visibility Visibility of the quiz. One of the following values : "public", "private" or "draft".
survey Models if the quiz is a survey. If true, no good answer is associated to questions (the questions does not have a goodAnswerfield).
tags Tags associated to this quiz.
  • Contains at least 2 distinct strings.
  • characters \ and " are forbidden in tags.
creationDate Creation date of the quiz.
  • POST requests : ignored field.
  • GET requests : string of the form "YYYY-MM-DD hh:mm:ss", expressed in UTC (Coordinated Universal Time).
lastChangeDate Last change date of the quiz.
  • POST requests : ignored field.
  • GET requests : string of the form "YYYY-MM-DD hh:mm:ss", expressed in UTC (Coordinated Universal Time).
author Author of the quiz.
  • POST requests : ignored field.
  • GET requests : JSON representation of a User.
nbQuestions Number of questions of the quiz.
  • POST requests : ignored field.
  • GET requests : number of elements in questions.
questions Questions of the quiz. Optional for POST requests. Each cell is the JSON representation of a Question.
defaultDuration Specifies the default duration constraint for this quiz when played in a deferred session. Optional for POST requests. String of the form "Hours:Minutes:Seconds", "Minutes:Seconds" or "Seconds".
  • If present, Hours is one of the following values : 0, 1, 2, 3, 4, 5, 6, 7, 8
  • If present, Minutes is one of the following values : 0, 1, 2, 3, 4, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55
  • Seconds is one of the following values : 0, 1, 2, 3, 4, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55
favorite Models if this quiz belongs to the favorite quizzes of the requesting user.
  • POST requests : optional (default value : false).
  • GET requests : present only if the requesting user is authentified.
imported Models if this quiz has been imported (from the quiz portal) by the requesting user.
  • POST requests : ignored field.
  • GET requests : present only if the requesting user is authentified.