Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
enrol_lti\tool_provider Class Reference

Extends the IMS Tool provider library for the LTI enrolment. More...

Inheritance diagram for enrol_lti\tool_provider:

Public Member Functions

 __construct ($toolid)
 Create a new instance of tool_provider to handle all the LTI tool provider interactions.
 
 map_tool_to_consumer ()
 Performs mapping of the tool consumer to a published tool.
 

Protected Member Functions

 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.
 

Protected Attributes

stdClass $tool
 $tool The object representing the enrol instance providing this LTI tool
 

Detailed Description

Extends the IMS Tool provider library for the LTI enrolment.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

enrol_lti\tool_provider::__construct ( $toolid)

Create a new instance of tool_provider to handle all the LTI tool provider interactions.

Parameters
int$toolidThe id of the tool to be provided.

Member Function Documentation

◆ map_tool_to_consumer()

enrol_lti\tool_provider::map_tool_to_consumer ( )

Performs mapping of the tool consumer to a published tool.

Exceptions
moodle_exception

◆ onError()

enrol_lti\tool_provider::onError ( )
protected

Override onError for custom error handling.

Return values
void

◆ onLaunch()

enrol_lti\tool_provider::onLaunch ( )
protected

Override onLaunch with tool logic.

Return values
void

◆ 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$urlThe url from which to remove the base url
Return values
string|nullA string of the relative path to the url, or null if it couldn't be determined.

The documentation for this class was generated from the following file: