Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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