|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| definition () | |
| data_preprocessing (&$default_values) | |
| get_data () | |
| validation ($data, $files) | |
| add_completion_rules () | |
| completion_rule_enabled ($data) | |
Definition at line 32 of file mod_form.php.
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.
Reimplemented from moodleform_mod.
Definition at line 205 of file mod_form.php.
| completion_rule_enabled | ( | $ | data | ) |
Definition at line 215 of file mod_form.php.
| data_preprocessing | ( | &$ | default_values | ) |
Only available on moodleform_mod.
| array | $default_values | passed by reference |
Reimplemented from moodleform_mod.
Definition at line 159 of file mod_form.php.
| definition | ( | ) |
Abstract method - always override!
Reimplemented from moodleform.
Definition at line 34 of file mod_form.php.

| get_data | ( | ) |
Return submitted data if properly submitted or returns NULL if validation fails or if there is no submitted data.
note: $slashed param removed
Reimplemented from moodleform.
Definition at line 180 of file mod_form.php.
| validation | ( | $ | data, |
| $ | files | ||
| ) |
Dummy stub method - override if you needed to perform some extra validation. If there are errors return array of errors ("fieldname"=>"error message"), otherwise true if ok.
Server side rules do not work for uploaded files, implement serverside rules here if needed.
| array | $data | array of ("fieldname"=>value) of submitted data |
| array | $files | array of uploaded files "element_name"=>tmp_file_path |
Reimplemented from moodleform_mod.
Definition at line 200 of file mod_form.php.