Tsugi

LtiLessonPlacement
in package

Lesson placements for one LTI 1.3 deployment.

A message with no placement can be placed anywhere. A message placed in lessons, or in link selection, can be placed in a lesson. Assignment and rich-text placements are left out. Only the first deep link that fits is offered. A resource link or a privacy launch stores its target link URI. A deep link is launched, and the returned item's URL and custom parameters are stored instead.

Table of Contents

Methods

choices()  : array<int, array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}>
Choices the author sees after picking this deployment.
fitsLesson()  : bool
installName()  : string
The message label for a resource link or privacy placement.
installTarget()  : string
Target link URI for a resource link or privacy message in the lesson list.
returnedTarget()  : array{url: string, title: string, custom: array, items: ?array}>}
The target link URI from a deep link return, or the items to choose from.
selectLaunch()  : array<string, mixed>
Start the first lesson deep link for this deployment.
choice()  : array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}
db()  : PDOX
installChoice()  : array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}
messageName()  : string
The message label, or the tool title when the message has none.
messages()  : array<int, array{message_id: int, message_type: string, target_link_uri: ?string, label: ?string, placements: array}>
prefix()  : string
requireDeployment()  : array{tool_deployment_id: int, registration_id: int, key_id: int, deployment_id: string, title: string, lti_version: string}

Methods

choices()

Choices the author sees after picking this deployment.

public static choices(int $contextId, int $toolDeploymentId) : array<int, array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}>
Parameters
$contextId : int
$toolDeploymentId : int
Return values
array<int, array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}>

fitsLesson()

public static fitsLesson(array<int, string> $placements) : bool
Parameters
$placements : array<int, string>
Return values
bool

installName()

The message label for a resource link or privacy placement.

public static installName(int $contextId, int $toolDeploymentId, int $messageId) : string

This is the lesson title. The button text adds Install or (privacy).

Parameters
$contextId : int
$toolDeploymentId : int
$messageId : int
Return values
string

installTarget()

Target link URI for a resource link or privacy message in the lesson list.

public static installTarget(int $contextId, int $toolDeploymentId, int $messageId) : string
Parameters
$contextId : int
$toolDeploymentId : int
$messageId : int
Return values
string

returnedTarget()

The target link URI from a deep link return, or the items to choose from.

public static returnedTarget(int $contextId, int $toolDeploymentId, string $jwt[, int|null $index = null ][, string|null $publicKey = null ]) : array{url: string, title: string, custom: array, items: ?array}>}

One item is the placement. Several items come back so the author can pick.

Parameters
$contextId : int
$toolDeploymentId : int
$jwt : string
$index : int|null = null
$publicKey : string|null = null
Return values
array{url: string, title: string, custom: array, items: ?array}>}

selectLaunch()

Start the first lesson deep link for this deployment.

public static selectLaunch(int $contextId, int $toolDeploymentId, int $messageId, int $userId, string $returnUrl) : array<string, mixed>
Parameters
$contextId : int
$toolDeploymentId : int
$messageId : int
$userId : int
$returnUrl : string
Return values
array<string, mixed>

choice()

private static choice(array<string, mixed> $message, string $action, string $label, string $toolTitle, string $target, string $name) : array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}
Parameters
$message : array<string, mixed>
$action : string
$label : string
$toolTitle : string
$target : string
$name : string
Return values
array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}

installChoice()

private static installChoice(int $contextId, int $toolDeploymentId, int $messageId) : array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}
Parameters
$contextId : int
$toolDeploymentId : int
$messageId : int
Return values
array{message_id: int, action: string, label: string, name: string, detail: string, launch: string}

messageName()

The message label, or the tool title when the message has none.

private static messageName(array<string, mixed> $message, string $toolTitle) : string
Parameters
$message : array<string, mixed>
$toolTitle : string
Return values
string

messages()

private static messages(int $registrationId) : array<int, array{message_id: int, message_type: string, target_link_uri: ?string, label: ?string, placements: array}>
Parameters
$registrationId : int
Return values
array<int, array{message_id: int, message_type: string, target_link_uri: ?string, label: ?string, placements: array}>

requireDeployment()

private static requireDeployment(int $contextId, int $toolDeploymentId) : array{tool_deployment_id: int, registration_id: int, key_id: int, deployment_id: string, title: string, lti_version: string}
Parameters
$contextId : int
$toolDeploymentId : int
Return values
array{tool_deployment_id: int, registration_id: int, key_id: int, deployment_id: string, title: string, lti_version: string}

        
On this page

Search results