Home Manual Reference Source
public class | source

ChoiceChallenge

ChoiceChallenge domain model.

Constructor Summary

Public Constructor
public

constructor(id: string, question: string, choices: string[])

Create a choice challenge domain model.

Member Summary

Public Members
public

The sentences of which at most one may be recognised.

public

The choice challenge identifier.

public

A hint or question related to the choices.

public

The status of the challenge's preparation. Either 'unprepared', 'preparing' or 'prepared'.

Public Constructors

public constructor(id: string, question: string, choices: string[]) source

Create a choice challenge domain model.

Params:

NameTypeAttributeDescription
id string
  • nullable: true

The ChoiceChallenge identifier. If none is given, one is generated.

question string
  • nullable: true

A hint or question related to the choices.

choices string[]

The sentences of which at most one may be recognised.

Throw:

Error

id parameter of type "string|null" is required.

Error

question parameter of type "string|null|undefined" is required.

Error

choices parameter of type "Array.<string>" is required.

Public Members

public choices: string[] source

The sentences of which at most one may be recognised.

public id: string source

The choice challenge identifier.

public question: string source

A hint or question related to the choices.

public status: string source

The status of the challenge's preparation. Either 'unprepared', 'preparing' or 'prepared'.