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


Public Member Functions | |
| __construct ($submiturl, $question, $category, $contexts, $formeditable=true) | |
| get_per_answer_fields ($mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption) | |
| data_preprocessing ($question) | |
| validation ($data, $files) | |
| qtype () | |
Data Fields | |
| $qtypeobj | |
| $questiondisplay | |
| $initialname = '' | |
| $reload = false | |
Protected Member Functions | |
| definition_inner ($mform) | |
| data_preprocessing_answers ($question) | |
Calculated multiple-choice question editing form.
Definition at line 36 of file edit_calculatedmulti_form.php.
| __construct | ( | $ | submiturl, |
| $ | question, | ||
| $ | category, | ||
| $ | contexts, | ||
| $ | formeditable = true |
||
| ) |
Reimplemented from question_edit_form.
Definition at line 47 of file edit_calculatedmulti_form.php.

| data_preprocessing | ( | $ | question | ) |
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 181 of file edit_calculatedmulti_form.php.

| data_preprocessing_answers | ( | $ | question | ) | [protected] |
Definition at line 197 of file edit_calculatedmulti_form.php.

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

| get_per_answer_fields | ( | $ | mform, |
| $ | label, | ||
| $ | gradeoptions, | ||
| &$ | repeatedoptions, | ||
| &$ | answersoption | ||
| ) |
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 66 of file edit_calculatedmulti_form.php.
| qtype | ( | ) |
Override this in the subclass to question type name.
Reimplemented from question_edit_form.
Definition at line 348 of file edit_calculatedmulti_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 221 of file edit_calculatedmulti_form.php.

| $initialname = '' |
Definition at line 44 of file edit_calculatedmulti_form.php.
| $qtypeobj |
Definition at line 42 of file edit_calculatedmulti_form.php.
| $questiondisplay |
Definition at line 43 of file edit_calculatedmulti_form.php.
| $reload = false |
Definition at line 45 of file edit_calculatedmulti_form.php.