Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 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 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Renderers for the import of CSV files into the gradebook.

Copyright: 2014 Adrian Greeve <adrian@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 90 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

gradeimport_csv_renderer:: (3 methods):
  standard_upload_file_form()
  import_preview_page()
  errors()


Class: gradeimport_csv_renderer  - X-Ref

Renderers for the import of CSV files into the gradebook.

standard_upload_file_form($course, $mform)   X-Ref
A renderer for the standard upload file form.

param: object $course The course we are doing all of this action in.
param: object $mform The mform for uploading CSV files.
return: string html to be displayed.

import_preview_page($header, $data)   X-Ref
A renderer for the CSV file preview.

param: array $header Column headers from the CSV file.
param: array $data The rest of the data from the CSV file.
return: string html to be displayed.

errors($errors)   X-Ref
A renderer for errors generated trying to import the CSV file.

param: array $errors Display import errors.
return: string errors as html to be displayed.