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]

Data provider tests.

Author: Frédéric Massart <fred@branchup.tech>
Copyright: 2018 Frédéric Massart
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 561 lines (25 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: mod_feedback_privacy_testcase  - X-Ref

Data provider testcase class.

setUp()   X-Ref
No description

test_get_contexts_for_userid()   X-Ref
Test getting the contexts for a user.


test_get_users_in_context()   X-Ref
Test getting the users in a context.


test_delete_data_for_user()   X-Ref
Test deleting user data.


test_delete_data_for_users()   X-Ref
Test deleting data within a context for an approved userlist.


test_delete_data_for_all_users_in_context()   X-Ref
Test deleting a whole context.


test_export_user_data()   X-Ref
Test exporting data.


assert_no_feedback_data_for_user($feedback, $user)   X-Ref
Assert there is no feedback data for a user.

param: object $feedback The feedback.
param: object $user The user.
return: void

assert_feedback_data_for_user($feedback, $user, $submissioncount = 1, $valuecount = 2)   X-Ref
Assert there are submissions and answers for user.

param: object $feedback The feedback.
param: object $user The user.
param: int $submissioncount The number of submissions.
param: int $valuecount The number of values per submission.
return: void

assert_feedback_tmp_data_for_user($feedback, $user, $submissioncount = 1, $valuecount = 2)   X-Ref
Assert there are temporary submissions and answers for user.

param: object $feedback The feedback.
param: object $user The user.
param: int $submissioncount The number of submissions.
param: int $valuecount The number of values per submission.
return: void

create_submission_with_answers($feedback, $user, $answers, $submissioncount = 1)   X-Ref
Create an submission with answers.

param: object $feedback The feedback.
param: object $user The user.
param: array $answers Answers.
param: int $submissioncount The number of submissions expected after this entry.
return: void

create_tmp_submission_with_answers($feedback, $user, $answers)   X-Ref
Create a temporary submission with answers.

param: object $feedback The feedback.
param: object $user The user.
param: array $answers Answers.
return: void