Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_monitor

Namespaces

namespace  tool_monitor
  
 
namespace  tool_monitor\event
  
 
namespace  tool_monitor\output\managerules
  
 
namespace  tool_monitor\output\managesubs
  
 
namespace  tool_monitor\privacy
  
 
namespace  tool_monitor\task
  
 

Classes

class  tool_monitor\event\rule_created
 The tool_monitor rule created event class. More...
 
class  tool_monitor\event\rule_deleted
 The tool_monitor rule deleted event class. More...
 
class  tool_monitor\event\rule_updated
 The tool_monitor rule updated event class. More...
 
class  tool_monitor\event\subscription_created
 The tool_monitor subscription created event class. More...
 
class  tool_monitor\event\subscription_deleted
 The tool_monitor subscription deleted event class. More...
 
class  tool_monitor\eventlist
 
class  tool_monitor\eventobservers
 Observer class containing methods monitoring various events. More...
 
class  tool_monitor\notification_task
 Adhock class, used to send notifications to users. More...
 
class  tool_monitor\output\managerules\renderable
 Renderable class for manage rules page. More...
 
class  tool_monitor\output\managerules\renderer
 Renderer class for manage rules page. More...
 
class  tool_monitor\output\managesubs\renderer
 Renderer class for manage subscriptions page. More...
 
class  tool_monitor\output\managesubs\rules
 Renderable class to display a set of rules in the manage subscriptions page. More...
 
class  tool_monitor\output\managesubs\subs
 Renderable class to display a set of subscriptions in the manage subscriptions page. More...
 
class  tool_monitor\privacy\provider
 Privacy provider for tool_monitor. More...
 
class  tool_monitor\rule
 Class represents a single rule. More...
 
class  tool_monitor\rule_form
 The mform for creating and editing a rule. More...
 
class  tool_monitor\rule_manager
 Rule manager class. More...
 
class  tool_monitor\subscription
 Class represents a single subscription instance (i.e with all the subscription info). More...
 
class  tool_monitor\subscription_manager
 Class to manage subscriptions. More...
 
class  tool_monitor\task\check_subscriptions
 
class  tool_monitor\task\clean_events
 Simple task to clean the tool_monitor_events table. More...
 
class  tool_monitor_generator
 Event monitor data generator class. More...
 

Functions

 tool_monitor_can_subscribe ()
 Check if the user has the capacity to subscribe to an event monitor anywhere.
 
 tool_monitor_extend_navigation_course ($navigation, $course, $context)
 This function extends the navigation with the tool items.
 
 tool_monitor_extend_navigation_frontpage ($navigation, $course, $context)
 This function extends the navigation with the tool items.
 
 tool_monitor_extend_navigation_user_settings ($navigation, $user, $usercontext, $course, $coursecontext)
 This function extends the navigation with the tool items for user settings node.
 
 tool_monitor_get_user_courses ()
 Get a list of courses and also include 'Site' for site wide rules.
 
 xmldb_tool_monitor_upgrade ($oldversion)
 Upgrade the plugin.
 

Variables

 $capabilities
 
 $definitions
 
 $messageproviders
 
 $observers
 
 $plugin = 2023041800
 
 $tasks
 
 $temp
 
$plugin component = 'tool_monitor'
 
$plugin version = 2023042400
 

Detailed Description

Function Documentation

◆ tool_monitor_can_subscribe()

tool_monitor_can_subscribe ( )

Check if the user has the capacity to subscribe to an event monitor anywhere.

Return values
boolTrue if a capability in a course is found. False otherwise.

◆ tool_monitor_extend_navigation_course()

tool_monitor_extend_navigation_course ( $navigation,
$course,
$context )

This function extends the navigation with the tool items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the tool
context$contextThe context of the course

◆ tool_monitor_extend_navigation_frontpage()

tool_monitor_extend_navigation_frontpage ( $navigation,
$course,
$context )

This function extends the navigation with the tool items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$courseThe course to object for the tool
context$contextThe context of the course

◆ tool_monitor_extend_navigation_user_settings()

tool_monitor_extend_navigation_user_settings ( $navigation,
$user,
$usercontext,
$course,
$coursecontext )

This function extends the navigation with the tool items for user settings node.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$userThe user object
context$usercontextThe context of the user
stdClass$courseThe course to object for the tool
context$coursecontextThe context of the course

◆ tool_monitor_get_user_courses()

tool_monitor_get_user_courses ( )

Get a list of courses and also include 'Site' for site wide rules.

Return values
array|boolReturns an array of courses or false if the user has no permission to subscribe to rules.

◆ xmldb_tool_monitor_upgrade()

xmldb_tool_monitor_upgrade ( $oldversion)

Upgrade the plugin.

Parameters
int$oldversion
Return values
boolalways true

Variable Documentation

◆ $definitions

$definitions
Initial value:
= array(
'eventsubscriptions' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 10
)
)

◆ $messageproviders

$messageproviders
Initial value:
= array (
'notification' => array (
'capability' => 'tool/monitor:subscribe'
)
)

◆ $observers

$observers
Initial value:
= array(
array(
'eventname' => '\core\event\course_deleted',
'priority' => 1,
'callback' => '\tool_monitor\eventobservers::course_deleted',
),
array(
'eventname' => '*',
'callback' => '\tool_monitor\eventobservers::process_event',
),
array(
'eventname' => '\core\event\user_deleted',
'callback' => '\tool_monitor\eventobservers::user_deleted',
),
array(
'eventname' => '\core\event\course_module_deleted',
'callback' => '\tool_monitor\eventobservers::course_module_deleted',
)
)

◆ $tasks

$tasks
Initial value:
= array(
array(
'classname' => 'tool_monitor\task\clean_events',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
array(
'classname' => 'tool_monitor\task\check_subscriptions',
'blocking' => 0,
'minute' => 'R',
'hour' => 'R',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
)
)

◆ $temp

$temp
Initial value:
'toolmonitorrules',
get_string('managerules', 'tool_monitor'),
new moodle_url('/admin/tool/monitor/managerules.php', array('courseid' => 0)),
'tool/monitor:managerules'
)
Links external PHP pages into the admin tree.
Definition adminlib.php:1220
Class for creating and manipulating urls.
Definition weblib.php:261