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.

Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

(no description)

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

Defines 1 class


Class: phpunit_gradeimport_csv_load_data  - X-Ref

Class to open up private methods in gradeimport_csv_load_data().

test_insert_grade_record($record, $studentid)   X-Ref
Method to open up the appropriate method for unit testing.

param: object $record
param: int $studentid

get_importcode()   X-Ref
Method to open up the appropriate method for unit testing.


test_import_new_grade_item($header, $key, $value)   X-Ref
Method to open up the appropriate method for unit testing.

param: array $header The column headers from the CSV file.
param: int $key Current row identifier.
param: string $value The value for this row (final grade).
return: array new grades that are ready for commiting to the gradebook.

test_check_user_exists($value, $userfields)   X-Ref
Method to open up the appropriate method for unit testing.

param: string $value The value, from the csv file, being mapped to identify the user.
param: array $userfields Contains the field and label being mapped from.
return: int Returns the user ID if it exists, otherwise null.

test_create_feedback($courseid, $itemid, $value)   X-Ref
Method to open up the appropriate method for unit testing.

param: int $courseid The course ID.
param: int $itemid The ID of the grade item that the feedback relates to.
param: string $value The actual feedback being imported.
return: object Creates a feedback object with the item ID and the feedback value.

test_update_grade_item($courseid, $map, $key, $verbosescales, $value)   X-Ref
Method to open up the appropriate method for unit testing.


test_map_user_data_with_value($mappingidentifier, $value, $header, $map, $key, $courseid, $feedbackgradeid,$verbosescales)   X-Ref
Method to open up the appropriate method for unit testing.

param: int $courseid The course ID.
param: array $map Mapping information provided by the user.
param: int $key The line that we are currently working on.
param: bool $verbosescales Form setting for grading with scales.
param: string $value The grade value .
return: array grades to be updated.