Documentation

SubmissionVersion
in package

SubmissionVersion represents a version of a submission with grade change history.

This is a read-only object that does not extend AbstractBaseApi.

Tags
see
https://canvas.instructure.com/doc/api/gradebook_history.html#SubmissionVersion

Table of Contents

Properties

$assignmentId  : int|null
$assignmentName  : string|null
$body  : string|null
$currentGrade  : string|null
$currentGradedAt  : string|null
$currentGrader  : string|null
$gradedAt  : string|null
$gradeMatchesCurrentSubmission  : bool|null
$grader  : string|null
$graderId  : int|null
$id  : int|null
$newGrade  : string|null
$newGradedAt  : string|null
$newGrader  : string|null
$previousGrade  : string|null
$previousGradedAt  : string|null
$previousGrader  : string|null
$score  : float|null
$submissionType  : string|null
$url  : string|null
$userId  : int|null
$userName  : string|null
$workflowState  : string|null

Methods

__construct()  : mixed
Constructor to hydrate the object from API response.
fromArray()  : self
Create a SubmissionVersion from an array.
getGrade()  : string|null
Get the grade value (for simplified feed responses).
getGradedTimestamp()  : string|null
Get the graded timestamp.
getGraderName()  : string|null
Get the grader name.
hasGradeChange()  : bool
Check if this version represents a grade change.
isGraded()  : bool
Check if the submission is graded.
isUnsubmitted()  : bool
Check if the submission is unsubmitted.

Properties

$gradeMatchesCurrentSubmission

public bool|null $gradeMatchesCurrentSubmission = null

Methods

__construct()

Constructor to hydrate the object from API response.

public __construct([array<string, mixed> $data = [] ]) : mixed
Parameters
$data : array<string, mixed> = []

fromArray()

Create a SubmissionVersion from an array.

public static fromArray(array<string, mixed> $data) : self
Parameters
$data : array<string, mixed>
Return values
self

getGrade()

Get the grade value (for simplified feed responses).

public getGrade() : string|null

Returns new_grade if available, otherwise current_grade.

Return values
string|null

getGradedTimestamp()

Get the graded timestamp.

public getGradedTimestamp() : string|null

Returns new_graded_at if available, otherwise graded_at.

Return values
string|null

getGraderName()

Get the grader name.

public getGraderName() : string|null

Returns new_grader if available, otherwise grader.

Return values
string|null

hasGradeChange()

Check if this version represents a grade change.

public hasGradeChange() : bool
Return values
bool

isGraded()

Check if the submission is graded.

public isGraded() : bool
Return values
bool

isUnsubmitted()

Check if the submission is unsubmitted.

public isUnsubmitted() : bool
Return values
bool

        
On this page

Search results