Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402]
Base class for editing question types like this one.
Copyright: | 2011 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 310 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
qtype_gapselect_edit_form_base:: (14 methods):
get_illegal_tag_error()
allowed_tags_message()
get_list_of_printable_allowed_tags()
definition_inner()
definition_answer_choice()
get_maximum_choice_group_number()
choice_group()
repeated_options()
data_preprocessing()
data_preprocessing_choice()
validation()
validate_slots()
qtype()
extra_slot_validation()
Class: qtype_gapselect_edit_form_base - X-Ref
Elements embedded in question text editing form definition.get_illegal_tag_error($text) X-Ref |
Vaidate some input to make sure it does not contain any tags other than $this->allowedhtmltags. param: string $text the input to validate. return: string any validation errors. |
allowed_tags_message($badtag) X-Ref |
Returns a message indicating what tags are allowed. param: string $badtag The disallowed tag that was supplied return: string Message indicating what tags are allowed |
get_list_of_printable_allowed_tags($allowedhtmltags) X-Ref |
Returns a prinatble list of allowed HTML tags. param: array $allowedhtmltags An array for tag strings that are allowed return: string A printable list of tags |
definition_inner($mform) X-Ref |
definition_inner adds all specific fields to the form. param: object $mform (the form being built). |
definition_answer_choice(&$mform) X-Ref |
Defines form elements for answer choices. param: object $mform The Moodle form object being built |
get_maximum_choice_group_number() X-Ref |
Return how many different groups of choices there should be. return: int the maximum group number. |
choice_group($mform) X-Ref |
Creates an array with elements for a choice group. param: object $mform The Moodle form we are working with param: int $maxgroup The number of max group generate element select. return: array Array for form elements |
repeated_options() X-Ref |
Returns an array for form repeat options. return: array Array of repeate options |
data_preprocessing($question) X-Ref |
No description |
data_preprocessing_choice($question, $answer, $key) X-Ref |
No description |
validation($data, $files) X-Ref |
No description |
validate_slots($questiontext, $choices) X-Ref |
Finds errors in question slots. param: string $questiontext The question text param: array $choices Question choices return: string|bool Error message or false if no errors |
qtype() X-Ref |
No description |
extra_slot_validation(array $slots, array $choices) X-Ref |
Finds more errors in question slots. param: array $slots The question text param: array $choices Question choices return: string|null Error message or false if no errors |