From 4b763938c7ed7b344ad93fa124f9f4a0dfe3b506 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Mon, 20 Aug 2018 10:12:27 +0800 Subject: [PATCH 1/1] MDL-62535 privacy: Deprecated sample commit (33 only) --- .../form/rubric/classes/privacy/provider.php | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/grade/grading/form/rubric/classes/privacy/provider.php b/grade/grading/form/rubric/classes/privacy/provider.php index 07397449614..f1e34a95849 100644 --- a/grade/grading/form/rubric/classes/privacy/provider.php +++ b/grade/grading/form/rubric/classes/privacy/provider.php @@ -36,7 +36,7 @@ use \core_privacy\local\metadata\collection; */ class provider implements \core_privacy\local\metadata\provider, - \core_grading\privacy\gradingform_provider_v2 { + \core_grading\privacy\gradingform_provider { /** * Returns meta data about this system. @@ -61,7 +61,7 @@ class provider implements * @param int $instanceid The instance ID to export data for. * @param array $subcontext The directory to export this data to. */ - public static function export_gradingform_instance_data(\context $context, int $instanceid, array $subcontext) { + public static function export_gradingform_instance_data(\context $context, $instanceid, array $subcontext) { global $DB; // Get records from the provided params. $params = ['instanceid' => $instanceid]; @@ -86,4 +86,45 @@ class provider implements global $DB; $DB->delete_records_list('gradingform_rubric_fillings', 'instanceid', $instanceids); } + + /** + * This method is used to export any user data this sub-plugin has using the object to get the context and userid. + * + * @deprecated since Moodle 3.6 MDL-62535 Please use the methods in the gradingform_provider_v2 interface + * @todo MDL-63167 Remove this file. + * + * @param \context $context Context owner of the data. + * @param \stdClass $definition Grading definition entry to export. + * @param int $userid The user whose information is to be exported. + * + * @return \stdClass The data to export. + */ + public static function get_gradingform_export_data(\context $context, $definition, $userid) { + // TODO: Implement get_gradingform_export_data() method. + } + + /** + * Any call to this method should delete all user data for the context defined. + * + * @deprecated since Moodle 3.6 MDL-62535 Please use the methods in the gradingform_provider_v2 interface + * @todo MDL-63167 Remove this file. + * + * @param \context $context Context owner of the data. + */ + public static function delete_gradingform_for_context(\context $context) { + // TODO: Implement delete_gradingform_for_context() method. + } + + /** + * A call to this method should delete user data (where practicle) from the userid and context. + * + * @deprecated since Moodle 3.6 MDL-62535 Please use the methods in the gradingform_provider_v2 interface + * @todo MDL-63167 Remove this file. + * + * @param int $userid The user to delete. + * @param \context $context the context to refine the deletion. + */ + public static function delete_gradingform_for_userid($userid, \context $context) { + // TODO: Implement delete_gradingform_for_userid() method. + } } -- 2.17.0