Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_bigbluebuttonbn\local\extension\mod_form_addons Class Reference

Public Member Functions

 __construct (\MoodleQuickForm &$mform, ?stdClass $bigbluebuttonbndata=null, string $suffix=null)
 Constructor.
 
 add_completion_rules ()
 Can be overridden to add custom completion rules if the module wishes them.
 
 add_fields ()
 Add new form field definition.
 
 completion_rule_enabled (array $data)
 Called during validation.
 
 data_postprocessing (\stdClass &$data)
 Allows modules to modify the data returned by form get_data().
 
 definition_after_data ()
 Form adjustments after setting data.
 
 validation (array $data, array $files)
 Validate form and returns an array of errors indexed by field name.
 

Protected Attributes

stdClass null $bigbluebuttonbndata = null
 $bigbluebuttonbndata BigBlueButton data if any
 
MoodleQuickForm null $mform = null
 moodle form
 
string null $suffix = null
 $suffix suffix for form elements
 

Constructor & Destructor Documentation

◆ __construct()

mod_bigbluebuttonbn\local\extension\mod_form_addons::__construct ( \MoodleQuickForm & $mform,
?stdClass $bigbluebuttonbndata = null,
string $suffix = null )

Constructor.

Parameters
MoodleQuickForm$mform
stdClass | null$bigbluebuttonbndata
string | null$suffix

Member Function Documentation

◆ add_completion_rules()

mod_bigbluebuttonbn\local\extension\mod_form_addons::add_completion_rules ( )
abstract

Can be overridden to add custom completion rules if the module wishes them.

If overriding this, you should also override completion_rule_enabled.

Just add elements to the form as needed and return the list of IDs. The system will call disabledIf and handle other behaviour for each returned ID.

Return values
string[]Array of string IDs of added items, empty array if none

◆ completion_rule_enabled()

mod_bigbluebuttonbn\local\extension\mod_form_addons::completion_rule_enabled ( array $data)

Called during validation.

Override to indicate, based on the data, whether a custom completion rule is enabled (selected).

Parameters
array$dataInput data (not yet validated)
Return values
boolTrue if one or more rules is enabled, false if none are; default returns false

◆ data_postprocessing()

mod_bigbluebuttonbn\local\extension\mod_form_addons::data_postprocessing ( \stdClass & $data)
abstract

Allows modules to modify the data returned by form get_data().

This method is also called in the bulk activity completion form.

Only available on moodleform_mod.

Parameters
stdClass$datapassed by reference

◆ definition_after_data()

mod_bigbluebuttonbn\local\extension\mod_form_addons::definition_after_data ( )

Form adjustments after setting data.

Return values
void

◆ validation()

mod_bigbluebuttonbn\local\extension\mod_form_addons::validation ( array $data,
array $files )
abstract

Validate form and returns an array of errors indexed by field name.

Parameters
array$data
array$files
Return values
array

The documentation for this class was generated from the following file: