Extends the IMS Tool provider library for the LTI enrolment.
More...
|
| __construct ($toolid) |
| Create a new instance of tool_provider to handle all the LTI tool provider interactions.
|
|
| doToolProxyService () |
| Send the tool proxy to the Tool Consumer.
|
|
| findService ($format, $methods) |
| Find an offered service based on a media type and HTTP action(s)
|
|
| getConsumers () |
| Get an array of defined tool consumers.
|
|
| handleRequest () |
| Process an incoming request.
|
|
| map_tool_to_consumer () |
| Performs mapping of the tool consumer to a published tool.
|
|
| setParameterConstraint ($name, $required=true, $maxLength=null, $messageTypes=null) |
| Add a parameter constraint to be checked on launch.
|
|
|
static | parseRoles ($roles) |
| Get an array of fully qualified user roles.
|
|
static | sendForm ($url, $params, $target='') |
| Generate a web page containing an auto-submitted form of parameters.
|
|
|
boolean | $allowSharing = false |
| Whether shared resource link arrangements are permitted.
|
|
string | $baseUrl = null |
| Base URL for tool provider service.
|
|
ToolConsumer | $consumer = null |
| Tool Consumer object.
|
|
Context | $context = null |
| Context object.
|
|
DataConnector | $dataConnector = null |
| Data connector object.
|
|
string | $defaultEmail = '' |
| Default email domain.
|
|
array | $details = array() |
| Details for error message relating to last request processed.
|
|
int | $idScope = self::ID_SCOPE_ID_ONLY |
| Scope to use for user IDs.
|
|
string | $message = self::CONNECTION_ERROR_MESSAGE |
| Message for last request processed.
|
|
boolean | $ok = true |
| True if the last request was successful.
|
|
array | $optionalServices = null |
| Optional services used by Tool Provider.
|
|
Item | $product = null |
| Product details.
|
|
string | $reason = null |
| Error message for last request processed.
|
|
array | $requiredServices = null |
| Services required by Tool Provider.
|
|
array | $resourceHandlers = null |
| Resource handlers for Tool Provider.
|
|
ResourceLink | $resourceLink = null |
| Resource link object.
|
|
string | $returnUrl = null |
| Return URL provided by tool consumer.
|
|
User | $user = null |
| User object.
|
|
Item | $vendor = null |
| Vendor details.
|
|
const | CONNECTION_ERROR_MESSAGE = 'Sorry, there was an error connecting you to the application.' |
| Default connection error message.
|
|
const | ID_SCOPE_CONTEXT = 2 |
| Prefix the ID with the consumer key and context ID.
|
|
const | ID_SCOPE_GLOBAL = 1 |
| Prefix an ID with the consumer key.
|
|
const | ID_SCOPE_ID_ONLY = 0 |
| Use ID value only.
|
|
const | ID_SCOPE_RESOURCE = 3 |
| Prefix the ID with the consumer key and resource ID.
|
|
const | ID_SCOPE_SEPARATOR = ':' |
| Character used to separate each element of an ID.
|
|
const | LTI_VERSION1 = 'LTI-1p0' |
| LTI version 1 for messages.
|
|
const | LTI_VERSION2 = 'LTI-2p0' |
| LTI version 2 for messages.
|
|
|
| onContentItem () |
| Process a valid content-item request.
|
|
| onError () |
| Override onError for custom error handling.
|
|
| onLaunch () |
| Override onLaunch with tool logic.
|
|
| onRegister () |
| Override onRegister with registration code.
|
|
| strip_base_url ($url) |
| Remove $this->baseUrl (wwwroot) from a given url string and return it.
|
|
|
boolean | $debugMode = false |
| Whether debug messages explaining the cause of errors are to be returned to the tool consumer.
|
|
string | $documentTargets = null |
| URL to redirect user to on successful completion of the request.
|
|
string | $errorOutput = null |
| HTML to be displayed on an unsuccessful completion of the request and no return URL is available.
|
|
string | $mediaTypes = null |
| URL to redirect user to on successful completion of the request.
|
|
string | $output = null |
| HTML to be displayed on a successful completion of the request.
|
|
string | $redirectUrl = null |
| URL to redirect user to on successful completion of the request.
|
|
stdClass | $tool |
| $tool The object representing the enrol instance providing this LTI tool
|
|
Extends the IMS Tool provider library for the LTI enrolment.
- Copyright
- 2016 John Okely john@.nosp@m.mood.nosp@m.le.co.nosp@m.m
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
enrol_lti\tool_provider::__construct |
( |
| $toolid | ) |
|
Create a new instance of tool_provider to handle all the LTI tool provider interactions.
- Parameters
-
int | $toolid | The id of the tool to be provided. |
Reimplemented from IMSGlobal\LTI\ToolProvider\ToolProvider.
◆ doToolProxyService()
IMSGlobal\LTI\ToolProvider\ToolProvider::doToolProxyService |
( |
| ) |
|
|
inherited |
Send the tool proxy to the Tool Consumer.
- Return values
-
boolean | True if the tool proxy was accepted |
◆ findService()
IMSGlobal\LTI\ToolProvider\ToolProvider::findService |
( |
| $format, |
|
|
| $methods ) |
|
inherited |
Find an offered service based on a media type and HTTP action(s)
- Parameters
-
string | $format | Media type required |
array | $methods | Array of HTTP actions required |
- Return values
-
◆ getConsumers()
IMSGlobal\LTI\ToolProvider\ToolProvider::getConsumers |
( |
| ) |
|
|
inherited |
Get an array of defined tool consumers.
- Return values
-
array | Array of ToolConsumer objects |
◆ map_tool_to_consumer()
enrol_lti\tool_provider::map_tool_to_consumer |
( |
| ) |
|
Performs mapping of the tool consumer to a published tool.
- Exceptions
-
◆ onContentItem()
IMSGlobal\LTI\ToolProvider\ToolProvider::onContentItem |
( |
| ) |
|
|
protectedinherited |
Process a valid content-item request.
- Return values
-
◆ onError()
enrol_lti\tool_provider::onError |
( |
| ) |
|
|
protected |
◆ onLaunch()
enrol_lti\tool_provider::onLaunch |
( |
| ) |
|
|
protected |
◆ onRegister()
enrol_lti\tool_provider::onRegister |
( |
| ) |
|
|
protected |
◆ parseRoles()
static IMSGlobal\LTI\ToolProvider\ToolProvider::parseRoles |
( |
| $roles | ) |
|
|
staticinherited |
Get an array of fully qualified user roles.
- Parameters
-
mixed | $roles | Comma-separated list of roles or array of roles |
- Return values
-
◆ sendForm()
static IMSGlobal\LTI\ToolProvider\ToolProvider::sendForm |
( |
| $url, |
|
|
| $params, |
|
|
| $target = '' ) |
|
staticinherited |
Generate a web page containing an auto-submitted form of parameters.
- Parameters
-
string | $url | URL to which the form should be submitted |
array | $params | Array of form parameters |
string | $target | Name of target (optional) |
- Return values
-
◆ setParameterConstraint()
IMSGlobal\LTI\ToolProvider\ToolProvider::setParameterConstraint |
( |
| $name, |
|
|
| $required = true, |
|
|
| $maxLength = null, |
|
|
| $messageTypes = null ) |
|
inherited |
Add a parameter constraint to be checked on launch.
- Parameters
-
string | $name | Name of parameter to be checked |
boolean | $required | True if parameter is required (optional, default is true) |
int | $maxLength | Maximum permitted length of parameter value (optional, default is null) |
array | $messageTypes | Array of message types to which the constraint applies (optional, default is all) |
◆ strip_base_url()
enrol_lti\tool_provider::strip_base_url |
( |
| $url | ) |
|
|
protected |
Remove $this->baseUrl (wwwroot) from a given url string and return it.
- Parameters
-
string | $url | The url from which to remove the base url |
- Return values
-
string|null | A string of the relative path to the url, or null if it couldn't be determined. |
◆ $allowSharing
boolean IMSGlobal\LTI\ToolProvider\ToolProvider::$allowSharing = false |
|
inherited |
Whether shared resource link arrangements are permitted.
$allowSharing
◆ $baseUrl
string IMSGlobal\LTI\ToolProvider\ToolProvider::$baseUrl = null |
|
inherited |
Base URL for tool provider service.
$baseUrl
◆ $consumer
ToolConsumer IMSGlobal\LTI\ToolProvider\ToolProvider::$consumer = null |
|
inherited |
Tool Consumer object.
$consumer
◆ $context
Context IMSGlobal\LTI\ToolProvider\ToolProvider::$context = null |
|
inherited |
◆ $dataConnector
DataConnector IMSGlobal\LTI\ToolProvider\ToolProvider::$dataConnector = null |
|
inherited |
Data connector object.
$dataConnector
◆ $debugMode
boolean IMSGlobal\LTI\ToolProvider\ToolProvider::$debugMode = false |
|
protectedinherited |
Whether debug messages explaining the cause of errors are to be returned to the tool consumer.
$debugMode
◆ $defaultEmail
string IMSGlobal\LTI\ToolProvider\ToolProvider::$defaultEmail = '' |
|
inherited |
Default email domain.
$defaultEmail
◆ $details
array IMSGlobal\LTI\ToolProvider\ToolProvider::$details = array() |
|
inherited |
Details for error message relating to last request processed.
$details
◆ $documentTargets
string IMSGlobal\LTI\ToolProvider\ToolProvider::$documentTargets = null |
|
protectedinherited |
URL to redirect user to on successful completion of the request.
$documentTargets
◆ $errorOutput
string IMSGlobal\LTI\ToolProvider\ToolProvider::$errorOutput = null |
|
protectedinherited |
HTML to be displayed on an unsuccessful completion of the request and no return URL is available.
$errorOutput
◆ $idScope
int IMSGlobal\LTI\ToolProvider\ToolProvider::$idScope = self::ID_SCOPE_ID_ONLY |
|
inherited |
Scope to use for user IDs.
$idScope
◆ $mediaTypes
string IMSGlobal\LTI\ToolProvider\ToolProvider::$mediaTypes = null |
|
protectedinherited |
URL to redirect user to on successful completion of the request.
$mediaTypes
◆ $message
string IMSGlobal\LTI\ToolProvider\ToolProvider::$message = self::CONNECTION_ERROR_MESSAGE |
|
inherited |
Message for last request processed.
$message
◆ $ok
boolean IMSGlobal\LTI\ToolProvider\ToolProvider::$ok = true |
|
inherited |
True if the last request was successful.
$ok
◆ $optionalServices
array IMSGlobal\LTI\ToolProvider\ToolProvider::$optionalServices = null |
|
inherited |
Optional services used by Tool Provider.
$optionalServices
◆ $output
string IMSGlobal\LTI\ToolProvider\ToolProvider::$output = null |
|
protectedinherited |
HTML to be displayed on a successful completion of the request.
$output
◆ $product
Item IMSGlobal\LTI\ToolProvider\ToolProvider::$product = null |
|
inherited |
Product details.
$product
◆ $reason
string IMSGlobal\LTI\ToolProvider\ToolProvider::$reason = null |
|
inherited |
Error message for last request processed.
$reason
◆ $redirectUrl
string IMSGlobal\LTI\ToolProvider\ToolProvider::$redirectUrl = null |
|
protectedinherited |
URL to redirect user to on successful completion of the request.
$redirectUrl
◆ $requiredServices
array IMSGlobal\LTI\ToolProvider\ToolProvider::$requiredServices = null |
|
inherited |
Services required by Tool Provider.
$requiredServices
◆ $resourceHandlers
array IMSGlobal\LTI\ToolProvider\ToolProvider::$resourceHandlers = null |
|
inherited |
Resource handlers for Tool Provider.
$resourceHandlers
◆ $resourceLink
ResourceLink IMSGlobal\LTI\ToolProvider\ToolProvider::$resourceLink = null |
|
inherited |
Resource link object.
$resourceLink
◆ $returnUrl
string IMSGlobal\LTI\ToolProvider\ToolProvider::$returnUrl = null |
|
inherited |
Return URL provided by tool consumer.
$returnUrl
◆ $user
User IMSGlobal\LTI\ToolProvider\ToolProvider::$user = null |
|
inherited |
◆ $vendor
Item IMSGlobal\LTI\ToolProvider\ToolProvider::$vendor = null |
|
inherited |
The documentation for this class was generated from the following file:
- enrol/lti/classes/tool_provider.php