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.

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: 563 lines (25 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


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