Differences Between: [Versions 310 and 403] [Versions 39 and 403]
File containing processor class.
Copyright: | 2013 Frédéric Massart |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 390 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
tool_uploadcourse_processor:: (10 methods):
__construct()
execute()
get_course()
get_errors()
get_restore_content_dir()
log_error()
parse_line()
preview()
reset()
validate()
Class: tool_uploadcourse_processor - X-Ref
Processor class.__construct(csv_import_reader $cir, array $options, array $defaults = array() X-Ref |
Constructor param: csv_import_reader $cir import reader object param: array $options options of the process param: array $defaults default data value |
execute($tracker = null) X-Ref |
Execute the process. param: object $tracker the output tracker to use. return: void |
get_course($data) X-Ref |
Return a course import object. param: array $data data to import the course with. return: tool_uploadcourse_course |
get_errors() X-Ref |
Return the errors. return: array |
get_restore_content_dir() X-Ref |
Get the directory of the object to restore. return: string subdirectory in $CFG->backuptempdir/... |
log_error($errors) X-Ref |
Log errors on the current line. param: array $errors array of errors return: void |
parse_line($line) X-Ref |
Parse a line to return an array(column => value) param: array $line returned by csv_import_reader return: array |
preview($rows = 10, $tracker = null) X-Ref |
Return a preview of the import. This only returns passed data, along with the errors. param: integer $rows number of rows to preview. param: object $tracker the output tracker to use. return: array of preview data. |
reset() X-Ref |
Reset the current process. return: void. |
validate() X-Ref |
Validation. return: void |