Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)

Functions

 tool_brickfield_extend_navigation_course (\navigation_node $navigation, stdClass $course, context $context)
 This function extends the navigation with the report items.
 
 tool_brickfield_get_fontawesome_icon_map ()
 Get icon mapping for font-awesome.
 

Variables

 $accessibilitydisabled = !accessibility::is_accessibility_enabled()
 
 $capabilities
 
if($hassiteconfig) $moodleurl = accessibility::get_plugin_url()
 
if($hassiteconfig) $showreports = has_capability('moodle/site:config', context_system::instance())
 

Detailed Description

Function Documentation

◆ tool_brickfield_extend_navigation_course()

tool_brickfield_extend_navigation_course ( \navigation_node $navigation,
stdClass $course,
context $context )

This function extends the navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the report
context$contextThe context of the course
Exceptions
coding_exception
moodle_exception

◆ tool_brickfield_get_fontawesome_icon_map()

tool_brickfield_get_fontawesome_icon_map ( )

Get icon mapping for font-awesome.

Return values
string[]

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= [
'tool/brickfield:viewcoursetools' => [
'riskbitmask' => RISK_PERSONAL,
'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW,
],
'clonepermissionsfrom' => 'coursereport/participation:view',
],
'tool/brickfield:viewsystemtools' => [
'riskbitmask' => RISK_CONFIG,
'captype' => 'read',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => [
'manager' => CAP_ALLOW,
],
],
]
const CONTEXT_SYSTEM
System context level - only one instance in every system.
Definition accesslib.php:122
const RISK_CONFIG
Capability allows changes in system configuration - see
Definition accesslib.php:141
const CONTEXT_COURSE
Course context level - one instances for each course.
Definition accesslib.php:128
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition accesslib.php:115
const RISK_PERSONAL
Capability allows access to personal user information - see
Definition accesslib.php:145