Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Static Protected Member Functions | List of all members
core_grades\privacy\provider Class Reference

Data provider class. More...

Inheritance diagram for core_grades\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\subsystem\provider core_privacy\local\request\core_userlist_provider core_privacy\local\request\core_user_data_provider core_privacy\local\request\userlist_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. More...
 
static delete_data_for_all_users_in_context (context $context)
 Delete all data for all users in the specified context. More...
 
static delete_data_for_user (approved_contextlist $contextlist)
 Delete all user data for the specified user, in the specified contexts. More...
 
static delete_data_for_users (\core_privacy\local\request\approved_userlist $userlist)
 Delete multiple users within a single context. More...
 
static delete_data_for_users (approved_userlist $userlist)
 Delete multiple users within a single context. More...
 
static export_user_data (approved_contextlist $contextlist)
 Export all user data for the specified user, in the specified contexts. More...
 
static get_contexts_for_userid (int $userid)
 Get the list of contexts that contain user information for the specified user. More...
 
static get_metadata (collection $collection)
 Returns metadata. More...
 
static get_users_in_context (\core_privacy\local\request\userlist $userlist)
 Get the list of contexts that contain user information for the specified user. More...
 
static get_users_in_context (userlist $userlist)
 Get the list of users who have data within a context. More...
 

Static Protected Member Functions

static delete_files (array $itemids, bool $ishistory, array $userids=null)
 Handles deleting files for a given list of grade items. More...
 
static delete_orphan_historical_grades ($userid)
 Delete orphan historical grades. More...
 
static export_user_data_outcomes_in_contexts (approved_contextlist $contextlist)
 Export the user data related to outcomes. More...
 
static export_user_data_scales_in_contexts (approved_contextlist $contextlist)
 Export the user data related to scales. More...
 
static extract_grade_grade_from_record (stdClass $record, $ishistory=false)
 Extract grade_grade from a record. More...
 
static extract_record ($record, $prefix)
 Extract a record from another one. More...
 
static get_fields_sql ($target, $alias, $prefix)
 Get fields SQL for a grade related object. More...
 
static get_item_ids_from_course_ids ($courseids)
 Get all the items IDs from course IDs. More...
 
static recordset_loop_and_export (\moodle_recordset $recordset, $splitkey, $initial, callable $reducer, callable $export)
 Loop and export from a recordset. More...
 
static transform_grade (grade_grade $gg, context $context, bool $ishistory)
 Transform a grade. More...
 
static transform_history_action ($action)
 Transform an history action. More...
 

Detailed Description

Data provider class.

Author
Frédéric Massart fred@.nosp@m.bran.nosp@m.chup..nosp@m.tech
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ delete_data_for_all_users_in_context() [1/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 profilefield_textarea\privacy\provider, profilefield_text\privacy\provider, profilefield_menu\privacy\provider, profilefield_datetime\privacy\provider, profilefield_checkbox\privacy\provider, core_user\privacy\provider, core_tag\privacy\provider, search_solr\privacy\provider, search_simpledb\privacy\provider, core_rss\privacy\provider, repository_youtube\privacy\provider, repository_wikimedia\privacy\provider, repository_picasa\privacy\provider, repository_onedrive\privacy\provider, repository_merlot\privacy\provider, repository_googledocs\privacy\provider, repository_flickr_public\privacy\provider, repository_flickr\privacy\provider, repository_dropbox\privacy\provider, core_repository\privacy\provider, repository_boxnet\privacy\provider, report_stats\privacy\provider, core_question\privacy\provider, core_portfolio\privacy\provider, core_notes\privacy\provider, mod_workshop\privacy\provider, mod_scorm\privacy\provider, mod_quiz\privacy\provider, ltiservice_memberships\privacy\provider, ltiservice_gradebookservices\privacy\provider, ltiservice_basicoutcomes\privacy\provider, mod_lti\privacy\provider, mod_glossary\privacy\provider, mod_forum\privacy\provider, mod_feedback\privacy\provider, mod_data\privacy\provider, mod_choice\privacy\provider, mod_assignment\privacy\provider, mod_assign\privacy\provider, mnetservice_enrol\privacy\provider, message_jabber\privacy\provider, message_email\privacy\provider, message_airnotifier\privacy\provider, core_message\privacy\provider, editor_atto\privacy\provider, core\privacy\provider, core_group\privacy\provider, core_grading\privacy\provider, fileconverter_googledrive\privacy\provider, core_files\privacy\provider, enrol_paypal\privacy\provider, enrol_meta\privacy\provider, enrol_lti\privacy\provider, enrol_flatfile\privacy\provider, enrol_cohort\privacy\provider, core_enrol\privacy\provider, core_course\privacy\provider, core_cohort\privacy\provider, core_calendar\privacy\provider, cachestore_session\privacy\provider, cachestore_redis\privacy\provider, cachestore_mongodb\privacy\provider, cachestore_memcached\privacy\provider, block_tag_flickr\privacy\provider, block_rss_client\privacy\provider, block_recentlyaccesseditems\privacy\provider, block_recent_activity\privacy\provider, block_html\privacy\provider, block_comments\privacy\provider, core_backup\privacy\provider, auth_oauth2\privacy\provider, auth_mnet\privacy\provider, core_analytics\privacy\provider, tool_policy\privacy\provider, tool_monitor\privacy\provider, tool_mobile\privacy\provider, tool_cohortroles\privacy\provider, and core_role\privacy\provider.

◆ delete_data_for_all_users_in_context() [2/2]

static core_grades\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_user()

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

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

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() [1/2]

static core_grades\privacy\provider::delete_data_for_users ( \core_privacy\local\request\approved_userlist  $userlist)
static

Delete multiple users within a single context.

Parameters
core_privacy\local\request\approved_userlist$userlistThe approved context and user information to delete information for.

◆ delete_data_for_users() [2/2]

static core_privacy\local\request\core_userlist_provider::delete_data_for_users ( approved_userlist  $userlist)
staticinherited

Delete multiple users within a single context.

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

Implemented in core_webservice\privacy\provider, profilefield_textarea\privacy\provider, profilefield_text\privacy\provider, profilefield_menu\privacy\provider, profilefield_datetime\privacy\provider, profilefield_checkbox\privacy\provider, core_user\privacy\provider, core_tag\privacy\provider, search_solr\privacy\provider, search_simpledb\privacy\provider, core_rss\privacy\provider, repository_youtube\privacy\provider, repository_wikimedia\privacy\provider, repository_picasa\privacy\provider, repository_onedrive\privacy\provider, repository_merlot\privacy\provider, repository_googledocs\privacy\provider, repository_flickr_public\privacy\provider, repository_flickr\privacy\provider, repository_dropbox\privacy\provider, core_repository\privacy\provider, repository_boxnet\privacy\provider, report_stats\privacy\provider, core_question\privacy\provider, core_portfolio\privacy\provider, core_notes\privacy\provider, mod_workshop\privacy\provider, mod_wiki\privacy\provider, mod_survey\privacy\provider, mod_scorm\privacy\provider, mod_quiz\privacy\provider, ltiservice_memberships\privacy\provider, ltiservice_gradebookservices\privacy\provider, ltiservice_basicoutcomes\privacy\provider, mod_lti\privacy\provider, mod_lesson\privacy\provider, mod_glossary\privacy\provider, mod_forum\privacy\provider, mod_feedback\privacy\provider, mod_data\privacy\provider, mod_choice\privacy\provider, mod_chat\privacy\provider, mod_assignment\privacy\provider, mod_assign\privacy\provider, mnetservice_enrol\privacy\provider, message_jabber\privacy\provider, message_email\privacy\provider, message_airnotifier\privacy\provider, core_message\privacy\provider, editor_atto\privacy\provider, core\privacy\provider, core_group\privacy\provider, fileconverter_googledrive\privacy\provider, core_fileconverter\privacy\provider, core_files\privacy\provider, enrol_paypal\privacy\provider, enrol_meta\privacy\provider, enrol_lti\privacy\provider, enrol_flatfile\privacy\provider, enrol_cohort\privacy\provider, core_enrol\privacy\provider, core_course\privacy\provider, core_competency\privacy\provider, core_cohort\privacy\provider, core_calendar\privacy\provider, cachestore_session\privacy\provider, cachestore_redis\privacy\provider, cachestore_mongodb\privacy\provider, cachestore_memcached\privacy\provider, block_tag_flickr\privacy\provider, block_rss_client\privacy\provider, block_recentlyaccesseditems\privacy\provider, block_recent_activity\privacy\provider, block_html\privacy\provider, block_comments\privacy\provider, core_badges\privacy\provider, core_backup\privacy\provider, auth_oauth2\privacy\provider, auth_mnet\privacy\provider, core_analytics\privacy\provider, tool_policy\privacy\provider, tool_monitor\privacy\provider, tool_mobile\privacy\provider, tool_messageinbound\privacy\provider, tool_dataprivacy\privacy\provider, tool_cohortroles\privacy\provider, and core_role\privacy\provider.

◆ delete_files()

static core_grades\privacy\provider::delete_files ( array  $itemids,
bool  $ishistory,
array  $userids = null 
)
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.

Parameters
array$itemids
bool$ishistory
array | null$userids
Exceptions
coding_exception
dml_exception

◆ delete_orphan_historical_grades()

static core_grades\privacy\provider::delete_orphan_historical_grades (   $userid)
staticprotected

Delete orphan historical grades.

Parameters
int$useridThe user ID.
Return values
void

◆ export_user_data()

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

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

Parameters
approved_contextlist$contextlistThe approved contexts to export information for.

Implements core_privacy\local\request\core_user_data_provider.

◆ export_user_data_outcomes_in_contexts()

static core_grades\privacy\provider::export_user_data_outcomes_in_contexts ( approved_contextlist  $contextlist)
staticprotected

Export the user data related to outcomes.

Parameters
approved_contextlist$contextlistThe approved contexts to export information for.
Return values
void

◆ export_user_data_scales_in_contexts()

static core_grades\privacy\provider::export_user_data_scales_in_contexts ( approved_contextlist  $contextlist)
staticprotected

Export the user data related to scales.

Parameters
approved_contextlist$contextlistThe approved contexts to export information for.
Return values
void

◆ extract_grade_grade_from_record()

static core_grades\privacy\provider::extract_grade_grade_from_record ( stdClass  $record,
  $ishistory = false 
)
staticprotected

Extract grade_grade from a record.

Parameters
stdClass$recordThe record.
bool$ishistoryWhether we're extracting a historical grade.
Return values
grade_grade

◆ extract_record()

static core_grades\privacy\provider::extract_record (   $record,
  $prefix 
)
staticprotected

Extract a record from another one.

Parameters
object$recordThe record to extract from.
string$prefixThe prefix used.
Return values
object

◆ get_contexts_for_userid()

static core_grades\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_fields_sql()

static core_grades\privacy\provider::get_fields_sql (   $target,
  $alias,
  $prefix 
)
staticprotected

Get fields SQL for a grade related object.

Parameters
string$targetThe related object.
string$aliasThe table alias.
string$prefixA prefix.
Return values
string

◆ get_item_ids_from_course_ids()

static core_grades\privacy\provider::get_item_ids_from_course_ids (   $courseids)
staticprotected

Get all the items IDs from course IDs.

Parameters
array$courseidsThe course IDs.
Return values
array

◆ get_metadata()

static core_grades\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() [1/2]

static core_grades\privacy\provider::get_users_in_context ( \core_privacy\local\request\userlist  $userlist)
static

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

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

◆ get_users_in_context() [2/2]

static core_privacy\local\request\core_userlist_provider::get_users_in_context ( userlist  $userlist)
staticinherited

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.

Implemented in core_webservice\privacy\provider, profilefield_textarea\privacy\provider, profilefield_text\privacy\provider, profilefield_menu\privacy\provider, profilefield_datetime\privacy\provider, profilefield_checkbox\privacy\provider, core_user\privacy\provider, core_tag\privacy\provider, search_solr\privacy\provider, search_simpledb\privacy\provider, core_rss\privacy\provider, repository_youtube\privacy\provider, repository_wikimedia\privacy\provider, repository_picasa\privacy\provider, repository_onedrive\privacy\provider, repository_merlot\privacy\provider, repository_googledocs\privacy\provider, repository_flickr_public\privacy\provider, repository_flickr\privacy\provider, repository_dropbox\privacy\provider, core_repository\privacy\provider, repository_boxnet\privacy\provider, report_stats\privacy\provider, core_question\privacy\provider, core_portfolio\privacy\provider, core_notes\privacy\provider, mod_workshop\privacy\provider, mod_wiki\privacy\provider, mod_survey\privacy\provider, mod_scorm\privacy\provider, mod_quiz\privacy\provider, ltiservice_memberships\privacy\provider, ltiservice_gradebookservices\privacy\provider, ltiservice_basicoutcomes\privacy\provider, mod_lti\privacy\provider, mod_lesson\privacy\provider, mod_glossary\privacy\provider, mod_forum\privacy\provider, mod_feedback\privacy\provider, mod_data\privacy\provider, mod_choice\privacy\provider, mod_chat\privacy\provider, mod_assignment\privacy\provider, mod_assign\privacy\provider, mnetservice_enrol\privacy\provider, message_jabber\privacy\provider, message_email\privacy\provider, message_airnotifier\privacy\provider, core_message\privacy\provider, editor_atto\privacy\provider, core\privacy\provider, core_group\privacy\provider, fileconverter_googledrive\privacy\provider, core_fileconverter\privacy\provider, core_files\privacy\provider, enrol_paypal\privacy\provider, enrol_meta\privacy\provider, enrol_lti\privacy\provider, enrol_flatfile\privacy\provider, enrol_cohort\privacy\provider, core_enrol\privacy\provider, core_course\privacy\provider, core_competency\privacy\provider, core_cohort\privacy\provider, core_calendar\privacy\provider, cachestore_session\privacy\provider, cachestore_redis\privacy\provider, cachestore_mongodb\privacy\provider, cachestore_memcached\privacy\provider, block_tag_flickr\privacy\provider, block_rss_client\privacy\provider, block_recentlyaccesseditems\privacy\provider, block_recent_activity\privacy\provider, block_html\privacy\provider, block_comments\privacy\provider, core_badges\privacy\provider, core_backup\privacy\provider, auth_oauth2\privacy\provider, auth_mnet\privacy\provider, core_analytics\privacy\provider, tool_policy\privacy\provider, tool_monitor\privacy\provider, tool_mobile\privacy\provider, tool_messageinbound\privacy\provider, tool_dataprivacy\privacy\provider, tool_cohortroles\privacy\provider, and core_role\privacy\provider.

◆ recordset_loop_and_export()

static core_grades\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_grade()

static core_grades\privacy\provider::transform_grade ( grade_grade  $gg,
context  $context,
bool  $ishistory 
)
staticprotected

Transform a grade.

Parameters
grade_grade$ggThe grade object.
context$contextThe context.
bool$ishistoryWhether we're extracting a historical grade.
Return values
array

◆ transform_history_action()

static core_grades\privacy\provider::transform_history_action (   $action)
staticprotected

Transform an history action.

Parameters
int$actionThe action.
Return values
string

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