Skip to main content
Module

x/gesso/types/params.ts>CreateScoreParams

A TypeScript API client for Canvas LMS
Latest
interface CreateScoreParams
import { type CreateScoreParams } from "https://deno.land/x/gesso@v0.1.2/types/params.ts";

Properties

optional
userId: string

The lti_user_id or the Canvas user_id. Returns a 422 if user not found in Canvas or is not a student.

optional
activityProgress: string

Indicate to Canvas the status of the user towards the activity's completion. Must be one of Initialized, Started, InProgress, Submitted, Completed.

optional
gradingProgress: string

Indicate to Canvas the status of the grading process. A value of PendingManual will require intervention by a grader. Values of NotReady, Failed, and Pending will cause the scoreGiven to be ignored. FullyGraded values will require no action. Possible values are NotReady, Failed, Pending, PendingManual, FullyGraded.

optional
timestamp: string

Date and time when the score was modified in the tool. Should use ISO8601-formatted date with subsecond precision. Returns a 400 if the timestamp is earlier than the updated_at time of the Result.

optional
scoreGiven: number

The Current score received in the tool for this line item and user, scaled to the scoreMaximum

optional
scoreMaximum: number

Maximum possible score for this result; it must be present if scoreGiven is present. Returns 412 if not present when scoreGiven is present.

optional
comment: string

Comment visible to the student about this score.

optional
httpscanvasinstructurecomltisubmission: Record<string, unknown>

(EXTENSION) Optional submission type and data. Fields listed below.

optional
httpscanvasinstructurecomltisubmissionnewsubmission: boolean

(EXTENSION field) flag to indicate that this is a new submission. Defaults to true unless submission_type is none.

optional
httpscanvasinstructurecomltisubmissionprioritizenontoolgrade: boolean

(EXTENSION field) flag to prevent a request from overwriting an existing grade for a submission. Defaults to false.

optional
httpscanvasinstructurecomltisubmissionsubmissiontype: string

(EXTENSION field) permissible values are: none, basic_lti_launch, online_text_entry, external_tool, online_upload, or online_url. Defaults to external_tool. Ignored if content_items are provided.

optional
httpscanvasinstructurecomltisubmissionsubmissiondata: string

(EXTENSION field) submission data (URL or body text). Only used for submission_types basic_lti_launch, online_text_entry, online_url. Ignored if content_items are provided.

optional
httpscanvasinstructurecomltisubmissionsubmittedat: string

(EXTENSION field) Date and time that the submission was originally created. Should use ISO8601-formatted date with subsecond precision. This should match the data and time that the original submission happened in Canvas.

optional
httpscanvasinstructurecomltisubmissioncontentitems: unknown[]

(EXTENSION field) Files that should be included with the submission. Each item should contain type: file, and a url pointing to the file. It can also contain a title, and an explicit MIME type if needed (otherwise, MIME type will be inferred from the title or url). If any items are present, submission_type will be online_upload.