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

Namespaces

namespace  qbank_customfields
  
 
namespace  qbank_customfields\customfield
  
 
namespace  qbank_customfields\output
  
 
namespace  qbank_customfields\privacy
  
 

Classes

class  backup_qbank_customfields_plugin
 
class  qbank_customfields\custom_field_column
 
class  qbank_customfields\customfield\question_handler
 
class  qbank_customfields\output\renderer
 
class  qbank_customfields\plugin_feature
 
class  qbank_customfields\privacy\provider
 
class  restore_qbank_customfields_plugin
 

Functions

 qbank_customfields_preview_display (question_definition $question, int $courseid)
 Comment content for callbacks.
 

Variables

 $capabilities
 
 $plugin = 2023041800
 
$plugin component = 'qbank_customfields'
 
$plugin maturity = MATURITY_STABLE
 
$plugin version = 2023042400
 

Detailed Description

Function Documentation

◆ qbank_customfields_preview_display()

qbank_customfields_preview_display ( question_definition $question,
int $courseid )

Comment content for callbacks.

Parameters
question_definition$question
int$courseid
Return values
string

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= [
'qbank/customfields:changelockedcustomfields' => [
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'manager' => CAP_ALLOW
],
],
'qbank/customfields:configurecustomfields' => [
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'clonepermissionsfrom' => 'moodle/site:config'
],
'qbank/customfields:viewhiddencustomfields' => [
'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
],
],
]
const CONTEXT_SYSTEM
System context level - only one instance in every system.
Definition accesslib.php:122
const CONTEXT_COURSE
Course context level - one instances for each course.
Definition accesslib.php:128
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