CSV Grade importer.  
 More...
|  | 
|  | __construct ($importid, assign $assignment, $encoding='utf-8', $separator='comma') | 
|  | Constructor. 
 | 
|  | 
|  | close ($delete) | 
|  | Close the grade importer file and optionally delete any temp files. 
 | 
|  | 
|  | get_encoding () | 
|  | Return the encoding for this csv import. 
 | 
|  | 
|  | get_separator () | 
|  | Return the separator for this csv import. 
 | 
|  | 
|  | init () | 
|  | Initialise the import reader and locate the column indexes. 
 | 
|  | 
|  | next () | 
|  | Get the next row of data from the csv file (only the columns we care about) 
 | 
|  | 
|  | parsecsv ($csvdata) | 
|  | Parse a csv file and save the content to a temp file Should be called before init() 
 | 
|  | 
|  | 
| string | $importid | 
|  | $importid - unique id for this import operation - must be passed between requests 
 | 
|  | 
CSV Grade importer. 
- Copyright
- 2012 NetSpot  
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ __construct()
      
        
          | assignfeedback_offline_grade_importer::__construct | ( |  | $importid, | 
        
          |  |  | assign | $assignment, | 
        
          |  |  |  | $encoding = 'utf-8', | 
        
          |  |  |  | $separator = 'comma' ) | 
      
 
Constructor. 
- Parameters
- 
  
    | string | $importid | A unique id for this import |  | assign | $assignment | The current assignment |  
 
 
 
◆ close()
      
        
          | assignfeedback_offline_grade_importer::close | ( |  | $delete | ) |  | 
      
 
Close the grade importer file and optionally delete any temp files. 
- Parameters
- 
  
  
 
 
◆ get_encoding()
      
        
          | assignfeedback_offline_grade_importer::get_encoding | ( |  | ) |  | 
      
 
Return the encoding for this csv import. 
- Return values
- 
  
    | string | The encoding for this csv import. |  
 
 
 
◆ get_separator()
      
        
          | assignfeedback_offline_grade_importer::get_separator | ( |  | ) |  | 
      
 
Return the separator for this csv import. 
- Return values
- 
  
    | string | The separator for this csv import. |  
 
 
 
◆ init()
      
        
          | assignfeedback_offline_grade_importer::init | ( |  | ) |  | 
      
 
Initialise the import reader and locate the column indexes. 
- Return values
- 
  
    | bool | false is a failed import |  
 
 
 
◆ next()
      
        
          | assignfeedback_offline_grade_importer::next | ( |  | ) |  | 
      
 
Get the next row of data from the csv file (only the columns we care about) 
- Return values
- 
  
    | stdClass | or false The stdClass is an object containing user, grade and lastmodified |  
 
 
 
◆ parsecsv()
      
        
          | assignfeedback_offline_grade_importer::parsecsv | ( |  | $csvdata | ) |  | 
      
 
Parse a csv file and save the content to a temp file Should be called before init() 
- Parameters
- 
  
    | string | $csvdata | The csv data |  
 
- Return values
- 
  
    | bool | false is a failed import |  
 
 
 
The documentation for this class was generated from the following file: