|
string string | $importfilename |
| The original name of the import file name including extension of the file which data should be imported from.
|
|
string string | $importfilepath |
| The import file path of the file which data should be imported from.
|
|
string string | $importfiletype |
| $importfiletype The file type of the import file.
|
|
◆ get_added_records_messages()
mod_data\local\importer\csv_entries_importer::get_added_records_messages |
( |
| ) |
|
Getter for the array of messages for added records.
For each successfully added record the array contains a log message.
- Return values
-
array | Array of message strings: For each added record one message string |
◆ get_data_file_content()
mod_data\local\importer\entries_importer::get_data_file_content |
( |
| ) |
|
|
inherited |
Returns the file content of the data file.
Returns the content of the file directly if the entries_importer's file is a data file itself. If the entries_importer's file is a zip archive, the content of the first found data file in the zip archive's root will be returned.
- Return values
-
false|string | the data file content as string; false, if file cannot be found/read |
◆ get_file_content_from_zip()
mod_data\local\importer\entries_importer::get_file_content_from_zip |
( |
string | $filename, |
|
|
string | $zipsubdir = 'files/' ) |
|
inherited |
Returns the file content from a file which has been stored in the zip archive.
- Parameters
-
string | $filename | |
string | $zipsubdir | |
- Return values
-
false|string | the file content as string, false if the file could not be found/read |
◆ get_import_data_file_extension()
mod_data\local\importer\csv_entries_importer::get_import_data_file_extension |
( |
| ) |
|
◆ import_csv()
mod_data\local\importer\csv_entries_importer::import_csv |
( |
stdClass | $cm, |
|
|
stdClass | $data, |
|
|
string | $encoding, |
|
|
string | $fielddelimiter ) |
Import records for a data instance from csv data.
- Parameters
-
stdClass | $cm | Course module of the data instance. |
stdClass | $data | The data instance. |
string | $encoding | The encoding of csv data. |
string | $fielddelimiter | The delimiter of the csv data. |
- Exceptions
-
The documentation for this class was generated from the following file:
- mod/data/classes/local/importer/csv_entries_importer.php