Skip to main content

Function: editCourse()

function editCourse(
context,
siteUrl,
courseId,
action,
ids,
target?
): Promise<void>;

Defined in: core/editor.ts:25

Runs one of the course editor's actions through its own service (ADR-004), as the editor does: ids of activities or sections, and a target section (cm_move: at its end; section_add, section_move_after: after it) or a target activity (cm_move: before it).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
courseIdnumber
actionEditorAction
idsnumber[]
target{ activityId?: number; sectionId?: number; }
target.activityId?number
target.sectionId?number

Returns​

Promise<void>