Saltar al contenido principal

Interface: QuestionInput

Defined in: areas/questions/banks.ts:260

A question for createQuestion, or the changes for updateQuestion (without its type).

Properties​

PropertyTypeDescriptionDefined in
answers?object[]Multichoice, short answer and numerical answers: a fraction of the mark (1 right, 0 wrong, negatives for penalties), the nearest one Moodle offers. A numerical answer's tolerance is the error accepted around it.areas/questions/banks.ts:269
categoryId?numberThe bank's category it goes in; a new question goes in the bank's default one when left out.areas/questions/banks.ts:273
correct?booleanTrue/false: the right answer.areas/questions/banks.ts:271
defaultMark?number-areas/questions/banks.ts:274
fields?Record<string, FieldValue>Any other field of the type's form, by name.areas/questions/banks.ts:276
namestring-areas/questions/banks.ts:262
textstringThe question's text (HTML).areas/questions/banks.ts:264
type"multichoice" | "truefalse" | "shortanswer" | "numerical" | "essay"-areas/questions/banks.ts:261