Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403]

(no description)

File Size: 631 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: load_data_test  - X-Ref

Unit tests for lib.php

tearDown()   X-Ref
No description

csv_load($content)   X-Ref
Load up the above text through the csv import.

param: string $content Text to be imported into the gradebook.
return: array All text separated by commas now in an array.

test_load_csv_content()   X-Ref
Test loading data and returning preview content.


test_fetch_grade_items()   X-Ref
Test fetching grade items for the course.


test_insert_grade_record()   X-Ref
Test the inserting of grade record data.


test_import_new_grade_item()   X-Ref
Test preparing a new grade item for import into the gradebook.


check_user_exists_provider()   X-Ref
Data provider for \gradeimport_csv_load_data_testcase::test_check_user_exists().

return: array

test_check_user_exists($field, $value, $successexpected, $allowaccountssameemail = 0)   X-Ref
Check that the user matches a user in the system.

param: string $field The field to use for the query.
param: string|boolean $value The field value. When fetching by ID, set true to fetch valid user ID, false otherwise.
param: boolean $successexpected Whether we expect for a user to be found or not.
param: int $allowaccountssameemail Value for $CFG->allowaccountssameemail

test_create_feedback()   X-Ref
Test preparing feedback for inserting / updating into the gradebook.


test_update_grade_item()   X-Ref
Test preparing grade_items for upgrading into the gradebook.


test_map_user_data_with_value()   X-Ref
Test importing data and mapping it with items in the course.


test_prepare_import_grade_data()   X-Ref
Test importing data into the gradebook.


test_force_import_option()   X-Ref
No description