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


Public Member Functions | |
| validation ($data, $files) | |
| qtype () | |
Protected Member Functions | |
| definition_inner ($mform) | |
| get_per_answer_fields ($mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption) | |
| data_preprocessing ($question) | |
Multiple choice editing form definition.
Definition at line 36 of file edit_multichoice_form.php.
| data_preprocessing | ( | $ | question | ) | [protected] |
Perform an preprocessing needed on the data passed to set_data() before it is used to initialise the form.
| object | $question | the data being passed to the form. |
Reimplemented from question_edit_form.
Definition at line 86 of file edit_multichoice_form.php.

| definition_inner | ( | $ | mform | ) | [protected] |
Add question-type specific form fields.
| object | $mform | the form being built. |
Reimplemented from question_edit_form.
Definition at line 42 of file edit_multichoice_form.php.

| get_per_answer_fields | ( | $ | mform, |
| $ | label, | ||
| $ | gradeoptions, | ||
| &$ | repeatedoptions, | ||
| &$ | answersoption | ||
| ) | [protected] |
Get the list of form elements to repeat, one for each answer.
| object | $mform | the form being built. |
| $label | the label to use for each option. | |
| $gradeoptions | the possible grades for each answer. | |
| $repeatedoptions | reference to array of repeated options to fill | |
| $answersoption | reference to return the name of $question->options field holding an array of answers |
Reimplemented from question_edit_form.
Definition at line 70 of file edit_multichoice_form.php.
| qtype | ( | ) |
Override this in the subclass to question type name.
Reimplemented from question_edit_form.
Definition at line 155 of file edit_multichoice_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 |
Perform sanity checks on fractional grades
Reimplemented from question_edit_form.
Definition at line 101 of file edit_multichoice_form.php.