|
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) | |
| qtype () | |
| validation ($data, $files) | |
Data Fields | |
| $qtypeobj | |
| $questiondisplay | |
| $activecategory | |
| $categorychanged = false | |
| $initialname = '' | |
| $reload = false | |
Protected Member Functions | |
| definition_inner ($mform) | |
| data_preprocessing_answers ($question) | |
| is_valid_answer ($answer, $data) | |
| valid_answer_message ($answer) | |
Calculated question type editing form definition.
Definition at line 38 of file edit_calculated_form.php.
| __construct | ( | $ | submiturl, |
| $ | question, | ||
| $ | category, | ||
| $ | contexts, | ||
| $ | formeditable = true |
||
| ) |
Reimplemented from question_edit_form.
Reimplemented in qtype_calculatedsimple_edit_form.
Definition at line 51 of file edit_calculated_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 qtype_numerical_edit_form.
Reimplemented in qtype_calculatedsimple_edit_form.
Definition at line 151 of file edit_calculated_form.php.

| data_preprocessing_answers | ( | $ | question | ) | [protected] |
Reimplemented from qtype_numerical_edit_form.
Definition at line 165 of file edit_calculated_form.php.

| definition_inner | ( | $ | mform | ) | [protected] |
Add question-type specific form fields.
| MoodleQuickForm | $mform | the form being built. |
Reimplemented from qtype_numerical_edit_form.
Reimplemented in qtype_calculatedsimple_edit_form.
Definition at line 105 of file edit_calculated_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 qtype_numerical_edit_form.
Definition at line 70 of file edit_calculated_form.php.
| is_valid_answer | ( | $ | answer, |
| $ | data | ||
| ) | [protected] |
Validate a particular answer.
| string | $answer | an answer to validate. Known to be non-blank and already trimmed. |
| array | $data | the submitted data. |
Reimplemented from qtype_numerical_edit_form.
Definition at line 244 of file edit_calculated_form.php.

| qtype | ( | ) |
Override this in the subclass to question type name.
Reimplemented from qtype_numerical_edit_form.
Reimplemented in qtype_calculatedsimple_edit_form.
Definition at line 187 of file edit_calculated_form.php.

| valid_answer_message | ( | $ | answer | ) | [protected] |
Reimplemented from qtype_numerical_edit_form.
Definition at line 248 of file edit_calculated_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 qtype_numerical_edit_form.
Reimplemented in qtype_calculatedsimple_edit_form.
Definition at line 191 of file edit_calculated_form.php.

| $activecategory |
Definition at line 46 of file edit_calculated_form.php.
| $categorychanged = false |
Definition at line 47 of file edit_calculated_form.php.
| $initialname = '' |
Definition at line 48 of file edit_calculated_form.php.
| $qtypeobj |
Reimplemented in qtype_calculatedsimple_edit_form.
Definition at line 44 of file edit_calculated_form.php.
| $questiondisplay |
Reimplemented in qtype_calculatedsimple_edit_form.
Definition at line 45 of file edit_calculated_form.php.
| $reload = false |
Reimplemented in qtype_calculatedsimple_edit_form.
Definition at line 49 of file edit_calculated_form.php.