|
Moodle PHP Documentation 4.4
Moodle 4.4.9+ (Build: 20250711) (4ea86454947)
|
Namespaces | |
| namespace | quizaccess_seb |
| | |
| namespace | quizaccess_seb\event |
| | |
| namespace | quizaccess_seb\external |
| | |
| namespace | quizaccess_seb\local\form |
| | |
| namespace | quizaccess_seb\local\table |
| | |
| namespace | quizaccess_seb\privacy |
| | |
Classes | |
| class | backup_quizaccess_seb_subplugin |
| Backup instructions for the seb (Safe Exam Browser) quiz access subplugin. More... | |
| class | behat_quizaccess_seb_generator |
| Behat data generator for quizaccess_seb. More... | |
| class | quizaccess_seb |
| class | quizaccess_seb\config_key |
| Class for generating and representing a Safe Exam Browser config key. More... | |
| class | quizaccess_seb\event\access_prevented |
| Event for when access to a quiz is prevented by this subplugin. More... | |
| class | quizaccess_seb\event\template_created |
| Event for when a template is created. More... | |
| class | quizaccess_seb\event\template_deleted |
| Event for when a template is deleted. More... | |
| class | quizaccess_seb\event\template_disabled |
| Event for when a template is disabled. More... | |
| class | quizaccess_seb\event\template_enabled |
| Event for when a template is enabled. More... | |
| class | quizaccess_seb\event\template_updated |
| Event for when a template is updated. More... | |
| class | quizaccess_seb\external\validate_quiz_keys |
| class | quizaccess_seb\helper |
| Helper class. More... | |
| class | quizaccess_seb\hideif_rule |
| Class to store data for "hide if" rules for the settings form. More... | |
| class | quizaccess_seb\link_generator |
| Generate the links to open/download the Safe Exam Browser with correct settings. More... | |
| class | quizaccess_seb\local\form\template |
| Form for manipulating with the template records. More... | |
| class | quizaccess_seb\local\table\template_list |
| Templates table. More... | |
| class | quizaccess_seb\privacy\provider |
| Privacy Subsystem implementation for quizaccess_seb. More... | |
| class | quizaccess_seb\property_list |
| Wrapper for CFPropertyList to handle low level iteration. More... | |
| class | quizaccess_seb\seb_access_manager |
| Manage the access to the quiz. More... | |
| class | quizaccess_seb\seb_quiz_settings |
| Entity model representing quiz settings for the seb plugin. More... | |
| class | quizaccess_seb\settings_provider |
| Helper class for providing quiz settings, to make setting up quiz form manageable. More... | |
| class | quizaccess_seb\template |
| Entity model representing template settings for the seb plugin. More... | |
| class | quizaccess_seb\template_controller |
| Class for manipulating with the template records. More... | |
| class | quizaccess_seb_generator |
| Data generator the quizaccess_seb plugin. More... | |
| class | restore_quizaccess_seb_subplugin |
| Restore instructions for the seb (Safe Exam Browser) quiz access subplugin. More... | |
Functions | |
| assign_user_capability ($capability, $contextid, $roleid=null) | |
| Assign a capability to $USER The function creates a student $USER if $USER->id is empty. | |
| attempt_quiz ($quiz, $user) | |
| Answer questions for a quiz + user. | |
| create_module_test_file (string $xml, string $cmid) | |
| Create a file in a modules filearea. | |
| create_template (string $xml=null) | |
| Create test template. | |
| create_test_draftarea_file (string $xml) | |
| Creates a file in the user draft area. | |
| create_test_quiz ($course, $requiresafeexambrowser=settings_provider::USE_SEB_NO) | |
| Create a test quiz for the specified course. | |
| get_access_manager () | |
| Get access manager for testing. | |
| get_test_settings (array $settings=[]) | |
| Get a test object containing mock test settings. | |
| make_rule () | |
| A helper method to make the rule form the currently created quiz and course. | |
| quizaccess_seb_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=[]) | |
| Serve the files. | |
| set_up_quiz_view_page () | |
| A helper method to set up quiz view page. | |
| strip_all_prefixes (\stdClass $settings) | |
| Strip the seb_ prefix from each setting key. | |
| xmldb_quizaccess_seb_install () | |
| Custom code to be run on installing the plugin. | |
| xmldb_quizaccess_seb_upgrade ($oldversion) | |
| Function to upgrade quizaccess_seb plugin. | |
Variables | |
| global | $ADMIN |
| $capabilities | |
| global | $CFG |
| global | quizaccess_seb\external::$CFG |
| $definitions | |
| $functions | |
| $plugin = 2024041600 | |
| stdClass | $quiz |
| $quiz A test quiz. | |
| $renamedclasses | |
| stdClass | $user |
| $user A test logged-in user. | |
| $plugin | component = 'quizaccess_seb' |
| $plugin | maturity = MATURITY_STABLE |
| trait | quizaccess_seb_test_helper_trait |
| A test helper trait. | |
| $plugin | version = 2024042201 |
|
protected |
Assign a capability to $USER The function creates a student $USER if $USER->id is empty.
| string | $capability | Capability name. |
| int | $contextid | Context ID. |
| int | $roleid | Role ID. |
| int | The role id - mainly returned for creation, so calling function can reuse it. |
|
protected |
Answer questions for a quiz + user.
| stdClass | $quiz | Quiz to attempt. |
| stdClass | $user | A user to attempt the quiz. |
| array |
|
protected |
Create a file in a modules filearea.
| string | $xml | XML content of the file. |
| string | $cmid | Course module id. |
| int | Item ID of file. |
| create_template | ( | string | $xml = null | ) |
Create test template.
| string | null | $xml | Template content. |
| quizaccess_seb\template | Just created template. |
|
protected |
Creates a file in the user draft area.
| string | $xml |
| int | The user draftarea id |
|
protected |
Create a test quiz for the specified course.
| stdClass | $course | |
| int | $requiresafeexambrowser | How to use SEB for this quiz? |
| array |
|
protected |
Get access manager for testing.
| quizaccess_seb\seb_access_manager |
|
protected |
Get a test object containing mock test settings.
| stdClass | Settings. |
|
protected |
A helper method to make the rule form the currently created quiz and course.
| access_rule_base|null |
| quizaccess_seb_pluginfile | ( | $course, | |
| $cm, | |||
| $context, | |||
| $filearea, | |||
| $args, | |||
| $forcedownload, | |||
| array | $options = [] ) |
Serve the files.
| stdClass | $course | the course object |
| stdClass | $cm | the course module object |
| context | $context | the context |
| string | $filearea | the name of the file area |
| array | $args | extra arguments (itemid, path) |
| bool | $forcedownload | whether or not force download |
| array | $options | additional options affecting the file serving |
| bool | false if the file not found, just send the file otherwise and do not return anything |
|
protected |
Strip the seb_ prefix from each setting key.
| stdClass | $settings | Object containing settings. |
| stdClass | The modified settings object. |
| xmldb_quizaccess_seb_upgrade | ( | $oldversion | ) |
Function to upgrade quizaccess_seb plugin.
| int | $oldversion | The version we are upgrading from. |
| bool | Result. |
| $definitions |
| $functions |
| $renamedclasses |
| trait quizaccess_seb_test_helper_trait |
A test helper trait.
It has some common helper methods.