Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]
This file contains the code required to upgrade all the attempt data from old versions of Moodle into the tables used by the new question engine.
Copyright: | 2010 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 484 lines (18 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
question_engine_attempt_upgrader:: (14 methods):
save_usage()
set_quba_preferred_behaviour()
set_quiz_attempt_layout()
delete_quiz_attempt()
insert_record()
load_question()
load_dataset()
get_next_question_session()
get_question_states()
get_converter_class_name()
supply_missing_question_attempt()
convert_question_attempt()
decode_random_attempt()
prepare_to_restore()
question_engine_upgrade_question_loader:: (4 methods):
__construct()
load_question()
get_question()
load_dataset()
question_qtype_attempt_updater:: (6 methods):
__construct()
discard()
to_text()
question_summary()
compare_answers()
is_blank_answer()
question_deleted_question_attempt_updater:: (7 methods):
right_answer()
response_summary()
was_answered()
set_first_step_data_elements()
supply_missing_first_step_data()
set_data_elements_for_step()
quiz_attempts_upgraded()
Class: question_engine_attempt_upgrader - X-Ref
This class manages upgrading all the question attempts from the old databasesave_usage($preferredbehaviour, $attempt, $qas, $quizlayout) X-Ref |
No description |
set_quba_preferred_behaviour($qubaid, $preferredbehaviour) X-Ref |
No description |
set_quiz_attempt_layout($qubaid, $layout) X-Ref |
No description |
delete_quiz_attempt($qubaid) X-Ref |
No description |
insert_record($table, $record, $saveid = true) X-Ref |
No description |
load_question($questionid, $quizid = null) X-Ref |
No description |
load_dataset($questionid, $selecteditem) X-Ref |
No description |
get_next_question_session($attempt, moodle_recordset $questionsessionsrs) X-Ref |
No description |
get_question_states($attempt, $question, moodle_recordset $questionsstatesrs) X-Ref |
No description |
get_converter_class_name($question, $quiz, $qsessionid) X-Ref |
No description |
supply_missing_question_attempt($quiz, $attempt, $question) X-Ref |
No description |
convert_question_attempt($quiz, $attempt, $question, $qsession, $qstates) X-Ref |
No description |
decode_random_attempt($qstates, $maxmark) X-Ref |
No description |
prepare_to_restore() X-Ref |
No description |
Class: question_engine_upgrade_question_loader - X-Ref
This class deals with loading (and caching) question definitions during the__construct($logger) X-Ref |
No description |
load_question($questionid, $quizid) X-Ref |
No description |
get_question($questionid, $quizid) X-Ref |
No description |
load_dataset($questionid, $selecteditem) X-Ref |
No description |
Class: question_qtype_attempt_updater - X-Ref
Base class for the classes that convert the question-type specific bits of__construct($updater, $question, $logger, $qeupdater) X-Ref |
No description |
discard() X-Ref |
No description |
to_text($html) X-Ref |
No description |
question_summary() X-Ref |
No description |
compare_answers($answer1, $answer2) X-Ref |
No description |
is_blank_answer($state) X-Ref |
No description |
Class: question_deleted_question_attempt_updater - X-Ref
right_answer() X-Ref |
No description |
response_summary($state) X-Ref |
No description |
was_answered($state) X-Ref |
No description |
set_first_step_data_elements($state, &$data) X-Ref |
No description |
supply_missing_first_step_data(&$data) X-Ref |
No description |
set_data_elements_for_step($state, &$data) X-Ref |
No description |
quiz_attempts_upgraded(environment_results $result) X-Ref |
This check verifies that all quiz attempts were upgraded since following the question engine upgrade in Moodle 2.1. Note: This custom check (and its environment.xml declaration) will be safely removed once we raise min required Moodle version to be 2.7 or newer. param: environment_results object to update, if relevant. return: environment_results updated results object, or null if this test is not relevant. |