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 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

License manager.

Copyright: 2019 Tom Dickman <tomdickman@catalyst-au.net>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 247 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

manager:: (5 methods):
  execute()
  edit()
  change_license_order()
  view_license_editor()
  view_license_manager()


Class: manager  - X-Ref

License manager, main controller for tool_licensemanager.

execute(string $action, $license)   X-Ref
Entry point for internal license manager.

param: string $action the api action to carry out.
param: string|object $license the license object or shortname of license to carry action out on.

edit(string $action, string $licenseshortname)   X-Ref
Edit an existing license or create a new license.

param: string $action the form action to carry out.
param: string $licenseshortname the shortname of the license to edit.
return: bool true if license editing complete, false otherwise.

change_license_order(string $direction, string $licenseshortname)   X-Ref
Change license order by moving up or down license order.

param: string $direction which direction to move, up or down.
param: string $licenseshortname the shortname of the license to move up or down order.

view_license_editor(string $action, string $licenseshortname, edit_license $form)   X-Ref
View the license editor to create or edit a license.

param: string $action
param: string $licenseshortname the shortname of the license to create/edit.
param: \tool_licensemanager\form\edit_license $form the form for submitting edit data.

view_license_manager()   X-Ref
View the license manager.