Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.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: 891 lines (43 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
No description

test_get_users_in_context()   X-Ref
No description

test_delete_data_for_all_users_in_context()   X-Ref
No description

test_delete_data_for_user()   X-Ref
No description

test_delete_data_for_users()   X-Ref
No description

test_export_data_for_user_overrides()   X-Ref
No description

test_export_data_for_user_grades()   X-Ref
No description

test_export_data_for_user_timers()   X-Ref
No description

test_export_data_for_user_attempts()   X-Ref
No description

assert_attempt_page($page, $attempt)   X-Ref
Assert the page details of an attempt.

param: object $page The expected page info.
param: array $attempt The exported attempt details.
return: void

create_attempt($lesson, $user, array $options = [])   X-Ref
Create an attempt (answer to a question).

param: object $lesson The lesson.
param: object $user The user.
param: array $options Options.
return: object

create_grade($lesson, $user, array $options = [])   X-Ref
Create a grade.

param: object $lesson The lesson.
param: object $user The user.
param: array $options Options.
return: object

create_timer($lesson, $user, array $options = [])   X-Ref
Create a timer.

param: object $lesson The lesson.
param: object $user The user.
param: array $options Options.
return: object

create_branch($lesson, $user, array $options = [])   X-Ref
Create a branch (choice on page).

param: object $lesson The lesson.
param: object $user The user.
param: array $options Options.
return: object

create_override($lesson, $user, array $options = [])   X-Ref
Create an override.

param: object $lesson The lesson.
param: object $user The user.
param: array $options Options.
return: object