|
Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Data preset importer for uploaded presets. More...
Public Member Functions | |
| __construct ($course, $cm, $module, $filepath) | |
| Constructor. More... | |
| cleanup () | |
| Any clean up routines should go here. More... | |
| data_preset_get_file_contents (&$filestorage, &$fileobj, $dir, $filename) | |
| Retreive the contents of a file. More... | |
| get_directory () | |
| Returns the name of the directory the preset is located in. More... | |
| moodle_database | get_preset_settings () |
| Gets the preset settings $DB. More... | |
| import ($overwritesettings) | |
| Import the preset into the given database module. More... | |
Protected Attributes | |
| $cm | |
| $course | |
| $directory | |
| $module | |
Data preset importer for uploaded presets.
| data_preset_upload_importer::__construct | ( | $course, | |
| $cm, | |||
| $module, | |||
| $directory | |||
| ) |
Constructor.
| stdClass | $course | |
| stdClass | $cm | |
| stdClass | $module | |
| string | $directory |
Reimplemented from data_preset_importer.
| data_preset_upload_importer::cleanup | ( | ) |
|
inherited |
Retreive the contents of a file.
That file may either be in a conventional directory of the Moodle file storage
| file_storage | $filestorage,. | should be null if using a conventional directory |
| stored_file | $fileobj | the directory to look in. null if using a conventional directory |
| string | $dir | the directory to look in. null if using the Moodle file storage |
| string | $filename | the name of the file we want |
| string | the contents of the file or null if the file doesn't exist. |
|
inherited |
Returns the name of the directory the preset is located in.
| string |
|
inherited |
Gets the preset settings $DB.
| stdClass |
|
inherited |
Import the preset into the given database module.
| bool |