Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 310]

Provides the {@link mod_workshop_privacy_provider_testcase} class.

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

Defines 1 class


Class: mod_workshop_privacy_provider_testcase  - 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