Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

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

mod_lti data generator

Author: Mark Nielsen
Copyright: Copyright (c) 2012 Moodlerooms Inc. (http://www.moodlerooms.com)
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 180 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: mod_lti_generator  - X-Ref

LTI module data generator class

create_instance($record = null, array $options = null)   X-Ref
No description

create_tool_proxies(array $config)   X-Ref
Create a tool proxy.

param: array $config

get_type_and_config_from_data(array $data)   X-Ref
Split type creation data into 'type' and 'config' components, based on input array key prefixes.

The $data array contains both the type data and config data that will be passed to lti_add_type(). This must be split into
two params (type, config) based on the array key prefixes ({@see lti_add_type()} for how the two params are handled):
- NO prefix: denotes 'type' data.
- 'lti_' prefix: denotes 'config' data.
- 'ltiservice_' prefix: denotes 'config' data, specifically config for service plugins.

param: array $data array of type and config data containing prefixed keys.
return: array containing separated objects for type and config data. E.g. ['type' = stdClass, 'config' => stdClass]

create_tool_types(array $data)   X-Ref
Create a tool type.

param: array $data
return: int ID of created tool

create_course_tool_types(array $type)   X-Ref
Create a course tool type.

param: array $type the type info.
return: int ID of created tool.