Privacy Subsystem implementation for core_question.
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 (approved_userlist $userlist) |
| Delete multiple users within a single context. More...
|
|
static | export_question_attempt_steps (int $userid, context $context, array $questionnocontext, question_attempt $qa, question_display_options $options, $isowner) |
| Export the data for each step transition for each question in each question attempt. More...
|
|
static | export_question_usage (int $userid, context $context, array $usagecontext, int $usage, question_display_options $options, bool $isowner) |
| Export the data for all question attempts on this question usage. 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 where the specified user has either created, or edited a question. More...
|
|
static | get_metadata (collection $items) |
| Describe the types of data stored by the question subsystem. More...
|
|
static | get_related_question_usages_for_user (string $prefix, string $component, string $joinfield, int $userid) |
| Determine related question usages for a user. More...
|
|
static | get_users_in_context (userlist $userlist) |
| Get the list of users who have data within a context. More...
|
|
static | get_users_in_context_from_sql (userlist $userlist, string $prefix, string $insql, $params, int $contextid=null) |
| Add the list of users who have rated in the specified constraints. More...
|
|
Privacy Subsystem implementation for core_question.
- Copyright
- 2018 Andrew Nicols andre.nosp@m.w@ni.nosp@m.cols..nosp@m.co.u.nosp@m.k
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ delete_data_for_all_users_in_context()
static core_question\privacy\provider::delete_data_for_all_users_in_context |
( |
\context |
$context | ) |
|
|
static |
◆ delete_data_for_user()
◆ delete_data_for_users()
static core_question\privacy\provider::delete_data_for_users |
( |
approved_userlist |
$userlist | ) |
|
|
static |
◆ export_question_attempt_steps()
Export the data for each step transition for each question in each question attempt.
Where a user is the owner of the usage, then all steps in the question usage will be exported. Where a user is not the owner, but has been involved in the usage, then only their specific involvement will be exported.
- Parameters
-
int | $userid | The user to export for |
context | $context | The context that the question was used within. |
array | $questionnocontext | The subcontext of this question number. |
question_attempt | $qa | The attempt being checked |
question_display_options | $options | The display options used for formatting. |
bool | $isowner | Whether the user being exported is the user who used the question. |
◆ export_question_usage()
static core_question\privacy\provider::export_question_usage |
( |
int |
$userid, |
|
|
context |
$context, |
|
|
array |
$usagecontext, |
|
|
int |
$usage, |
|
|
question_display_options |
$options, |
|
|
bool |
$isowner |
|
) |
| |
|
static |
Export the data for all question attempts on this question usage.
Where a user is the owner of the usage, then the full detail of that usage will be included. Where a user has been involved in the usage, but it is not their own usage, then only their specific involvement will be exported.
- Parameters
-
int | $userid | The userid to export. |
context | $context | The context that the question was used within. |
array | $usagecontext | The subcontext of this usage. |
int | $usage | The question usage ID. |
question_display_options | $options | The display options used for formatting. |
bool | $isowner | Whether the user being exported is the user who used the question. |
◆ export_user_data()
◆ get_contexts_for_userid()
static core_question\privacy\provider::get_contexts_for_userid |
( |
int |
$userid | ) |
|
|
static |
Get the list of contexts where the specified user has either created, or edited a question.
To export usage of a question, please call provider::export_question_usage() from the module which instantiated the usage of the question.
- Parameters
-
int | $userid | The user to search. |
- Return values
-
contextlist::$contextlist | The contextlist containing the list of contexts used in this plugin. |
Implements core_privacy\local\request\core_user_data_provider.
◆ get_metadata()
static core_question\privacy\provider::get_metadata |
( |
collection |
$items | ) |
|
|
static |
Describe the types of data stored by the question subsystem.
- Parameters
-
collection | $items | The collection to add metadata to. |
- Return values
-
collection | The array of metadata |
Implements core_privacy\local\metadata\provider.
◆ get_related_question_usages_for_user()
static core_question\privacy\provider::get_related_question_usages_for_user |
( |
string |
$prefix, |
|
|
string |
$component, |
|
|
string |
$joinfield, |
|
|
int |
$userid |
|
) |
| |
|
static |
Determine related question usages for a user.
- Parameters
-
string | $prefix | A unique prefix to add to the table alias |
string | $component | The name of the component to fetch usages for. |
string | $joinfield | The SQL field name to use in the JOIN ON - e.g. q.usageid |
int | $userid | The user to search. |
- Return values
-
◆ get_users_in_context()
static core_question\privacy\provider::get_users_in_context |
( |
userlist |
$userlist | ) |
|
|
static |
◆ get_users_in_context_from_sql()
static core_question\privacy\provider::get_users_in_context_from_sql |
( |
userlist |
$userlist, |
|
|
string |
$prefix, |
|
|
string |
$insql, |
|
|
|
$params, |
|
|
int |
$contextid = null |
|
) |
| |
|
static |
Add the list of users who have rated in the specified constraints.
- Parameters
-
userlist | $userlist | The userlist to add the users to. |
string | $prefix | A unique prefix to add to the table alias to avoid interference with your own sql. |
string | $insql | The SQL to use in a sub-select for the question_usages.id query. |
array | $params | The params required for the insql. |
int | null | $contextid | An optional context id, in case the $sql query is not already filtered by that. |
The documentation for this class was generated from the following file: