Saltar al contenido principal

Function: setWorkshopPhase()

function setWorkshopPhase(
context,
siteUrl,
activityId,
phase
): Promise<{
changed: string;
phase: WorkshopPhase;
}>;

Defined in: areas/workshops/workshops.ts:255

Switches a workshop to a phase, as its page's phase links do, confirming Moodle's question (any phase, forwards or back; Moodle allocates nothing and calculates no grades on its own when it switches). Returns a sentence of what changed and the phase afterwards. Throws WorkshopError when the person can't switch the workshop's phases (Moodle's mod/workshop:switchphase, a teacher's) or the id isn't a workshop's.

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
phaseWorkshopPhase

Returns​

Promise<{ changed: string; phase: WorkshopPhase; }>