See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]
Question type class for the embedded element in question text question types.
Copyright: | 2011 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 358 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 2 times |
Includes or requires: | 0 files |
qtype_gapselect_base:: (15 methods):
save_question_options()
get_question_options()
delete_question()
initialise_question_instance()
make_hint()
get_random_guess_score()
get_array_of_choices()
get_array_of_groups()
get_correct_answers()
get_array_of_placeholders()
get_group_of_players()
save_defaults_for_new_questions()
get_possible_responses()
move_files()
delete_files()
Class: qtype_gapselect_base - X-Ref
The embedded element in question text question type class.save_question_options($question) X-Ref |
Choices are stored in the question_answers table, and any options need to be put into the feedback field somehow. This method is responsible for converting all the options to a single string for this purpose. It is used by {@link save_question_options()}. param: array $choice the form data relating to this choice. return: string ready to store in the database. |
get_question_options($question) X-Ref |
No description |
delete_question($questionid, $contextid) X-Ref |
No description |
initialise_question_instance(question_definition $question, $questiondata) X-Ref |
Used by {@link initialise_question_instance()} to set up the choice-specific data. param: object $choicedata as loaded from the question_answers table. return: object an appropriate object for representing the choice. |
make_hint($hint) X-Ref |
No description |
get_random_guess_score($questiondata) X-Ref |
No description |
get_array_of_choices($question) X-Ref |
This method gets the choices (answers) in a 2 dimentional array. param: object $question return: array of groups |
get_array_of_groups($question, $state) X-Ref |
This method gets the choices (answers) and sort them by groups in a 2 dimentional array. param: object $question param: object $state Question state object return: array of groups |
get_correct_answers($question) X-Ref |
This method gets the correct answers in a 2 dimentional array. param: object $question return: array of groups |
get_array_of_placeholders($question) X-Ref |
Return the list of groups used in a question. param: stdClass $question the question data. return: array the groups used, or false if an error occurs. |
get_group_of_players($question, $state, $subquestions, $group) X-Ref |
No description |
save_defaults_for_new_questions(stdClass $fromform) X-Ref |
No description |
get_possible_responses($questiondata) X-Ref |
No description |
move_files($questionid, $oldcontextid, $newcontextid) X-Ref |
No description |
delete_files($questionid, $contextid) X-Ref |
No description |