Launch
class Launch
This captures all of the data associated with the LTI Launch.
Properties
$key | Get the User associated with the launch. | ||
$user | Get the User associated with the launch. | ||
$for_user | Get the "For User" associated with the launch. | ||
$context | Get the Context associated with the launch. | ||
$link | Get the Link associated with the launch. | ||
$result | Get the Result associated with the launch. | ||
$pdox | Return the PDOX connection used by Tsugi. | ||
$output | Return the output helper class. | ||
$request_parms | Must be an array equivalent to $_REQUEST. If this is present We do not assume access to $_POST or $_GET and we assume that we cannot use header() so the caller must | ||
$current_url | Must be a string that is the current called URL. | ||
$session_object | If present, it means all session management is above us. | ||
$redirect_url | If this is non-null when we return, the caller must redirect to a GET of the same URL. | ||
$base_string | Get the base string from the launch. | ||
$error_message | Get the error message if something went wrong with the setup (TBD) | ||
$deeplink | The deeplink url, if any |
Methods
Get a key from the session
Set a key in the session
Forget a key in the session
Flush the session
Pull a keyed variable from the LTI data in the current session with default
Pull a keyed variable from the LTI data in the current session with default
Update a keyed variable from the LTI data in the current session with default
Return the original $_POST array
Return the original JWT
Pull a keyed variable from the original LTI post data in the current session with default
Pull a claim from the body of the Launch JWT
Return whether this is an LTI13 launch or not
Return the LTI 1.3 Message Type with Reasonable Fall Backs
Pull out a custom variable from the LTIX session.
Check for a setting starting nearby
Indicate if this launch came from Sakai
Indicate if this launch came from Canvas
Indicate if this launch came from Moodle
Indicate if this launch came from Coursera
Return the document target The value for this property MUST be one of: frame, iframe, or window.
Return the return Url
Return a boolean is this is an LTI Advantage launch
set up parameters for an outbound launch from this launch
Dump out the internal data structures associated with the current launch. Best if used within a pre tag.
Details
at line 110
session_get($key, $default = null)
Get a key from the session
at line 117
session_put($key, $value)
Set a key in the session
at line 124
session_forget($key)
Forget a key in the session
at line 131
session_flush()
Flush the session
at line 138
ltiParameterArray()
Pull a keyed variable from the LTI data in the current session with default
at line 146
ltiParameter($varname, $default = false)
Pull a keyed variable from the LTI data in the current session with default
at line 156
ltiParameterUpdate($varname, $value)
Update a keyed variable from the LTI data in the current session with default
at line 166
ltiRawPostArray()
Return the original $_POST array
at line 174
ltiRawJWT()
Return the original JWT
at line 182
ltiRawParameter($varname, $default = false)
Pull a keyed variable from the original LTI post data in the current session with default
at line 192
ltiJWTClaim($claim, $default = null)
Pull a claim from the body of the Launch JWT
at line 203
isLTI13()
Return whether this is an LTI13 launch or not
at line 211
ltiMessageType()
Return the LTI 1.3 Message Type with Reasonable Fall Backs
at line 228
ltiCustomGet($varname, $default = false)
Pull out a custom variable from the LTIX session.
For LTI 1.1, it adds the "custom_" prefix automatically and looks in POST values For LTI Advantage, the data is pulled from the Java Web Token (JWT)
at line 249
settingsCascade($key, $retval = null)
Check for a setting starting nearby
This routine looks for a key based on the following low-to-high precedence:
(4) From a Key Setting (3) From a Context Setting (2) From a Link Setting (1) From a custom launch variable prefixed by "tsugi_setting"
at line 277
isSakai()
Indicate if this launch came from Sakai
if ( $LTI->isSakai() ) echo("SAKAI");
at line 296
isCanvas()
Indicate if this launch came from Canvas
if ( $LTI->isCanvas() ) echo("CANVAS");
at line 314
isMoodle()
Indicate if this launch came from Moodle
if ( $LTI->isMoodle() ) echo("MOODLE");
at line 333
isCoursera()
Indicate if this launch came from Coursera
if ( $LTI->isCoursera() ) echo("Coursera");
at line 352
documentTarget()
Return the document target The value for this property MUST be one of: frame, iframe, or window.
at line 369
returnUrl()
Return the return Url
at line 386
isLTIAdvantage()
Return a boolean is this is an LTI Advantage launch
at line 393
newLaunch($send_name = true, $send_email = true)
set up parameters for an outbound launch from this launch
at line 435
var_dump()
Dump out the internal data structures associated with the current launch. Best if used within a pre tag.