Privacy API implementation for the Workshop activity module.
More...
Privacy API implementation for the Workshop activity module.
- Copyright
- 2018 David Mudrák david.nosp@m.@moo.nosp@m.dle.c.nosp@m.om
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ 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 | $context | Workshop module content. |
stdClass | $user | User for which we are exporting data. |
stdClass | $data | Base data about the workshop instance to append to. |
array | $subcontext | Subcontext 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_data_for_user()
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 | $contextlist | List 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 |
◆ 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 | $user | User we are exporting for |
context | $context | Workshop activity content |
array | $subcontext | Subcontext path of the assessment |
int | $assessmentid | ID of the exported assessment |
◆ export_assessments()
Export all assessments given by the user.
- Parameters
-
approved_contextlist | $contextlist | List of contexts approved for export. |
◆ export_submissions()
Export all user's submissions and example submissions he/she created in the given contexts.
- Parameters
-
approved_contextlist | $contextlist | List of contexts approved for export. |
◆ export_user_data()
◆ export_user_preferences()
static mod_workshop\privacy\provider::export_user_preferences |
( |
int | $userid | ) |
|
|
static |
◆ 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 | $userid | ID of the user. |
- Return values
-
contextlist | List 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 | $collection | Collection of items to add metadata to. |
- Return values
-
collection | Collection 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
-
array | List of user preferences |
◆ get_users_in_context()
static mod_workshop\privacy\provider::get_users_in_context |
( |
userlist | $userlist | ) |
|
|
static |
The documentation for this class was generated from the following file:
- mod/workshop/classes/privacy/provider.php