Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Extends the IMS Tool provider library for the LTI enrolment.

Copyright: 2016 John Okely <john@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 452 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

tool_provider:: (6 methods):
  strip_base_url()
  __construct()
  onError()
  onLaunch()
  onRegister()
  map_tool_to_consumer()


Class: tool_provider  - X-Ref

Extends the IMS Tool provider library for the LTI enrolment.

strip_base_url($url)   X-Ref
Remove $this->baseUrl (wwwroot) from a given url string and return it.

param: string $url The url from which to remove the base url
return: string|null A string of the relative path to the url, or null if it couldn't be determined.

__construct($toolid)   X-Ref
Create a new instance of tool_provider to handle all the LTI tool provider interactions.

param: int $toolid The id of the tool to be provided.

onError()   X-Ref
Override onError for custom error handling.

return: void

onLaunch()   X-Ref
Override onLaunch with tool logic.

return: void

onRegister()   X-Ref
Override onRegister with registration code.


map_tool_to_consumer()   X-Ref
Performs mapping of the tool consumer to a published tool.