Saltar al contenido principal

Function: assignmentSubmissions()

Call Signature​

function assignmentSubmissions(
context,
siteUrl,
activityId,
options
): Promise<ListPage<Submission>>;

Defined in: areas/assignments/grading.ts:92

Every participant's submission to an assignment, with the group they submit for (group submissions), and, unless includeContent is false, its content, the feedback files they have, its marking workflow state and markers (all from each participant's grading panel). Those come only for participants with a submission: Moodle's grading panel creates an empty one for a participant who has none, so reading leaves them at "none", without the panel's details (confirmed empirically on the sandbox, 5.2). For a participant with a submission and no grade yet, the panel still leaves an empty grade (-1, not graded) and a "Grading form viewed" event, as Moodle's grader does. Only some participants when given their userIds; with limit, a page of them in the grader's order (see "Long lists" in the docs' concepts): Moodle's service lists every participant at once, cut to the page, and only the page's participants are read further (their dates, their panels).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
optionsWithLimit<SubmissionOptions>

Returns​

Promise<ListPage<Submission>>

Call Signature​

function assignmentSubmissions(
context,
siteUrl,
activityId,
options?
): Promise<Submission[]>;

Defined in: areas/assignments/grading.ts:93

Every participant's submission to an assignment, with the group they submit for (group submissions), and, unless includeContent is false, its content, the feedback files they have, its marking workflow state and markers (all from each participant's grading panel). Those come only for participants with a submission: Moodle's grading panel creates an empty one for a participant who has none, so reading leaves them at "none", without the panel's details (confirmed empirically on the sandbox, 5.2). For a participant with a submission and no grade yet, the panel still leaves an empty grade (-1, not graded) and a "Grading form viewed" event, as Moodle's grader does. Only some participants when given their userIds; with limit, a page of them in the grader's order (see "Long lists" in the docs' concepts): Moodle's service lists every participant at once, cut to the page, and only the page's participants are read further (their dates, their panels).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
options?WithoutLimit<SubmissionOptions>

Returns​

Promise<Submission[]>

Call Signature​

function assignmentSubmissions(
context,
siteUrl,
activityId,
options?
): Promise<
| ListPage<Submission>
| Submission[]>;

Defined in: areas/assignments/grading.ts:94

Every participant's submission to an assignment, with the group they submit for (group submissions), and, unless includeContent is false, its content, the feedback files they have, its marking workflow state and markers (all from each participant's grading panel). Those come only for participants with a submission: Moodle's grading panel creates an empty one for a participant who has none, so reading leaves them at "none", without the panel's details (confirmed empirically on the sandbox, 5.2). For a participant with a submission and no grade yet, the panel still leaves an empty grade (-1, not graded) and a "Grading form viewed" event, as Moodle's grader does. Only some participants when given their userIds; with limit, a page of them in the grader's order (see "Long lists" in the docs' concepts): Moodle's service lists every participant at once, cut to the page, and only the page's participants are read further (their dates, their panels).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
activityIdnumber
options?SubmissionOptions

Returns​

Promise< | ListPage<Submission> | Submission[]>