Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
tool_cohortroles

Namespaces

namespace  tool_cohortroles
 Class exposing the api for the cohortroles tool.
 
namespace  tool_cohortroles\form
  
 
namespace  tool_cohortroles\output
 Cohort role assignments table.
 
namespace  tool_cohortroles\privacy
 Privacy Subsystem implementation for tool_cohortroles.
 
namespace  tool_cohortroles\task
 Scheduled task for syncing cohort roles.
 

Classes

class  tool_cohortroles\api
 Class for doing things with cohort roles. More...
 
class  tool_cohortroles\cohort_role_assignment
 Class for loading/storing cohort_role_assignments from the DB. More...
 
class  tool_cohortroles\form\assign_role_cohort
 Assign role to cohort form. More...
 
class  tool_cohortroles\observers
 Plugin event observer callbacks. More...
 
class  tool_cohortroles\output\cohort_role_assignments_table
 Cohort role assignments table. More...
 
class  tool_cohortroles\output\renderer
 Renderer class for cohort roles. More...
 
class  tool_cohortroles\privacy\provider
 Privacy Subsystem for tool_cohortroles implementing metadata and plugin providers. More...
 
class  tool_cohortroles\task\cohort_role_sync
 Scheduled task for syncing cohort roles. More...
 

Functions

 xmldb_tool_cohortroles_upgrade ($oldversion)
 Function to upgrade tool_cohortroles.
 

Variables

 $capabilities
 
 $context = context_system::instance()
 
 $hasaccess = has_all_capabilities($capabilities, $context)
 
 $observers
 
 $plugin = 2023100400
 
 $tasks
 
$plugin component = 'tool_cohortroles'
 
$plugin version = 2023100900
 

Detailed Description

Function Documentation

◆ xmldb_tool_cohortroles_upgrade()

xmldb_tool_cohortroles_upgrade ( $oldversion)

Function to upgrade tool_cohortroles.

Parameters
int$oldversionthe version we are upgrading from
Return values
boolresult

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= [
'moodle/cohort:view',
'moodle/role:manage'
]

◆ $observers

$observers
Initial value:
= [
[
'eventname' => '\core\event\user_deleted',
'callback' => '\tool_cohortroles\observers::user_deleted',
],
]

◆ $tasks

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