Skip to main content

Function: createQuestion()

function createQuestion(
context,
siteUrl,
activityId,
input
): Promise<{
changed: string;
questionId?: number;
}>;

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

Creates one question in a bank through its type's edit form; returns its id. Imports are the way for several; this is for one-offs.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
inputQuestionInput

Returns​

Promise<{ changed: string; questionId?: number; }>