UpdateSubmissionDTO
extends AbstractBaseDto
in package
implements
DTOInterface
Data Transfer Object for updating submissions in Canvas LMS
This DTO handles updating/grading existing submissions with all the necessary fields supported by the Canvas Submissions API.
Table of Contents
Interfaces
Properties
- $comment : string|null
- Comment to add to the submission
- $excuse : bool|null
- Whether to excuse this submission (removes penalty and hides from student gradebook)
- $extraAttempts : int|null
- Additional attempt count to grant
- $groupComment : bool|null
- Whether the comment should be visible to all group members (for group assignments)
- $late : bool|null
- Whether to mark the submission as late
- $mediaCommentId : string|null
- Media comment ID for audio/video feedback
- $mediaCommentType : string|null
- Media comment type ('audio' or 'video')
- $pointsDeducted : float|null
- Points deducted for late submission
- $postedGrade : string|null
- The grade to assign to the submission (string to support letter grades)
- $rubricAssessment : array<string, mixed>|null
- Rubric assessment data
- $apiPropertyName : string
- The API property name for multipart requests
Methods
- __construct() : mixed
- BaseDto constructor.
- getComment() : string|null
- Get comment
- getExcuse() : bool|null
- Get excuse status
- getExtraAttempts() : int|null
- Get extra attempts
- getGroupComment() : bool|null
- Get group comment status
- getLate() : bool|null
- Get late status
- getMediaCommentId() : string|null
- Get media comment ID
- getMediaCommentType() : string|null
- Get media comment type
- getPointsDeducted() : float|null
- Get points deducted
- getPostedGrade() : string|null
- Get posted grade
- getRubricAssessment() : array<string, mixed>|null
- Get rubric assessment
- setComment() : void
- Set comment
- setExcuse() : void
- Set excuse status
- setExtraAttempts() : void
- Set extra attempts
- setGroupComment() : void
- Set group comment status
- setLate() : void
- Set late status
- setMediaCommentId() : void
- Set media comment ID
- setMediaCommentType() : void
- Set media comment type
- setPointsDeducted() : void
- Set points deducted
- setPostedGrade() : void
- Set posted grade
- setRubricAssessment() : void
- Set rubric assessment
- toApiArray() : array<string|int, mixed>
- Convert the DTO to an array for API requests
- toArray() : array<string|int, mixed>
- Convert the DTO to an array
Properties
$comment
Comment to add to the submission
public
string|null
$comment
= null
$excuse
Whether to excuse this submission (removes penalty and hides from student gradebook)
public
bool|null
$excuse
= null
$extraAttempts
Additional attempt count to grant
public
int|null
$extraAttempts
= null
$groupComment
Whether the comment should be visible to all group members (for group assignments)
public
bool|null
$groupComment
= null
$late
Whether to mark the submission as late
public
bool|null
$late
= null
$mediaCommentId
Media comment ID for audio/video feedback
public
string|null
$mediaCommentId
= null
$mediaCommentType
Media comment type ('audio' or 'video')
public
string|null
$mediaCommentType
= null
$pointsDeducted
Points deducted for late submission
public
float|null
$pointsDeducted
= null
$postedGrade
The grade to assign to the submission (string to support letter grades)
public
string|null
$postedGrade
= null
$rubricAssessment
Rubric assessment data
public
array<string, mixed>|null
$rubricAssessment
= null
$apiPropertyName
The API property name for multipart requests
protected
string
$apiPropertyName
= 'submission'
Methods
__construct()
BaseDto constructor.
public
__construct(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Tags
getComment()
Get comment
public
getComment() : string|null
Return values
string|nullgetExcuse()
Get excuse status
public
getExcuse() : bool|null
Return values
bool|nullgetExtraAttempts()
Get extra attempts
public
getExtraAttempts() : int|null
Return values
int|nullgetGroupComment()
Get group comment status
public
getGroupComment() : bool|null
Return values
bool|nullgetLate()
Get late status
public
getLate() : bool|null
Return values
bool|nullgetMediaCommentId()
Get media comment ID
public
getMediaCommentId() : string|null
Return values
string|nullgetMediaCommentType()
Get media comment type
public
getMediaCommentType() : string|null
Return values
string|nullgetPointsDeducted()
Get points deducted
public
getPointsDeducted() : float|null
Return values
float|nullgetPostedGrade()
Get posted grade
public
getPostedGrade() : string|null
Return values
string|nullgetRubricAssessment()
Get rubric assessment
public
getRubricAssessment() : array<string, mixed>|null
Return values
array<string, mixed>|nullsetComment()
Set comment
public
setComment(string|null $comment) : void
Parameters
- $comment : string|null
setExcuse()
Set excuse status
public
setExcuse(bool|null $excuse) : void
Parameters
- $excuse : bool|null
setExtraAttempts()
Set extra attempts
public
setExtraAttempts(int|null $extraAttempts) : void
Parameters
- $extraAttempts : int|null
setGroupComment()
Set group comment status
public
setGroupComment(bool|null $groupComment) : void
Parameters
- $groupComment : bool|null
setLate()
Set late status
public
setLate(bool|null $late) : void
Parameters
- $late : bool|null
setMediaCommentId()
Set media comment ID
public
setMediaCommentId(string|null $mediaCommentId) : void
Parameters
- $mediaCommentId : string|null
setMediaCommentType()
Set media comment type
public
setMediaCommentType(string|null $mediaCommentType) : void
Parameters
- $mediaCommentType : string|null
setPointsDeducted()
Set points deducted
public
setPointsDeducted(float|null $pointsDeducted) : void
Parameters
- $pointsDeducted : float|null
setPostedGrade()
Set posted grade
public
setPostedGrade(string|null $postedGrade) : void
Parameters
- $postedGrade : string|null
setRubricAssessment()
Set rubric assessment
public
setRubricAssessment(array<string, mixed>|null $rubricAssessment) : void
Parameters
- $rubricAssessment : array<string, mixed>|null
toApiArray()
Convert the DTO to an array for API requests
public
toApiArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
Convert the DTO to an array
public
toArray() : array<string|int, mixed>