Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
tool_monitor

Files

file  access.php
 Capabilities.
 
file  caches.php
 Event monitor cache definitions.
 
file  check_subscriptions.php
 Simple task class responsible for activating, deactivating and removing subscriptions.
 
file  clean_events.php
 Clean the tool_monitor_events table.
 
file  eventlist.php
 Event documentation.
 
file  eventobservers.php
 Observer class containing methods monitoring various events.
 
file  events.php
 This file definies observers needed by the tool.
 
file  lib.php
 This page lists public api for tool_monitor plugin.
 
file  lib.php
 Event monitor data generator.
 
file  messages.php
 Message providers list.
 
file  notification_task.php
 This file defines an adhoc task to send notifications.
 
file  provider.php
 Privacy class for requesting user data.
 
file  renderable.php
 Renderable class for manage rules page.
 
file  renderer.php
 Renderer class for manage rules page.
 
file  renderer.php
 Renderer class for manage subscriptions page.
 
file  rule.php
 Class represents a single rule.
 
file  rule_created.php
 The tool_monitor rule created event.
 
file  rule_deleted.php
 The tool_monitor rule deleted event.
 
file  rule_form.php
 The mform for creating and editing a rule.
 
file  rule_manager.php
 Rule manager class.
 
file  rule_updated.php
 The tool_monitor rule updated event.
 
file  rules.php
 Renderable class to display a set of rules in the manage subscriptions page.
 
file  settings.php
 Links and settings.
 
file  subs.php
 Renderable class to display a set of subscriptions in the manage subscriptions page.
 
file  subscription.php
 Class represents a single subscription.
 
file  subscription_created.php
 The tool_monitor subscription created event.
 
file  subscription_criteria_met.php
 The tool_monitor subscription criteria met event.
 
file  subscription_deleted.php
 The tool_monitor subscription deleted event.
 
file  subscription_manager.php
 Class to manage subscriptions.
 
file  tasks.php
 This file defines tasks performed by the tool.
 
file  upgrade.php
 Upgrade scirpt for tool_monitor.
 
file  version.php
 Version info.
 

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_criteria_met
 
class  tool_monitor\event\subscription_deleted
 The tool_monitor subscription deleted event class. More...
 
class  tool_monitor\eventlist
 Class for returning event information. More...
 
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
 

Functions

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

Variables

 $capabilities
 
 $definitions
 
 $messageproviders
 
 $observers
 
 $plugin = 2020060900
 
 $tasks
 
 $temp
 
$plugin component = 'tool_monitor'
 
$plugin version = 2020061500
 

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(
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 10
)
)
const MODE_APPLICATION
Application caches.
Definition: store.php:138

◆ $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:1193
Class for creating and manipulating urls.
Definition: weblib.php:255