Stud.IP
5.4
|
Public Member Functions | |
__construct ($launch_url, $consumer_key, $consumer_secret, $oauth_signature_method= 'sha1') | |
setResource ($resource_id, $resource_title, $resource_description=null) | |
setCourse ($course_id) | |
setUser ($user_id, $roles= 'Learner', $send_lis_person=false) | |
addLaunchParameter ($name, $value) | |
addLaunchParameters ($params) | |
addCustomParameter ($name, $value) | |
addCustomParameters ($params) | |
addVariable ($name, $value) | |
addVariables ($variables) | |
getVariables () | |
getLaunchURL () | |
getBasicLaunchData () | |
getLaunchSignature ($launch_params) | |
Protected Attributes | |
$launch_url | |
$consumer_key | |
$consumer_secret | |
$oauth_signature_method | |
$parameters = [] | |
$variables = [] | |
LtiLink.php - LTI 1.x link representation for Stud.IP
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Use LtiLink::getLaunchSignature() to fetch the OAuth signature to use for the launch request (or some other request).
__construct | ( | $launch_url, | |
$consumer_key, | |||
$consumer_secret, | |||
$oauth_signature_method = 'sha1' |
|||
) |
Iniialize a new LtiLink instance with the given URL and credentials.
string | $launch_url | launch URL of external LTI tool |
string | $consumer_key | consumer key of the LTI link |
string | $consumer_secret | consumer secret of the LTI link |
addCustomParameter | ( | $name, | |
$value | |||
) |
Add a custom launch parameter to this LTI launch request. All custom parameter names are prefixed with 'custom_' and variable substitution is applied.
string | $name | parameter name |
string | $value | value (may contain variables) |
addCustomParameters | ( | $params | ) |
Add a list of custom launch parameters to this LTI launch request.
array | $params | list of custom parameters |
addLaunchParameter | ( | $name, | |
$value | |||
) |
Add an additional launch parameter to this LTI launch request.
string | $name | parameter name |
string | $value | value (use NULL to unset) |
addLaunchParameters | ( | $params | ) |
Add a list of additional launch parameters to this LTI launch request.
array | $params | list of launch parameters |
addVariable | ( | $name, | |
$value | |||
) |
Add a substitution variable to this LTI launch request.
string | $name | variable name |
string | $value | value (use NULL to unset) |
addVariables | ( | $variables | ) |
Add a list of substitution variables to this LTI launch request.
array | $variables | list of substitution variables |
getBasicLaunchData | ( | ) |
Get the launch parameters for the LTI basic launch request.
getLaunchSignature | ( | $launch_params | ) |
Sign a launch request including the given launch parameters.
array | $launch_params | array of launch parameters |
getLaunchURL | ( | ) |
Get the launch URL for this LTI link.
getVariables | ( | ) |
Get the substitution variables defined for this LTI link.
setCourse | ( | $course_id | ) |
Set the Stud.IP course associated with this LTI link. The course data is used to set up the context and course parameters and variables.
string | $course_id | id of associated course |
setResource | ( | $resource_id, | |
$resource_title, | |||
$resource_description = null |
|||
) |
Set the LMS resource associated with this LTI link. This is required for an LTI launch request.
string | $resource_id | id of associated resource |
string | $resource_title | title of associated resource |
string | $resource_description | description of associated resource |
setUser | ( | $user_id, | |
$roles = 'Learner' , |
|||
$send_lis_person = false |
|||
) |
Set the Stud.IP user associated with this LTI launch. The user data is used to set up the user and LIS person parameters and variables. If send_lis_person is true, the user's name and e-mail is included.
string | $user_id | id of associated course |
string | $roles | roles of this user (defaults to 'Learner') |
bool | $send_lis_person | include additional user information |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |