Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_competency\privacy\provider Class Reference
Inheritance diagram for core_competency\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\core_userlist_provider core_privacy\local\request\subsystem\provider core_privacy\local\request\userlist_provider core_privacy\local\request\core_user_data_provider core_privacy\local\request\core_data_provider core_privacy\local\request\data_provider

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 (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 (userlist $userlist)
 Get the list of users who have data within a context.
 

Static Protected Member Functions

static delete_user_competencies ($userid)
 Delete user competency data.
 
static delete_user_competencies_in_course ($courseid, $userids=[])
 Delete the record of competencies for user(s) in a course.
 
static delete_user_evidence_of_prior_learning ($userid)
 Delete evidence of prior learning.
 
static delete_user_plans ($userid)
 User plans.
 
static export_user_data_competencies (context_user $context)
 Export a user's competencies.
 
static export_user_data_competencies_related_to_me ($userid, context_user $context)
 Export a user's data related to competencies.
 
static export_user_data_frameworks_in_context ($userid, context $context)
 Export the user data related to frameworks in context.
 
static export_user_data_in_category_contexts ($userid, array $contexts)
 Export the user data in category contexts.
 
static export_user_data_in_course_contexts ($userid, array $contexts)
 Export the user data in course contexts.
 
static export_user_data_in_course_contexts_associations ($userid, $courseids, $path)
 Export user data in course contexts related to linked competencies.
 
static export_user_data_in_course_contexts_rated_by_me ($userid, $courseids, $path, performance_helper $helper)
 Export the ratings given in a course.
 
static export_user_data_in_course_contexts_settings ($userid, $courseids, $path)
 Export user data in course contexts related to course settings.
 
static export_user_data_in_module_contexts ($userid, array $contexts)
 Export the user data in module contexts.
 
static export_user_data_in_system_context ($userid)
 Export the user data in systen context.
 
static export_user_data_in_user_contexts ($userid, array $contexts)
 Export the user data in user context.
 
static export_user_data_learning_plans (context_user $context)
 Export a user's learning plans.
 
static export_user_data_learning_plans_related_to_me ($userid, context_user $context)
 Export a user's data related to learning plans.
 
static export_user_data_templates_in_context ($userid, context $context)
 Export the user data related to templates in contexts.
 
static export_user_data_user_evidence (context_user $context)
 Export the evidence of prior learning of a user.
 
static export_user_data_user_evidence_related_to_me ($userid, context_user $context)
 Export a user's data related to evidence of prior learning.
 
static recordset_loop_and_export (moodle_recordset $recordset, $splitkey, $initial, callable $reducer, callable $export)
 Loop and export from a recordset.
 
static transform_competency_brief (competency $competency)
 Transform a competency into a brief description.
 
static transform_competency_grade (competency $competency, $grade, performance_helper $helper)
 Transform a competency rating.
 
static transform_evidence ($userid, evidence $evidence, competency $competency, performance_helper $helper)
 Transform an evidence.
 
static transform_framework_brief (competency_framework $framework)
 Transform a framework into a brief description.
 
static transform_proficiency ($proficiency)
 Transform proficiency.
 
static transform_template_brief (template $template)
 Transform a template into a brief description.
 
static transform_user_competency ($userid, $uc, competency $competency, performance_helper $helper)
 Transform user competency.
 
static transform_user_evidence ($userid, user_evidence $ue)
 Transform a user evidence.
 

Member Function Documentation

◆ delete_data_for_all_users_in_context() [1/2]

static core_competency\privacy\provider::delete_data_for_all_users_in_context ( context $context)
static

Delete all data for all users in the specified context.

Parameters
context$contextThe specific context to delete data for.

◆ delete_data_for_all_users_in_context() [2/2]

static core_privacy\local\request\core_user_data_provider::delete_data_for_all_users_in_context ( \context $context)
staticinherited

Delete all data for all users in the specified context.

Parameters
context$contextThe 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.

◆ delete_data_for_user()

static core_competency\privacy\provider::delete_data_for_user ( approved_contextlist $contextlist)
static

Delete all user data for the specified user, in the specified contexts.

Here we only delete the private data of user, not whether they modified, are reviewing, or are associated with the record on at a second level. Only data directly linked to the user will be affected.

Parameters
approved_contextlist$contextlistThe approved contexts and user information to delete information for.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_users()

static core_competency\privacy\provider::delete_data_for_users ( approved_userlist $userlist)
static

Delete multiple users within a single context.

Here we only delete the private data of users, not whether they modified, are reviewing, or are associated with the record on at a second level. Only data directly linked to the user will be affected.

Parameters
approved_userlist$userlistThe approved context and user information to delete information for.

Implements core_privacy\local\request\core_userlist_provider.

◆ delete_user_competencies()

static core_competency\privacy\provider::delete_user_competencies ( $userid)
staticprotected

Delete user competency data.

Parameters
int$useridThe user ID.
Return values
void

◆ delete_user_competencies_in_course()

static core_competency\privacy\provider::delete_user_competencies_in_course ( $courseid,
$userids = [] )
staticprotected

Delete the record of competencies for user(s) in a course.

Parameters
int$courseidThe course ID.
int[]$useridsThe user IDs, if deleting for specific user(s).
Return values
void

◆ delete_user_evidence_of_prior_learning()

static core_competency\privacy\provider::delete_user_evidence_of_prior_learning ( $userid)
staticprotected

Delete evidence of prior learning.

Parameters
int$useridThe user ID.
Return values
void

◆ delete_user_plans()

static core_competency\privacy\provider::delete_user_plans ( $userid)
staticprotected

User plans.

Parameters
int$useridThe user ID.
Return values
void

◆ export_user_data()

static core_competency\privacy\provider::export_user_data ( approved_contextlist $contextlist)
static

Export all user data for the specified user, in the specified contexts.

We skip the enabled check for competencies, as there could be historical data. This avoids exceptions thrown from the {

See also
api\require_enabled} method, which is called at various points during export via the competency API
Parameters
approved_contextlist$contextlistThe approved contexts to export information for.

Implements core_privacy\local\request\core_user_data_provider.

◆ export_user_data_competencies()

static core_competency\privacy\provider::export_user_data_competencies ( context_user $context)
staticprotected

Export a user's competencies.

Parameters
context_user$contextThe context of the user requesting the export.
Return values
void

◆ export_user_data_competencies_related_to_me()

static core_competency\privacy\provider::export_user_data_competencies_related_to_me ( $userid,
context_user $context )
staticprotected

Export a user's data related to competencies.

Parameters
int$useridThe user ID we're exporting for.
context_user$contextThe context of the user in which we're gathering data.
Return values
void

◆ export_user_data_frameworks_in_context()

static core_competency\privacy\provider::export_user_data_frameworks_in_context ( $userid,
context $context )
staticprotected

Export the user data related to frameworks in context.

Parameters
int$useridThe user ID.
context$contextThe context.
Return values
void

◆ export_user_data_in_category_contexts()

static core_competency\privacy\provider::export_user_data_in_category_contexts ( $userid,
array $contexts )
staticprotected

Export the user data in category contexts.

Parameters
int$useridThe user ID.
array$contextsThe contexts.
Return values
void

◆ export_user_data_in_course_contexts()

static core_competency\privacy\provider::export_user_data_in_course_contexts ( $userid,
array $contexts )
staticprotected

Export the user data in course contexts.

Parameters
int$useridThe user whose data we're exporting.
array$contextsA list of contexts.
Return values
void

◆ export_user_data_in_course_contexts_associations()

static core_competency\privacy\provider::export_user_data_in_course_contexts_associations ( $userid,
$courseids,
$path )
staticprotected

Export user data in course contexts related to linked competencies.

Parameters
int$useridThe user ID.
array$courseidsThe course IDs.
array$pathThe root path to export at.
Return values
void

◆ export_user_data_in_course_contexts_rated_by_me()

static core_competency\privacy\provider::export_user_data_in_course_contexts_rated_by_me ( $userid,
$courseids,
$path,
performance_helper $helper )
staticprotected

Export the ratings given in a course.

Parameters
int$useridThe user ID.
array$courseidsThe course IDs.
array$pathThe root path.
performance_helper$helperThe performance helper.
Return values
void

◆ export_user_data_in_course_contexts_settings()

static core_competency\privacy\provider::export_user_data_in_course_contexts_settings ( $userid,
$courseids,
$path )
staticprotected

Export user data in course contexts related to course settings.

Parameters
int$useridThe user ID.
array$courseidsThe course IDs.
array$pathThe root path to export at.
Return values
void

◆ export_user_data_in_module_contexts()

static core_competency\privacy\provider::export_user_data_in_module_contexts ( $userid,
array $contexts )
staticprotected

Export the user data in module contexts.

Parameters
int$useridThe user whose data we're exporting.
array$contextsA list of contexts.
Return values
void

◆ export_user_data_in_system_context()

static core_competency\privacy\provider::export_user_data_in_system_context ( $userid)
staticprotected

Export the user data in systen context.

Parameters
int$useridThe user ID.
Return values
void

◆ export_user_data_in_user_contexts()

static core_competency\privacy\provider::export_user_data_in_user_contexts ( $userid,
array $contexts )
staticprotected

Export the user data in user context.

Parameters
int$useridThe user ID.
array$contextsThe contexts.
Return values
void

◆ export_user_data_learning_plans()

static core_competency\privacy\provider::export_user_data_learning_plans ( context_user $context)
staticprotected

Export a user's learning plans.

Parameters
context_user$contextThe context of the user requesting the export.
Return values
void

◆ export_user_data_learning_plans_related_to_me()

static core_competency\privacy\provider::export_user_data_learning_plans_related_to_me ( $userid,
context_user $context )
staticprotected

Export a user's data related to learning plans.

Parameters
int$useridThe user ID we're exporting for.
context_user$contextThe context of the user in which we're gathering data.
Return values
void

◆ export_user_data_templates_in_context()

static core_competency\privacy\provider::export_user_data_templates_in_context ( $userid,
context $context )
staticprotected

Export the user data related to templates in contexts.

Parameters
int$useridThe user ID.
context$contextThe context.
Return values
void

◆ export_user_data_user_evidence()

static core_competency\privacy\provider::export_user_data_user_evidence ( context_user $context)
staticprotected

Export the evidence of prior learning of a user.

Parameters
context_user$contextThe context of the user we're exporting for.
Return values
void

◆ export_user_data_user_evidence_related_to_me()

static core_competency\privacy\provider::export_user_data_user_evidence_related_to_me ( $userid,
context_user $context )
staticprotected

Export a user's data related to evidence of prior learning.

Parameters
int$useridThe user ID we're exporting for.
context_user$contextThe context of the user in which we're gathering data.
Return values
void

◆ get_contexts_for_userid()

static core_competency\privacy\provider::get_contexts_for_userid ( int $userid)
static

Get the list of contexts that contain user information for the specified user.

Parameters
int$useridThe user to search.
Return values
contextlist\$contextlistThe contextlist containing the list of contexts used in this plugin.

Implements core_privacy\local\request\core_user_data_provider.

◆ get_metadata()

static core_competency\privacy\provider::get_metadata ( collection $collection)
static

Returns metadata.

Parameters
collection$collectionThe initialised collection to add items to.
Return values
collectionA listing of user data stored through this system.

Implements core_privacy\local\metadata\provider.

◆ get_users_in_context()

static core_competency\privacy\provider::get_users_in_context ( userlist $userlist)
static

Get the list of users who have data within a context.

Parameters
userlist$userlistThe userlist containing the list of users who have data in this context/plugin combination.

Implements core_privacy\local\request\core_userlist_provider.

◆ recordset_loop_and_export()

static core_competency\privacy\provider::recordset_loop_and_export ( moodle_recordset $recordset,
$splitkey,
$initial,
callable $reducer,
callable $export )
staticprotected

Loop and export from a recordset.

Parameters
moodle_recordset$recordsetThe recordset.
string$splitkeyThe record key to determine when to export.
mixed$initialThe initial data to reduce from.
callable$reducerThe function to return the dataset, receives current dataset, and the current record.
callable$exportThe function to export the dataset, receives the last value from $splitkey and the dataset.
Return values
void

◆ transform_competency_brief()

static core_competency\privacy\provider::transform_competency_brief ( competency $competency)
staticprotected

Transform a competency into a brief description.

Parameters
competency$competencyThe competency.
Return values
array

◆ transform_competency_grade()

static core_competency\privacy\provider::transform_competency_grade ( competency $competency,
$grade,
performance_helper $helper )
staticprotected

Transform a competency rating.

Parameters
competency$competencyThe competency.
int$gradeThe grade.
performance_helper$helperThe performance helper.
Return values
string

◆ transform_evidence()

static core_competency\privacy\provider::transform_evidence ( $userid,
evidence $evidence,
competency $competency,
performance_helper $helper )
staticprotected

Transform an evidence.

Parameters
int$useridThe user ID we are exporting for.
evidence$evidenceThe evidence.
competency$competencyThe associated competency.
performance_helper$helperThe performance helper.
Return values
array

◆ transform_framework_brief()

static core_competency\privacy\provider::transform_framework_brief ( competency_framework $framework)
staticprotected

Transform a framework into a brief description.

Parameters
competency_framework$frameworkThe framework.
Return values
array

◆ transform_proficiency()

static core_competency\privacy\provider::transform_proficiency ( $proficiency)
staticprotected

Transform proficiency.

Parameters
null | bool$proficiencyThe proficiency.
Return values
string

◆ transform_template_brief()

static core_competency\privacy\provider::transform_template_brief ( template $template)
staticprotected

Transform a template into a brief description.

Parameters
template$templateThe Template.
Return values
array

◆ transform_user_competency()

static core_competency\privacy\provider::transform_user_competency ( $userid,
$uc,
competency $competency,
performance_helper $helper )
staticprotected

Transform user competency.

Parameters
int$useridThe user ID we are exporting for.
user_competency | user_competency_plan | user_competency_course$ucThe user competency.
competency$competencyThe associated competency.
performance_helper$helperThe performance helper.
Return values
array

◆ transform_user_evidence()

static core_competency\privacy\provider::transform_user_evidence ( $userid,
user_evidence $ue )
staticprotected

Transform a user evidence.

Parameters
int$useridThe user we are exporting for.
user_evidence$ueThe evidence of prior learning.
Return values
array

The documentation for this class was generated from the following file: