Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Provides the {@see mod_workshop\privacy\provider_test} class.

Copyright: 2018 David Mudrák <david@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 540 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider_test  - X-Ref

Unit tests for the privacy API implementation.

setUp()   X-Ref
Set up the test environment.

course1
|
+--workshop11 (first digit matches the course, second is incremental)
|   |
|   +--submission111 (first two digits match the workshop, last one matches the author)
|       |
|       +--assessment1111 (first three digits match the submission, last one matches the reviewer)
|       +--assessment1112
|       +--assessment1113
|
+--workshop12
|
+--submission121
|   |
|   +--assessment1212
|
+--submission122

etc.

test_get_contexts_for_userid()   X-Ref
Test {@link \mod_workshop\privacy\provider::get_contexts_for_userid()} implementation.


test_get_users_in_context()   X-Ref
Test {@link \mod_workshop\privacy\provider::get_users_in_context()} implementation.


test_export_user_data_1()   X-Ref
Test {@link \mod_workshop\privacy\provider::export_user_data()} implementation.


test_export_user_data_2()   X-Ref
Test {@link \mod_workshop\privacy\provider::export_user_data()} implementation.


test_delete_data_for_all_users_in_context()   X-Ref
Test {@link \mod_workshop\privacy\provider::delete_data_for_all_users_in_context()} implementation.


test_delete_data_for_user()   X-Ref
Test {@link \mod_workshop\privacy\provider::delete_data_for_user()} implementation.


test_delete_data_for_users()   X-Ref
Test {@link \mod_workshop\privacy\provider::delete_data_for_users()} implementation.


is_submission_erased(int $submissionid)   X-Ref
Check if the given submission has the author's personal data erased.

param: int $submissionid Identifier of the submission.
return: boolean

is_received_assessment_erased(int $assessmentid)   X-Ref
Check is the received assessment has recipient's (author's) personal data erased.

param: int $assessmentid Identifier of the assessment.
return: boolean

is_given_assessment_erased(int $assessmentid)   X-Ref
Check is the given assessment has reviewer's personal data erased.

param: int $assessmentid Identifier of the assessment.
return: boolean