Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
qbank_comment

Namespaces

namespace  qbank_comment
  
 
namespace  qbank_comment\event
  
 
namespace  qbank_comment\output
  
 
namespace  qbank_comment\privacy
  
 

Classes

class  backup_qbank_comment_plugin
 
class  behat_qbank_comment
 Steps definitions to deal with the commenting system in question. More...
 
class  qbank_comment\comment_count_column
 
class  qbank_comment\event\comment_created
 
class  qbank_comment\event\comment_deleted
 
class  qbank_comment\event\question_deleted_observer
 
class  qbank_comment\output\renderer
 
class  qbank_comment\plugin_feature
 
class  qbank_comment\privacy\provider
 
class  restore_qbank_comment_plugin
 

Functions

 qbank_comment_comment_display ($comments, $args)
 Validate comment data before displaying comments.
 
 qbank_comment_comment_permissions ($args)
 Running additional permission check on plugins.
 
 qbank_comment_comment_validate ($commentparam)
 Validate comment parameter before perform other comments actions.
 
 qbank_comment_output_fragment_question_comment ($args)
 Question comment fragment callback.
 
 qbank_comment_preview_display ($question, $courseid)
 Comment content for callbacks.
 

Variables

 $capabilities
 
 $observers
 
 $plugin = 2024041600
 
$plugin component = 'qbank_comment'
 
$plugin maturity = MATURITY_STABLE
 
$plugin version = 2024042200
 

Detailed Description

Function Documentation

◆ qbank_comment_comment_display()

qbank_comment_comment_display ( $comments,
$args )

Validate comment data before displaying comments.

Parameters
array$comments
stdClass$args
Return values
array\$comments

◆ qbank_comment_comment_permissions()

qbank_comment_comment_permissions ( $args)

Running additional permission check on plugins.

Parameters
stdClass$args
Return values
array

◆ qbank_comment_comment_validate()

qbank_comment_comment_validate ( $commentparam)

Validate comment parameter before perform other comments actions.

Parameters
stdClass$commentparam{ context => context the context object courseid => int course id cm => stdClass course module object commentarea => string comment area itemid => int itemid }
Return values
boolean

◆ qbank_comment_output_fragment_question_comment()

qbank_comment_output_fragment_question_comment ( $args)

Question comment fragment callback.

Parameters
array$args
Return values
stringrendered output

◆ qbank_comment_preview_display()

qbank_comment_preview_display ( $question,
$courseid )

Comment content for callbacks.

Parameters
question_definition$question
int$courseid
Return values
string

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= [
'moodle/question:commentmine' => [
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
],
'clonepermissionsfrom' => 'moodle/question:editmine'
],
'moodle/question:commentall' => [
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
],
'clonepermissionsfrom' => 'moodle/question:editall'
],
]
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

◆ $observers

$observers
Initial value:
= [
[
'eventname' => '\core\event\question_deleted',
'callback' => '\qbank_comment\event\question_deleted_observer::delete_question_comments',
]
]