Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
Data provider class. More...
Static Public Member Functions | |
static | delete_data_for_all_users_in_context (context $context) |
Delete all data for all users in the specified context. | |
static | delete_data_for_all_users_in_context (\context $context) |
Delete all data for all users in the specified context. | |
static | delete_data_for_user (approved_contextlist $contextlist) |
Delete all user data for the specified user, in the specified contexts. | |
static | delete_data_for_users (\core_privacy\local\request\approved_userlist $userlist) |
Delete multiple users within a single context. | |
static | delete_data_for_users (approved_userlist $userlist) |
Delete multiple users within a single context. | |
static | export_user_data (approved_contextlist $contextlist) |
Export all user data for the specified user, in the specified contexts. | |
static | get_contexts_for_userid (int $userid) |
Get the list of contexts that contain user information for the specified user. | |
static | get_metadata (collection $collection) |
Returns metadata. | |
static | get_users_in_context (\core_privacy\local\request\userlist $userlist) |
Get the list of contexts that contain user information for the specified user. | |
static | get_users_in_context (userlist $userlist) |
Get the list of users who have data within a context. | |
Static Protected Member Functions | |
static | delete_files (array $itemids, bool $ishistory, array $userids=null) |
Handles deleting files for a given list of grade items. | |
static | delete_orphan_historical_grades ($userid) |
Delete orphan historical grades. | |
static | export_user_data_outcomes_in_contexts (approved_contextlist $contextlist) |
Export the user data related to outcomes. | |
static | export_user_data_scales_in_contexts (approved_contextlist $contextlist) |
Export the user data related to scales. | |
static | extract_grade_grade_from_record (stdClass $record, $ishistory=false) |
Extract grade_grade from a record. | |
static | extract_record ($record, $prefix) |
Extract a record from another one. | |
static | get_fields_sql ($target, $alias, $prefix) |
Get fields SQL for a grade related object. | |
static | get_item_ids_from_course_ids ($courseids) |
Get all the items IDs from course IDs. | |
static | recordset_loop_and_export (\moodle_recordset $recordset, $splitkey, $initial, callable $reducer, callable $export) |
Loop and export from a recordset. | |
static | transform_grade (grade_grade $gg, context $context, bool $ishistory) |
Transform a grade. | |
static | transform_history_action ($action) |
Transform an history action. | |
Data provider class.
|
static |
Delete all data for all users in the specified context.
context | $context | The specific context to delete data for. |
|
staticinherited |
Delete all data for all users in the specified context.
context | $context | The specific context to delete data for. |
Implemented in auth_lti\privacy\provider, auth_mnet\privacy\provider, auth_oauth2\privacy\provider, block_comments\privacy\provider, block_html\privacy\provider, block_recent_activity\privacy\provider, block_recentlyaccesseditems\privacy\provider, block_rss_client\privacy\provider, block_tag_flickr\privacy\provider, cachestore_redis\privacy\provider, cachestore_session\privacy\provider, core_adminpresets\privacy\provider, core_analytics\privacy\provider, core_backup\privacy\provider, core_calendar\privacy\provider, core_cohort\privacy\provider, core_contentbank\privacy\provider, core_course\privacy\provider, core_enrol\privacy\provider, core_files\privacy\provider, core_grading\privacy\provider, core_group\privacy\provider, core_message\privacy\provider, core_notes\privacy\provider, core_payment\privacy\provider, core_portfolio\privacy\provider, core_question\privacy\provider, core_repository\privacy\provider, core_role\privacy\provider, core_rss\privacy\provider, core_tag\privacy\provider, core_user\privacy\provider, editor_atto\privacy\provider, enrol_cohort\privacy\provider, enrol_flatfile\privacy\provider, enrol_lti\privacy\provider, enrol_meta\privacy\provider, enrol_paypal\privacy\provider, fileconverter_googledrive\privacy\provider, ltiservice_basicoutcomes\privacy\provider, ltiservice_gradebookservices\privacy\provider, ltiservice_memberships\privacy\provider, message_airnotifier\privacy\provider, message_email\privacy\provider, mnetservice_enrol\privacy\provider, mod_assign\privacy\provider, mod_bigbluebuttonbn\privacy\provider, mod_choice\privacy\provider, mod_data\privacy\provider, mod_feedback\privacy\provider, mod_forum\privacy\provider, mod_glossary\privacy\provider, mod_h5pactivity\privacy\provider, mod_lti\privacy\provider, mod_quiz\privacy\provider, mod_scorm\privacy\provider, mod_workshop\privacy\provider, profilefield_checkbox\privacy\provider, profilefield_datetime\privacy\provider, profilefield_menu\privacy\provider, profilefield_social\privacy\provider, profilefield_text\privacy\provider, profilefield_textarea\privacy\provider, qbank_comment\privacy\provider, quizaccess_seb\privacy\provider, report_stats\privacy\provider, repository_dropbox\privacy\provider, repository_flickr\privacy\provider, repository_flickr_public\privacy\provider, repository_googledocs\privacy\provider, repository_merlot\privacy\provider, repository_onedrive\privacy\provider, repository_wikimedia\privacy\provider, repository_youtube\privacy\provider, search_simpledb\privacy\provider, search_solr\privacy\provider, tiny_autosave\privacy\provider, tool_cohortroles\privacy\provider, tool_mobile\privacy\provider, tool_monitor\privacy\provider, and tool_policy\privacy\provider.
|
static |
Delete all user data for the specified user, in the specified contexts.
approved_contextlist | $contextlist | The approved contexts and user information to delete information for. |
Implements core_privacy\local\request\core_user_data_provider.
|
static |
Delete multiple users within a single context.
core_privacy\local\request\approved_userlist | $userlist | The approved context and user information to delete information for. |
|
staticinherited |
Delete multiple users within a single context.
approved_userlist | $userlist | The approved context and user information to delete information for. |
Implemented in auth_lti\privacy\provider, auth_mnet\privacy\provider, auth_oauth2\privacy\provider, block_comments\privacy\provider, block_html\privacy\provider, block_recent_activity\privacy\provider, block_recentlyaccesseditems\privacy\provider, block_rss_client\privacy\provider, block_tag_flickr\privacy\provider, cachestore_redis\privacy\provider, cachestore_session\privacy\provider, core\privacy\provider, core_adminpresets\privacy\provider, core_analytics\privacy\provider, core_backup\privacy\provider, core_badges\privacy\provider, core_calendar\privacy\provider, core_cohort\privacy\provider, core_communication\privacy\provider, core_competency\privacy\provider, core_contentbank\privacy\provider, core_course\privacy\provider, core_enrol\privacy\provider, core_external\privacy\provider, core_fileconverter\privacy\provider, core_files\privacy\provider, core_group\privacy\provider, core_message\privacy\provider, core_notes\privacy\provider, core_payment\privacy\provider, core_portfolio\privacy\provider, core_question\privacy\provider, core_reportbuilder\privacy\provider, core_repository\privacy\provider, core_role\privacy\provider, core_rss\privacy\provider, core_tag\privacy\provider, core_user\privacy\provider, editor_atto\privacy\provider, enrol_cohort\privacy\provider, enrol_flatfile\privacy\provider, enrol_lti\privacy\provider, enrol_meta\privacy\provider, enrol_paypal\privacy\provider, fileconverter_googledrive\privacy\provider, ltiservice_basicoutcomes\privacy\provider, ltiservice_gradebookservices\privacy\provider, ltiservice_memberships\privacy\provider, message_airnotifier\privacy\provider, message_email\privacy\provider, mnetservice_enrol\privacy\provider, mod_assign\privacy\provider, mod_chat\privacy\provider, mod_choice\privacy\provider, mod_data\privacy\provider, mod_feedback\privacy\provider, mod_forum\privacy\provider, mod_glossary\privacy\provider, mod_h5pactivity\privacy\provider, mod_lesson\privacy\provider, mod_lti\privacy\provider, mod_quiz\privacy\provider, mod_scorm\privacy\provider, mod_survey\privacy\provider, mod_wiki\privacy\provider, mod_workshop\privacy\provider, profilefield_checkbox\privacy\provider, profilefield_datetime\privacy\provider, profilefield_menu\privacy\provider, profilefield_social\privacy\provider, profilefield_text\privacy\provider, profilefield_textarea\privacy\provider, qbank_comment\privacy\provider, quizaccess_seb\privacy\provider, report_stats\privacy\provider, repository_dropbox\privacy\provider, repository_flickr\privacy\provider, repository_flickr_public\privacy\provider, repository_googledocs\privacy\provider, repository_merlot\privacy\provider, repository_onedrive\privacy\provider, repository_wikimedia\privacy\provider, repository_youtube\privacy\provider, search_simpledb\privacy\provider, search_solr\privacy\provider, tiny_autosave\privacy\provider, tool_cohortroles\privacy\provider, tool_dataprivacy\privacy\provider, tool_messageinbound\privacy\provider, tool_mobile\privacy\provider, tool_monitor\privacy\provider, and tool_policy\privacy\provider.
|
staticprotected |
Handles deleting files for a given list of grade items.
If an array of userids if given then it handles deleting files for those users.
array | $itemids | |
bool | $ishistory | |
array | null | $userids |
coding_exception | |
dml_exception |
|
staticprotected |
Delete orphan historical grades.
int | $userid | The user ID. |
void |
|
static |
Export all user data for the specified user, in the specified contexts.
approved_contextlist | $contextlist | The approved contexts to export information for. |
Implements core_privacy\local\request\core_user_data_provider.
|
staticprotected |
Export the user data related to outcomes.
approved_contextlist | $contextlist | The approved contexts to export information for. |
void |
|
staticprotected |
Export the user data related to scales.
approved_contextlist | $contextlist | The approved contexts to export information for. |
void |
|
staticprotected |
Extract grade_grade from a record.
stdClass | $record | The record. |
bool | $ishistory | Whether we're extracting a historical grade. |
grade_grade |
|
staticprotected |
Extract a record from another one.
object | $record | The record to extract from. |
string | $prefix | The prefix used. |
object |
|
static |
Get the list of contexts that contain user information for the specified user.
int | $userid | The user to search. |
contextlist\$contextlist | The contextlist containing the list of contexts used in this plugin. |
Implements core_privacy\local\request\core_user_data_provider.
|
staticprotected |
Get fields SQL for a grade related object.
string | $target | The related object. |
string | $alias | The table alias. |
string | $prefix | A prefix. |
string |
|
staticprotected |
Get all the items IDs from course IDs.
array | $courseids | The course IDs. |
array |
|
static |
Returns metadata.
collection | $collection | The initialised collection to add items to. |
collection | A listing of user data stored through this system. |
Implements core_privacy\local\metadata\provider.
|
static |
Get the list of contexts that contain user information for the specified user.
core_privacy\local\request\userlist | $userlist | The userlist containing the list of users who have data in this context/plugin combination. |
|
staticinherited |
Get the list of users who have data within a context.
userlist | $userlist | The userlist containing the list of users who have data in this context/plugin combination. |
Implemented in auth_lti\privacy\provider, auth_mnet\privacy\provider, auth_oauth2\privacy\provider, block_comments\privacy\provider, block_html\privacy\provider, block_recent_activity\privacy\provider, block_recentlyaccesseditems\privacy\provider, block_rss_client\privacy\provider, block_tag_flickr\privacy\provider, cachestore_redis\privacy\provider, cachestore_session\privacy\provider, core\privacy\provider, core_adminpresets\privacy\provider, core_analytics\privacy\provider, core_backup\privacy\provider, core_badges\privacy\provider, core_calendar\privacy\provider, core_cohort\privacy\provider, core_communication\privacy\provider, core_competency\privacy\provider, core_contentbank\privacy\provider, core_course\privacy\provider, core_enrol\privacy\provider, core_external\privacy\provider, core_fileconverter\privacy\provider, core_files\privacy\provider, core_group\privacy\provider, core_message\privacy\provider, core_notes\privacy\provider, core_payment\privacy\provider, core_portfolio\privacy\provider, core_question\privacy\provider, core_reportbuilder\privacy\provider, core_repository\privacy\provider, core_role\privacy\provider, core_rss\privacy\provider, core_tag\privacy\provider, core_user\privacy\provider, editor_atto\privacy\provider, enrol_cohort\privacy\provider, enrol_flatfile\privacy\provider, enrol_lti\privacy\provider, enrol_meta\privacy\provider, enrol_paypal\privacy\provider, fileconverter_googledrive\privacy\provider, ltiservice_basicoutcomes\privacy\provider, ltiservice_gradebookservices\privacy\provider, ltiservice_memberships\privacy\provider, message_airnotifier\privacy\provider, message_email\privacy\provider, mnetservice_enrol\privacy\provider, mod_assign\privacy\provider, mod_chat\privacy\provider, mod_choice\privacy\provider, mod_data\privacy\provider, mod_feedback\privacy\provider, mod_forum\privacy\provider, mod_glossary\privacy\provider, mod_h5pactivity\privacy\provider, mod_lesson\privacy\provider, mod_lti\privacy\provider, mod_quiz\privacy\provider, mod_scorm\privacy\provider, mod_survey\privacy\provider, mod_wiki\privacy\provider, mod_workshop\privacy\provider, profilefield_checkbox\privacy\provider, profilefield_datetime\privacy\provider, profilefield_menu\privacy\provider, profilefield_social\privacy\provider, profilefield_text\privacy\provider, profilefield_textarea\privacy\provider, qbank_comment\privacy\provider, quizaccess_seb\privacy\provider, report_stats\privacy\provider, repository_dropbox\privacy\provider, repository_flickr\privacy\provider, repository_flickr_public\privacy\provider, repository_googledocs\privacy\provider, repository_merlot\privacy\provider, repository_onedrive\privacy\provider, repository_wikimedia\privacy\provider, repository_youtube\privacy\provider, search_simpledb\privacy\provider, search_solr\privacy\provider, tiny_autosave\privacy\provider, tool_cohortroles\privacy\provider, tool_dataprivacy\privacy\provider, tool_messageinbound\privacy\provider, tool_mobile\privacy\provider, tool_monitor\privacy\provider, and tool_policy\privacy\provider.
|
staticprotected |
Loop and export from a recordset.
moodle_recordset | $recordset | The recordset. |
string | $splitkey | The record key to determine when to export. |
mixed | $initial | The initial data to reduce from. |
callable | $reducer | The function to return the dataset, receives current dataset, and the current record. |
callable | $export | The function to export the dataset, receives the last value from $splitkey and the dataset. |
void |
|
staticprotected |
Transform a grade.
grade_grade | $gg | The grade object. |
context | $context | The context. |
bool | $ishistory | Whether we're extracting a historical grade. |
array |
|
staticprotected |
Transform an history action.
int | $action | The action. |
string |