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

Files

file  access.php
 Comments block caps.
 
file  behat_block_comments.php
 Commenting system steps definitions.
 
file  block_comments.php
 The comments block.
 
file  comment_created.php
 block_comments comment created event.
 
file  comment_deleted.php
 block_comments comment deleted event.
 
file  lib.php
 The comments block helper functions and callbacks.
 
file  provider.php
 Privacy Subsystem implementation for block_comments.
 
file  version.php
 Version details.
 

Namespaces

namespace  block_comments\event
  
 
namespace  block_comments\privacy
  
 

Classes

class  behat_block_comments
 
class  block_comments
 
class  block_comments\event\comment_created
 block_comments comment created event. More...
 
class  block_comments\event\comment_deleted
 block_comments comment deleted event. More...
 
class  block_comments\privacy\provider
 Privacy Subsystem implementation for block_comments. More...
 

Functions

 block_comments_comment_display ($comments, $args)
 
 block_comments_comment_permissions ($args)
 
 block_comments_comment_validate ($comment_param)
 

Variables

 $capabilities
 
 $plugin = 2020060900
 
$plugin component = 'block_comments'
 
$plugin version = 2020061500
 

Detailed Description

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= array(
'block/comments:myaddinstance' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'user' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/my:manageblocks'
),
'block/comments:addinstance' => array(
'riskbitmask' => RISK_SPAM | RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_BLOCK,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/site:manageblocks'
),
)
const CONTEXT_SYSTEM
System context level - only one instance in every system.
Definition: accesslib.php:122
const RISK_SPAM
Capability allows users to add content others may see - see
Definition: accesslib.php:147
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition: accesslib.php:115
const RISK_XSS
Capability allows user to add scripted content - see
Definition: accesslib.php:143
const CONTEXT_BLOCK
Block context level - one instance for each block, sticky blocks are tricky because ppl think they sh...
Definition: accesslib.php:136