See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 39 and 401]
Defines the editing form for the numerical question type.
Copyright: | 2007 Jamie Pratt me@jamiep.org |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 399 lines (16 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
qtype_numerical_edit_form:: (16 methods):
definition_inner()
get_per_answer_fields()
get_more_choices_string()
add_unit_options()
add_unit_fields()
unit_group()
data_preprocessing()
data_preprocessing_answers()
data_preprocessing_units()
data_preprocessing_unit_options()
validation()
validate_answers()
is_valid_answer()
valid_answer_message()
validate_numerical_options()
qtype()
Class: qtype_numerical_edit_form - X-Ref
numerical editing form definition.definition_inner($mform) X-Ref |
No description |
get_per_answer_fields($mform, $label, $gradeoptions,&$repeatedoptions, &$answersoption) X-Ref |
No description |
get_more_choices_string() X-Ref |
No description |
add_unit_options($mform) X-Ref |
Add the unit handling options to the form. param: object $mform the form being built. |
add_unit_fields($mform) X-Ref |
Add the input areas for each unit. param: object $mform the form being built. |
unit_group($mform) X-Ref |
Get the form fields needed to edit one unit. param: MoodleQuickForm $mform the form being built. return: array of form fields. |
data_preprocessing($question) X-Ref |
No description |
data_preprocessing_answers($question, $withanswerfiles = false) X-Ref |
No description |
data_preprocessing_units($question) X-Ref |
Perform the necessary preprocessing for the fields added by {@link add_unit_fields()}. param: object $question the data being passed to the form. return: object $question the modified data. |
data_preprocessing_unit_options($question) X-Ref |
Perform the necessary preprocessing for the fields added by {@link add_unit_options()}. param: object $question the data being passed to the form. return: object $question the modified data. |
validation($data, $files) X-Ref |
No description |
validate_answers($data, $errors) X-Ref |
Validate the answers. param: array $data the submitted data. param: array $errors the errors array to add to. return: array the updated errors array. |
is_valid_answer($answer, $data) X-Ref |
Validate a particular answer. param: string $answer an answer to validate. Known to be non-blank and already trimmed. param: array $data the submitted data. return: bool whether this is a valid answer. |
valid_answer_message($answer) X-Ref |
return: string erre describing what an answer should be. |
validate_numerical_options($data, $errors) X-Ref |
Validate the answers. param: array $data the submitted data. param: array $errors the errors array to add to. return: array the updated errors array. |
qtype() X-Ref |
No description |