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


Public Member Functions | |
| set_data ($question) | |
| validation ($fromform, $files) | |
| qtype () | |
Protected Member Functions | |
| definition () | |
random editing form definition.
Definition at line 36 of file edit_random_form.php.
| definition | ( | ) | [protected] |
Build the form definition.
This adds all the form files that the default question type supports. If your question type does not support all these fields, then you can override this method and remove the ones you don't want with $mform->removeElement().
Reimplemented from question_edit_form.
Definition at line 44 of file edit_random_form.php.

| qtype | ( | ) |
Override this in the subclass to question type name.
Reimplemented from question_edit_form.
Definition at line 80 of file edit_random_form.php.
| set_data | ( | $ | default_values | ) |
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).
note: $slashed param removed
| mixed | $default_values | object or array of default values |
Reimplemented from question_edit_form.
Definition at line 68 of file edit_random_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 question_edit_form.
Definition at line 74 of file edit_random_form.php.