|
| config_form_definition (MoodleQuickForm $mform) |
| Add autocomplete field for selecting activity type.
|
|
| config_form_validation (array $data, array $files=[]) |
| Validate the data on the field configuration form for number of activities provider.
|
|
| get_default_value () |
| Default value if there is no value in the database (or there is a null)
|
|
| get_name () |
| Provider name.
|
|
| is_available () |
| Check if the provider is available for the current field.
|
|
| prepare_export_value (mixed $value, ?\context $context=null) |
| Preparation for export for number of activities provider.
|
|
| recalculate (?int $instanceid=null) |
| Recalculate the number of activities in the course.
|
|
◆ config_form_definition()
customfield_number\local\numberproviders\nofactivities::config_form_definition |
( |
MoodleQuickForm | $mform | ) |
|
Add autocomplete field for selecting activity type.
Also add checkbox to display the field when the number of activities is zero.
- Parameters
-
Reimplemented from customfield_number\provider_base.
◆ config_form_validation()
customfield_number\local\numberproviders\nofactivities::config_form_validation |
( |
array | $data, |
|
|
array | $files = [] ) |
Validate the data on the field configuration form for number of activities provider.
- Parameters
-
- Return values
-
array | associative array of error messages |
Reimplemented from customfield_number\provider_base.
◆ get_all_providers()
static customfield_number\provider_base::get_all_providers |
( |
field_controller | $field | ) |
|
|
staticfinalinherited |
List of applicable automatic providers for this field.
- Parameters
-
- Return values
-
◆ get_default_value()
customfield_number\provider_base::get_default_value |
( |
| ) |
|
|
inherited |
Default value if there is no value in the database (or there is a null)
Usually returns either null or 0
- Return values
-
◆ get_name()
customfield_number\local\numberproviders\nofactivities::get_name |
( |
| ) |
|
◆ instance()
Returns a new provider instance.
- Parameters
-
field_controller | $field | Field |
◆ is_available()
customfield_number\local\numberproviders\nofactivities::is_available |
( |
| ) |
|
◆ prepare_export_value()
customfield_number\local\numberproviders\nofactivities::prepare_export_value |
( |
mixed | $value, |
|
|
?\context | $context = null ) |
Preparation for export for number of activities provider.
- Parameters
-
mixed | $value | String or float or null if the value is not present in the database for this instance |
context | null | $context | Context |
- Return values
-
Reimplemented from customfield_number\provider_base.
◆ recalculate()
customfield_number\local\numberproviders\nofactivities::recalculate |
( |
?int | $instanceid = null | ) |
|
The documentation for this class was generated from the following file:
- customfield/field/number/classes/local/numberproviders/nofactivities.php