Processor class.  
 More...
Processor class. 
- Copyright
- 2013 Frédéric Massart 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ __construct()
      
        
          | tool_uploadcourse_processor::__construct | ( | csv_import_reader | $cir, | 
        
          |  |  | array | $options, | 
        
          |  |  | array | $defaults = array() | 
        
          |  | ) |  |  | 
      
 
Constructor. 
- Parameters
- 
  
    | csv_import_reader | $cir | import reader object |  | array | $options | options of the process |  | array | $defaults | default data value |  
 
 
 
◆ execute()
      
        
          | tool_uploadcourse_processor::execute | ( |  | $tracker = null | ) |  | 
      
 
Execute the process. 
- Parameters
- 
  
    | object | $tracker | the output tracker to use. |  
 
- Return values
- 
  
  
 
 
◆ get_course()
  
  | 
        
          | tool_uploadcourse_processor::get_course | ( |  | $data | ) |  |  | protected | 
 
Return a course import object. 
- Parameters
- 
  
    | array | $data | data to import the course with. |  
 
- Return values
- 
  
  
 
 
◆ get_errors()
      
        
          | tool_uploadcourse_processor::get_errors | ( |  | ) |  | 
      
 
Return the errors. 
- Return values
- 
  
  
 
 
◆ get_restore_content_dir()
  
  | 
        
          | tool_uploadcourse_processor::get_restore_content_dir | ( |  | ) |  |  | protected | 
 
Get the directory of the object to restore. 
- Return values
- 
  
    | string | subdirectory in $CFG->backuptempdir/... |  
 
 
 
◆ log_error()
  
  | 
        
          | tool_uploadcourse_processor::log_error | ( |  | $errors | ) |  |  | protected | 
 
Log errors on the current line. 
- Parameters
- 
  
    | array | $errors | array of errors |  
 
- Return values
- 
  
  
 
 
◆ parse_line()
  
  | 
        
          | tool_uploadcourse_processor::parse_line | ( |  | $line | ) |  |  | protected | 
 
Parse a line to return an array(column => value) 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ preview()
      
        
          | tool_uploadcourse_processor::preview | ( |  | $rows = 10, | 
        
          |  |  |  | $tracker = null | 
        
          |  | ) |  |  | 
      
 
Return a preview of the import. 
This only returns passed data, along with the errors.
- Parameters
- 
  
    | integer | $rows | number of rows to preview. |  | object | $tracker | the output tracker to use. |  
 
- Return values
- 
  
  
 
 
◆ reset()
      
        
          | tool_uploadcourse_processor::reset | ( |  | ) |  | 
      
 
Reset the current process. 
- Return values
- 
  
  
 
 
◆ validate()
  
  | 
        
          | tool_uploadcourse_processor::validate | ( |  | ) |  |  | protected | 
 
Validation. 
- Return values
- 
  
  
 
 
◆ UPDATE_NOTHING
      
        
          | const tool_uploadcourse_processor::UPDATE_NOTHING = 0 | 
      
 
During update, do not update anything... 
O_o Huh?! 
 
 
The documentation for this class was generated from the following file: