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.

(no description)

File Size: 142 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

types_helper:: (2 methods):
  get_lti_types_by_course()
  override_type_showinactivitychooser()


Class: types_helper  - X-Ref

Helper class specifically dealing with LTI types (preconfigured tools).

get_lti_types_by_course(int $courseid, int $userid, array $coursevisible = [])   X-Ref
Returns all LTI tool types (preconfigured tools) visible in the given course and for the given user.

This list will contain both site level tools and course-level tools.

param: int $courseid the id of the course.
param: int $userid the id of the user.
param: array $coursevisible options for 'coursevisible' field, which will default to
return: \stdClass[] the array of tool type objects.

override_type_showinactivitychooser(int $tooltypeid, int $courseid, \core\context\course $context, bool $showinactivitychooser)   X-Ref
Override coursevisible for a given tool on course level.

param: int $tooltypeid Type ID
param: int $courseid Course ID
param: \core\context\course $context Course context
param: bool $showinactivitychooser Show or not show in activity chooser
return: bool True if the coursevisible was changed, false otherwise.