|
Moodle PHP Documentation 5.0
Moodle 5.0.1+ (Build: 20250711) (61af040cd5f)
|
Namespaces | |
| namespace | mod_qbank\event |
| | |
| namespace | mod_qbank\privacy |
| | |
| namespace | mod_qbank\task |
| | |
Functions | |
| qbank_add_instance (stdClass $moduleinstance, ?mod_qbank_mod_form $mform) | |
| Saves a new instance of the mod_qbank into the database. | |
| qbank_course_backend_generator_create_activity (tool_generator_course_backend $backend, testing_data_generator $generator, int $courseid, int $number,) | |
| Callback for tool_generator so we can add qbanks to generated courses. | |
| qbank_delete_instance (int $id) | |
| Removes an instance of the mod_qbank from the database. | |
| qbank_supports (string $feature) | |
| Return if the plugin supports $feature. | |
| qbank_update_instance (stdClass $moduleinstance, ?mod_qbank_mod_form $mform) | |
| Updates an instance of the mod_qbank in the database. | |
| xmldb_qbank_install () | |
| xmldb_qbank_upgrade ($oldversion) | |
| Execute mod_qbank upgrade from the given old version. | |
Variables | |
| $capabilities | |
| global | $CFG |
| global | $CFG |
| global | $CFG |
| $plugin = 2025040800 | |
| $plugin | component = 'mod_qbank' |
| $plugin | version = 2025041400 |
| qbank_add_instance | ( | stdClass | $moduleinstance, |
| ?mod_qbank_mod_form | $mform ) |
Saves a new instance of the mod_qbank into the database.
Given an object containing all the necessary data, this function will create a new instance and return the id number of the instance.
| stdClass | $moduleinstance | An object from the form. |
| mod_qbank_mod_form | null | $mform | The form. Not used in this function. |
| int | The id of the newly inserted record. |
| qbank_course_backend_generator_create_activity | ( | tool_generator_course_backend | $backend, |
| testing_data_generator | $generator, | ||
| int | $courseid, | ||
| int | $number ) |
Callback for tool_generator so we can add qbanks to generated courses.
| tool_generator_course_backend | $backend | |
| testing_data_generator | $generator | |
| int | $courseid | |
| int | $number |
| void |
| coding_exception |
| qbank_delete_instance | ( | int | $id | ) |
Removes an instance of the mod_qbank from the database.
We don't need to do anything for questions, question_categories, or user records here as the module deletion API cleans that up for us.
| int | $id | id of the module instance. |
| bool | True if successful, false on failure. |
| qbank_supports | ( | string | $feature | ) |
Return if the plugin supports $feature.
| string | $feature | Constant representing the feature. |
| bool|string|null | True if module supports feature, false if not, null if it doesn't know or string for the module purpose. |
| qbank_update_instance | ( | stdClass | $moduleinstance, |
| ?mod_qbank_mod_form | $mform ) |
Updates an instance of the mod_qbank in the database.
Given an object containing all the necessary data, this function will update an existing instance with new data.
| stdClass | $moduleinstance | An object from the form in mod_form.php. |
| mod_qbank_mod_form | null | $mform | The form. Not used in this function. |
| bool | True if successful, false otherwise. |
| xmldb_qbank_upgrade | ( | $oldversion | ) |
Execute mod_qbank upgrade from the given old version.
| int | $oldversion |
| bool |
| $capabilities |