Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_workshop\privacy\provider Class Reference

Privacy API implementation for the Workshop activity module. More...

Inheritance diagram for mod_workshop\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\core_userlist_provider core_privacy\local\request\user_preference_provider core_privacy\local\request\plugin\provider core_privacy\local\request\userlist_provider core_privacy\local\request\core_data_provider core_privacy\local\request\core_user_data_provider core_privacy\local\request\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 personal data for all users in the context.
 
static delete_data_for_user (approved_contextlist $contextlist)
 Delete personal data for the user in a list of contexts.
 
static delete_data_for_users (approved_userlist $userlist)
 Delete personal data for multiple users within a single workshop context.
 
static export_user_data (approved_contextlist $contextlist)
 Export personal data stored in the given contexts.
 
static export_user_preferences (int $userid)
 Export user preferences controlled by this plugin.
 
static get_contexts_for_userid (int $userid)
 Get the list of contexts that contain personal data for the specified user.
 
static get_metadata (collection $collection)
 Describe all the places where the Workshop module stores some personal data.
 
static get_users_in_context (userlist $userlist)
 Get the list of users within a specific context.
 

Static Protected Member Functions

static append_extra_workshop_data (\context $context, stdClass $user, stdClass $data, array $subcontext)
 Append additional relevant data into the base data about the workshop instance.
 
static export_assessment_forms (\stdClass $user, context $context, array $subcontext, int $assessmentid)
 Export the grading strategy data related to the particular assessment.
 
static export_assessments (approved_contextlist $contextlist)
 Export all assessments given by the user.
 
static export_submissions (approved_contextlist $contextlist)
 Export all user's submissions and example submissions he/she created in the given contexts.
 
static get_user_prefs ()
 Get the user preferences.
 

Detailed Description

Privacy API implementation for the Workshop activity module.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ append_extra_workshop_data()

static mod_workshop\privacy\provider::append_extra_workshop_data ( \context $context,
stdClass $user,
stdClass $data,
array $subcontext )
staticprotected

Append additional relevant data into the base data about the workshop instance.

Relevant are data that are important for interpreting or evaluating the performance of the user expressed in his/her exported personal data. For example, we need to know what were the instructions for submissions or what was the phase of the workshop when it was exported.

Parameters
context$contextWorkshop module content.
stdClass$userUser for which we are exporting data.
stdClass$dataBase data about the workshop instance to append to.
array$subcontextSubcontext path items to eventually write files into.

◆ delete_data_for_all_users_in_context()

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

Delete personal data for all users in the context.

Parameters
context$contextContext to delete personal data from.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_user()

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

Delete personal data for the user in a list of contexts.

Removing assessments of submissions from the Workshop is not trivial. Removing one user's data can easily affect other users' grades and completion criteria. So we replace the non-essential contents with a "deleted" message, but keep the actual info in place. The argument is that one's right for privacy should not overweight others' right for accessing their own personal data and be evaluated on their basis.

Parameters
approved_contextlist$contextlistList of contexts to delete data from.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_users()

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

Delete personal data for multiple users within a single workshop context.

See documentation for self::delete_data_for_user() for more details on what we do and don't actually delete and why.

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

Implements core_privacy\local\request\core_userlist_provider.

◆ export_assessment_forms()

static mod_workshop\privacy\provider::export_assessment_forms ( \stdClass $user,
context $context,
array $subcontext,
int $assessmentid )
staticprotected

Export the grading strategy data related to the particular assessment.

Parameters
stdClass$userUser we are exporting for
context$contextWorkshop activity content
array$subcontextSubcontext path of the assessment
int$assessmentidID of the exported assessment

◆ export_assessments()

static mod_workshop\privacy\provider::export_assessments ( approved_contextlist $contextlist)
staticprotected

Export all assessments given by the user.

Parameters
approved_contextlist$contextlistList of contexts approved for export.

◆ export_submissions()

static mod_workshop\privacy\provider::export_submissions ( approved_contextlist $contextlist)
staticprotected

Export all user's submissions and example submissions he/she created in the given contexts.

Parameters
approved_contextlist$contextlistList of contexts approved for export.

◆ export_user_data()

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

Export personal data stored in the given contexts.

Parameters
approved_contextlist$contextlistList of contexts approved for export.

Implements core_privacy\local\request\core_user_data_provider.

◆ export_user_preferences()

static mod_workshop\privacy\provider::export_user_preferences ( int $userid)
static

Export user preferences controlled by this plugin.

Parameters
int$useridID of the user we are exporting data for

Implements core_privacy\local\request\user_preference_provider.

◆ get_contexts_for_userid()

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

Get the list of contexts that contain personal data for the specified user.

User has personal data in the workshop if any of the following cases happens:

  • the user has submitted in the workshop
  • the user has overridden a submission grade
  • the user has been assigned as a reviewer of a submission
  • the user has overridden a grading grade
  • the user has a grading grade (existing or to be calculated)
Parameters
int$useridID of the user.
Return values
contextlistList of contexts containing the user's personal data.

Implements core_privacy\local\request\core_user_data_provider.

◆ get_metadata()

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

Describe all the places where the Workshop module stores some personal data.

Parameters
collection$collectionCollection of items to add metadata to.
Return values
collectionCollection with our added items.

Implements core_privacy\local\metadata\provider.

◆ get_user_prefs()

static mod_workshop\privacy\provider::get_user_prefs ( )
staticprotected

Get the user preferences.

Return values
arrayList of user preferences

◆ get_users_in_context()

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

Get the list of users within a specific context.

Parameters
userlist$userlistTo be filled list of users who have data in this context/plugin combination.

Implements core_privacy\local\request\core_userlist_provider.


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