Saltar al contenido principal

Function: updateQuestion()

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

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

Changes a question of a bank through its type's edit form, with the same inputs as createQuestion and only what's given (answers replaces them all). Saving makes a new version of the question, with an id of its own: the one returned, which quizzes using the latest version get from then on.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
questionIdnumber
inputPartial<Omit<QuestionInput, "type">>

Returns​

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