Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Capabilities table with risks.

Copyright: 1999 onwards Martin Dougiamas (http://dougiamas.com)
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 194 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_role_capability_table_with_risks:: (10 methods):
  __construct()
  load_current_permissions()
  read_submitted_permissions()
  save_changes()
  display()
  add_header_cells()
  num_extra_columns()
  get_row_classes()
  add_row_cells()
  get_risk_icon()


Class: core_role_capability_table_with_risks  - X-Ref

This subclass is the bases for both the define roles and override roles
pages. As well as adding the risks columns, this also provides generic
facilities for showing a certain number of permissions columns, and
recording the current and submitted permissions for each capability.

__construct($context, $id, $roleid)   X-Ref
No description

load_current_permissions()   X-Ref
No description

read_submitted_permissions()   X-Ref
Update $this->permissions based on submitted data, while making a list of
changed capabilities in $this->changed.


save_changes()   X-Ref
Save the new values of any permissions that have been changed.


display()   X-Ref
No description

add_header_cells()   X-Ref
No description

num_extra_columns()   X-Ref
No description

get_row_classes($capability)   X-Ref
No description

add_row_cells($capability)   X-Ref
No description

get_risk_icon($type)   X-Ref
Print a risk icon, as a link to the Risks page on Moodle Docs.

param: string $type the type of risk, will be one of the keys from the