Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Code for loading and saving question attempts to and from the database. More...
Classes | |
class | qubaid_condition |
This class represents a restriction on the set of question_usage ids to include in a larger database query. More... | |
class | qubaid_join |
This class represents a restriction on the set of question_usage ids to include in a larger database query based on JOINing to some other tables. More... | |
class | qubaid_list |
This class represents a restriction on the set of question_usage ids to include in a larger database query based on an explicit list of ids. More... | |
class | question_engine_data_mapper |
This class controls the loading and saving of question engine data to and from the database. More... | |
class | question_engine_unit_of_work |
Implementation of the unit of work pattern for the question engine. More... | |
class | question_file_loader |
This class is the mirror image of question_file_saver. More... | |
class | question_file_saver |
This class represents the promise to save some files from a particular draft file area into a particular file area. More... | |
interface | question_response_files |
The interface implemented by question_file_saver and question_file_loader. More... | |
Code for loading and saving question attempts to and from the database.
Note that many of the methods of this class should be considered private to the question engine. They should be accessed through the question_engine class. For example, you should call question_engine::save_questions_usage_by_activity() rather than question_engine_data_mapper::insert_questions_usage_by_activity(). The exception to this is some of the reporting methods, like question_engine_data_mapper::load_attempts_at_question().
A note for future reference. This code is pretty efficient but there are some potential optimisations that could be contemplated, at the cost of making the code more complex: