| [ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
This class adds extra methods to form wrapper specific to be used for module add / update forms mod/{modname}/mod_form.php replaced deprecated mod/{modname}/mod.html
| File Size: | 1049 lines (46 kb) |
| Included or required: | 0 times |
| Referenced: | 11 times |
| Includes or requires: | 0 files |
| __construct($current, $section, $cm, $course) X-Ref |
| moodleform_mod($current, $section, $cm, $course) X-Ref |
| Old syntax of class constructor. Deprecated in PHP7. |
| get_current() X-Ref |
| Get the current data for the form. return: stdClass|null |
| get_instance() X-Ref |
| Get the DB record for the current instance. return: stdClass|null |
| get_section() X-Ref |
| Get the course section number (relative). return: int |
| get_course() X-Ref |
| Get the course id. return: int |
| get_coursemodule() X-Ref |
| Get the course module object. return: stdClass|null |
| get_context() X-Ref |
| Return the course context for new modules, or the module context for existing modules. return: context |
| get_features() X-Ref |
| Return the features this module supports. return: stdClass |
| init_features() X-Ref |
| No description |
| data_preprocessing(&$default_values) X-Ref |
| Only available on moodleform_mod. param: array $default_values passed by reference |
| definition_after_data() X-Ref |
| Each module which defines definition_after_data() must call this method using parent::definition_after_data(); |
| validation($data, $files) X-Ref |
| No description |
| plugin_extend_coursemodule_validation($data) X-Ref |
| Extend the validation function from any other plugin. param: stdClass $data The form data. return: array $errors The list of errors keyed by element name. |
| set_data($default_values) X-Ref |
| Load in existing data as form defaults. Usually new entry defaults are stored directly in form definition (new entry form); this function is used to load in data where values already exist and data is being edited (edit entry form). param: mixed $default_values object or array of default values |
| standard_coursemodule_elements() X-Ref |
| Adds all the standard elements to a form to edit the settings for an activity module. |
| plugin_extend_coursemodule_standard_elements() X-Ref |
| Plugins can extend the coursemodule settings form. |
| add_completion_rules() X-Ref |
| Can be overridden to add custom completion rules if the module wishes them. If overriding this, you should also override completion_rule_enabled. <p> 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: array Array of string IDs of added items, empty array if none |
| completion_rule_enabled($data) X-Ref |
| Called during validation. Override to indicate, based on the data, whether a custom completion rule is enabled (selected). param: array $data Input data (not yet validated) return: bool True if one or more rules is enabled, false if none are; |
| standard_hidden_coursemodule_elements() X-Ref |
| No description |
| standard_grading_coursemodule_elements() X-Ref |
| No description |
| add_intro_editor($required=null, $customlabel=null) X-Ref |
| Add an editor for an activity's introduction field. param: null $required Override system default for requiremodintro param: null $customlabel Override default label for editor |
| standard_intro_elements($customlabel=null) X-Ref |
| Add an editor for an activity's introduction field. param: null $customlabel Override default label for editor |
| add_action_buttons($cancel=true, $submitlabel=null, $submit2label=null) X-Ref |
| Overriding formslib's add_action_buttons() method, to add an extra submit "save changes and return" button. param: bool $cancel show cancel button param: string $submitlabel null means default, false means none, string is label text param: string $submit2label null means default, false means none, string is label text return: void |
| apply_admin_locked_flags() X-Ref |
| Get the list of admin settings for this module and apply any locked settings. This cannot happen in apply_admin_defaults because we do not the current values of the settings in that function because set_data has not been called yet. return: void |
| apply_admin_defaults($datetimeoffsets = array() X-Ref |
| Get the list of admin settings for this module and apply any defaults/advanced/locked settings. param: $datetimeoffsets array - If passed, this is an array of fieldnames => times that the return: void |
| Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |