BulkUpdateModuleAssignmentOverridesDTO
extends AbstractBaseDto
in package
implements
DTOInterface
Bulk Update Module Assignment Overrides DTO
This DTO is used to bulk update module assignment overrides. Overrides that already exist should include an ID and will be updated if needed. New overrides will be created for overrides in the list without an ID. Overrides not included in the list will be deleted. Providing an empty list will delete all of the module's overrides.
Table of Contents
Interfaces
Properties
- $overrides : array<string|int, mixed>
- List of overrides to apply to the module
- $apiPropertyName : string
- The name of the property in the API
Methods
- __construct() : mixed
- Constructor
- addGroupOverride() : self
- Add a group override (requires Differentiation Tags to be enabled)
- addOverride() : self
- Add an override to the list
- addSectionOverride() : self
- Add a section override
- addStudentOverride() : self
- Add a student override
- clearOverrides() : self
- Clear all overrides (will delete all module overrides when submitted)
- getOverrides() : array<string|int, mixed>
- Get the overrides
- setOverrides() : self
- Set the overrides
- toApiArray() : array<string|int, mixed>
- Convert to API array format This returns the overrides directly as Canvas expects them in JSON format
- toArray() : array<string|int, mixed>
- Convert the DTO to an array
Properties
$overrides
List of overrides to apply to the module
public
array<string|int, mixed>
$overrides
= []
$apiPropertyName
The name of the property in the API
protected
string
$apiPropertyName
= 'overrides'
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
addGroupOverride()
Add a group override (requires Differentiation Tags to be enabled)
public
addGroupOverride(int $groupId[, int|null $id = null ][, string|null $title = null ]) : self
Parameters
- $groupId : int
- $id : int|null = null
-
Optional override ID for updating existing override
- $title : string|null = null
-
Optional title for the override
Return values
selfaddOverride()
Add an override to the list
public
addOverride(array<string|int, mixed> $override) : self
Parameters
- $override : array<string|int, mixed>
-
Override data containing optional 'id', and one of: 'student_ids', 'course_section_id', or 'group_id'
Return values
selfaddSectionOverride()
Add a section override
public
addSectionOverride(int $courseSectionId[, int|null $id = null ][, string|null $title = null ]) : self
Parameters
- $courseSectionId : int
- $id : int|null = null
-
Optional override ID for updating existing override
- $title : string|null = null
-
Optional title for the override
Return values
selfaddStudentOverride()
Add a student override
public
addStudentOverride(array<string|int, int> $studentIds[, int|null $id = null ][, string|null $title = null ]) : self
Parameters
- $studentIds : array<string|int, int>
- $id : int|null = null
-
Optional override ID for updating existing override
- $title : string|null = null
-
Optional title for the override
Return values
selfclearOverrides()
Clear all overrides (will delete all module overrides when submitted)
public
clearOverrides() : self
Return values
selfgetOverrides()
Get the overrides
public
getOverrides() : array<string|int, mixed>
Return values
array<string|int, mixed>setOverrides()
Set the overrides
public
setOverrides(array<string|int, mixed> $overrides) : self
Parameters
- $overrides : array<string|int, mixed>
Return values
selftoApiArray()
Convert to API array format This returns the overrides directly as Canvas expects them in JSON format
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>