Documentation

UpdateModuleDTO extends AbstractBaseDto
in package
implements DTOInterface

Abstract base class for Data Transfer Objects (DTOs).

Provides common functionality for all DTO classes including data population, array transformation for Canvas API multipart format, and date/time handling. DTOs are used to format and validate data before sending to the Canvas API.

Table of Contents

Interfaces

DTOInterface

Properties

$name  : string|null
The name of the module
$position  : int|null
The position of the module in the course (1-based)
$prerequisiteModuleIds  : array<string|int, mixed>|null
IDs of Modules that must be completed before this one is unlocked Prerequisite modules must precede this module (i.e. have a lower position value), otherwise they will be ignored
$published  : bool|null
Whether the module is published and visible to students
$publishFinalGrade  : bool|null
Whether to publish the student’s final grade for the course upon completion of this module.
$requireSequentialProgress  : bool|null
Whether module items must be unlocked in order
$unlockAt  : DateTimeInterface|null
The date the module will unlock
$apiPropertyName  : string
The name of the property in the API

Methods

__construct()  : mixed
BaseDto constructor.
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

$position

The position of the module in the course (1-based)

public int|null $position = null

$prerequisiteModuleIds

IDs of Modules that must be completed before this one is unlocked Prerequisite modules must precede this module (i.e. have a lower position value), otherwise they will be ignored

public array<string|int, mixed>|null $prerequisiteModuleIds = null

$published

Whether the module is published and visible to students

public bool|null $published = null

$publishFinalGrade

Whether to publish the student’s final grade for the course upon completion of this module.

public bool|null $publishFinalGrade = null

$requireSequentialProgress

Whether module items must be unlocked in order

public bool|null $requireSequentialProgress = null

$unlockAt

The date the module will unlock

public DateTimeInterface|null $unlockAt = null

$apiPropertyName

The name of the property in the API

protected string $apiPropertyName = 'module'

Methods

__construct()

BaseDto constructor.

public __construct(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Tags
throws
Exception

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>
Return values
array<string|int, mixed>

        
On this page

Search results