Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 39 and 311]

This file contains a class definition for the Tool Settings service

Author: Stephen Vickers
Copyright: 2014 Vital Source Technologies http://vitalsource.com
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 216 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: toolsettings  - X-Ref

A service implementing Tool Settings.

__construct()   X-Ref
Class constructor.


get_resources()   X-Ref
Get the resources for this service.

return: array

get_permitted_scopes()   X-Ref
Get the scope(s) permitted for the tool relevant to this service.

return: array

get_scopes()   X-Ref
Get the scope(s) defined this service.

return: array

distinct_settings(&$systemsettings, &$contextsettings, $linksettings)   X-Ref
Get the distinct settings from each level by removing any duplicates from higher levels.

param: array $systemsettings   System level settings
param: array $contextsettings  Context level settings
param: array $linksettings      Link level settings

settings_to_json($settings, $simpleformat, $type, $resource)   X-Ref
Get the JSON representation of the settings.

param: array $settings        Settings
param: boolean $simpleformat  <code>true</code> if simple JSON is to be returned
param: string $type           JSON-LD type
param: \mod_lti\local\ltiservice\resource_base $resource       Resource handling the request
return: string

get_configuration_options(&$mform)   X-Ref
Adds form elements for membership add/edit page.

param: \MoodleQuickForm $mform

get_launch_parameters($messagetype, $courseid, $user, $typeid, $modlti = null)   X-Ref
Return an array of key/values to add to the launch parameters.

param: string $messagetype 'basic-lti-launch-request' or 'ContentItemSelectionRequest'.
param: string $courseid The course id.
param: string $user The user id.
param: string $typeid The tool lti type id.
param: string $modlti The id of the lti activity.
return: array of key/value pairs to add as launch parameters.