Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 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 401] [Versions 39 and 402] [Versions 39 and 403]

(no description)

File Size: 122 lines (5 kb)
Included or required:0 times
Referenced: 1 time
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.