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: 327 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

admin_plugin_manager:: (13 methods):
  __construct()
  execute()
  check_permissions()
  plugins_view()
  print_header()
  get_sorted_plugins_list()
  format_icon_link()
  print_footer()
  plugins_hide()
  plugins_show()
  plugins_moveup()
  plugins_movedown()
  move_plugin()


Class: admin_plugin_manager  - X-Ref

Class that handles the display and configuration of the list of extension plugins.

This is directly taken from the mod_assign code. We might need to have a global API there for this.

__construct()   X-Ref
Constructor for this assignment plugin manager


execute(?string $action = null, ?string $plugin = null)   X-Ref
This is the entry point for this controller class.

param: string|null $action - The action to perform
param: string|null $plugin - Optional name of a plugin type to perform the action on
return: void

check_permissions()   X-Ref
Check this user has permission to edit the list of installed plugins

return: void

plugins_view()   X-Ref
Write the HTML for the submission plugins table.

return: void

print_header()   X-Ref
Write the page header

return: void

get_sorted_plugins_list()   X-Ref
Return a list of plugins sorted by the order defined in the admin interface

return: array The list of plugins

format_icon_link(string $action, string $plugin, string $icon, string $alt)   X-Ref
Util function for writing an action icon link

param: string $action URL parameter to include in the link
param: string $plugin URL parameter to include in the link
param: string $icon The key to the icon to use (e.g. 't/up')
param: string $alt The string description of the link used as the title and alt text
return: string The icon/link

print_footer()   X-Ref
Write the page footer

return: void

plugins_hide(string $plugin)   X-Ref
Hide this plugin.

param: string $plugin - The plugin to hide
return: string The next page to display

plugins_show(string $plugin)   X-Ref
Show this plugin.

param: string $plugin - The plugin to show
return: string The next page to display

plugins_moveup(string $plugintomove)   X-Ref
Move this plugin up

We need this function so we can call directly (without the dir parameter)
param: string $plugintomove - The plugin to move
return: string The next page to display

plugins_movedown(string $plugintomove)   X-Ref
Move this plugin down

We need this function so we can call directly (without the dir parameter)
param: string $plugintomove - The plugin to move
return: string The next page to display

move_plugin(string $plugintomove, string $dir)   X-Ref
Change the order of this plugin.

param: string $plugintomove - The plugin to move
param: string $dir - up or down
return: string The next page to display