Search moodle.org's
Developer Documentation

See Release Notes

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

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

Helper class.

Author: Dmitrii Metelkin <dmitriim@catalyst-au.net>
Copyright: 2020 Catalyst IT
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 146 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: helper  - X-Ref

Helper class.

format_icon_link($url, $icon, $alt, $iconcomponent = 'moodle', $options = [])   X-Ref
Get a filler icon for display in the actions column of a table.

param: string $url The URL for the icon.
param: string $icon The icon identifier.
param: string $alt The alt text for the icon.
param: string $iconcomponent The icon component.
param: array $options Display options.
return: string

is_valid_seb_config(string $sebconfig)   X-Ref
Validate seb config string.

param: string $sebconfig
return: bool

get_seb_file_headers(int $expiretime = null)   X-Ref
A helper function to get a list of seb config file headers.

param: int|null $expiretime  Unix timestamp
return: array

get_seb_config_content(string $cmid)   X-Ref
Get seb config content for a particular quiz. This method checks caps.

param: string $cmid The course module ID for a quiz with config.
return: string SEB config string.

send_seb_config_file(string $contents)   X-Ref
Serve a file to browser for download.

param: string $contents Contents of file.