PlusShell
in package
Course-navigation launch for a Plus course.
The Plus course is the context Canvas already created. This attaches an empty Lessons v2 manifest to that row. It does not insert another context.
The launch uses a cookie session. If the POST is inside an iframe, the session waits until a button re-posts the launch into a new window.
Table of Contents
Constants
- REPOST_FIELD : mixed = 'plus_repost'
- TARGET_LINK_CLAIM : mixed = 'https://purl.imsglobal.org/spec/lti/claim/targ...
Methods
- ianaZone() : string|null
- IANA zone name, or null when the value is empty or not a known zone.
- isSessionLaunch() : mixed
- True when this POST is the launch that will open the cookie session.
- launchTargetsPlus() : mixed
- True when the launch target path is this site's /plus path.
- mayRefreshCourse() : mixed
- A Plus course's service URLs stay put unless this request is /plus.
- mayReplaceTitle() : mixed
- Canvas title replaces a Plus course title only while the local title is blank.
- needsBreakout() : mixed
- True when this POST is a launch that has not yet left its iframe.
- openFromSession() : array{redirect?: string, error?: string}
- Open the course for the current launch, creating it the first time.
- renderBreakout() : mixed
- Re-post the launch. A top-level window submits immediately. An iframe shows a button that opens a new window, where the cookie can be set.
- replaceCookieSession() : mixed
- Drop the previous cookie session before this launch is stored.
- requestIsPlus() : mixed
- True when this HTTP request is the Plus launch path.
- shortTitle() : string|null
- Canvas course label, trimmed to lti_context.short_title.
- absorbLaunchLink() : mixed
- Keep the context's resource link current. A missing id leaves the stored link.
- blankText() : mixed
- contextLabel() : string|null
- courseUrl() : mixed
- fillShortTitle() : mixed
- jwtBody() : object|null
- jwtString() : string|null
- keyTimezone() : mixed
- Tenant zone from the launch session, or a read that does not lock the key.
- opened() : array{redirect: string}
- Remember the course and ask for a roster refresh after the response is sent.
- provision() : array{redirect?: string, error?: string}
- remember() : mixed
- requestPath() : string|null
- starterNavigation() : array<string, mixed>
- Default course nav for a new Plus shell, without the courses widget.
- tenantAllowsPlus() : mixed
Constants
REPOST_FIELD
public
mixed
REPOST_FIELD
= 'plus_repost'
TARGET_LINK_CLAIM
public
mixed
TARGET_LINK_CLAIM
= 'https://purl.imsglobal.org/spec/lti/claim/target_link_uri'
Methods
ianaZone()
IANA zone name, or null when the value is empty or not a known zone.
public
static ianaZone(mixed $value) : string|null
Parameters
- $value : mixed
Return values
string|nullisSessionLaunch()
True when this POST is the launch that will open the cookie session.
public
static isSessionLaunch() : mixed
The iframe breakout returns before this. The repost in the new window is the login.
launchTargetsPlus()
True when the launch target path is this site's /plus path.
public
static launchTargetsPlus(mixed $target, mixed $plusUrl) : mixed
Parameters
- $target : mixed
- $plusUrl : mixed
mayRefreshCourse()
A Plus course's service URLs stay put unless this request is /plus.
public
static mayRefreshCourse(mixed $plusCourse) : mixed
Other launches keep today's overwrite. The resource link id is not the check.
Parameters
- $plusCourse : mixed
mayReplaceTitle()
Canvas title replaces a Plus course title only while the local title is blank.
public
static mayReplaceTitle(mixed $plusCourse, mixed $currentTitle) : mixed
Parameters
- $plusCourse : mixed
- $currentTitle : mixed
needsBreakout()
True when this POST is a launch that has not yet left its iframe.
public
static needsBreakout() : mixed
openFromSession()
Open the course for the current launch, creating it the first time.
public
static openFromSession() : array{redirect?: string, error?: string}
Return values
array{redirect?: string, error?: string}renderBreakout()
Re-post the launch. A top-level window submits immediately. An iframe shows a button that opens a new window, where the cookie can be set.
public
static renderBreakout() : mixed
replaceCookieSession()
Drop the previous cookie session before this launch is stored.
public
static replaceCookieSession() : mixed
A Plus launch is a new login. Cached membership and the previous user stay in $_SESSION unless this runs. Another tab that shared the cookie loses that session.
requestIsPlus()
True when this HTTP request is the Plus launch path.
public
static requestIsPlus() : mixed
shortTitle()
Canvas course label, trimmed to lti_context.short_title.
public
static shortTitle(mixed $label) : string|null
Parameters
- $label : mixed
Return values
string|nullabsorbLaunchLink()
Keep the context's resource link current. A missing id leaves the stored link.
private
static absorbLaunchLink(mixed $PDOX, string $p, int $contextId, int $linkId, array<string, mixed> &$row) : mixed
Nothing reads this for access, grades, or line items.
Parameters
- $PDOX : mixed
- $p : string
- $contextId : int
- $linkId : int
- $row : array<string, mixed>
blankText()
private
static blankText(mixed $value) : mixed
Parameters
- $value : mixed
contextLabel()
private
static contextLabel() : string|null
Return values
string|nullcourseUrl()
private
static courseUrl(mixed $contextId) : mixed
Parameters
- $contextId : mixed
fillShortTitle()
private
static fillShortTitle(mixed $PDOX, mixed $p, mixed $contextId, array<string, mixed> &$row, string|null $short) : mixed
Parameters
- $PDOX : mixed
- $p : mixed
- $contextId : mixed
- $row : array<string, mixed>
- $short : string|null
jwtBody()
private
static jwtBody() : object|null
Return values
object|nulljwtString()
private
static jwtString(mixed $claim) : string|null
Parameters
- $claim : mixed
Return values
string|nullkeyTimezone()
Tenant zone from the launch session, or a read that does not lock the key.
private
static keyTimezone(mixed $PDOX, string $p, int $keyId) : mixed
Parameters
- $PDOX : mixed
- $p : string
- $keyId : int
opened()
Remember the course and ask for a roster refresh after the response is sent.
private
static opened(int $contextId, array<string, mixed> $row, int $userId) : array{redirect: string}
Parameters
- $contextId : int
- $row : array<string, mixed>
- $userId : int
Return values
array{redirect: string}provision()
private
static provision(mixed $contextId, mixed $linkId, mixed $userId, string $deployment, string|null $label) : array{redirect?: string, error?: string}
Parameters
- $contextId : mixed
- $linkId : mixed
- $userId : mixed
- $deployment : string
- $label : string|null
Return values
array{redirect?: string, error?: string}remember()
private
static remember(array<string, mixed> $row) : mixed
Parameters
- $row : array<string, mixed>
requestPath()
private
static requestPath(mixed $url) : string|null
Parameters
- $url : mixed
Return values
string|nullstarterNavigation()
Default course nav for a new Plus shell, without the courses widget.
private
static starterNavigation(string|null $short) : array<string, mixed>
Parameters
- $short : string|null
Return values
array<string, mixed>tenantAllowsPlus()
private
static tenantAllowsPlus(int $keyId) : mixed
Parameters
- $keyId : int