if ($this->is_directory()) {
$filepath = $this->lf->get_filepath();
$fs = get_file_storage();
- $storedfiles = $fs->get_area_files($this->context->id, $this->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid(), "");
+ $storedfiles = $fs->get_area_files($this->context->id, $this->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid());
foreach ($storedfiles as $file) {
if (strpos($file->get_filepath(), $filepath) === 0) {
$file->delete();
*/
public function get_tempfiles($skipfile='portfolio-export.zip') {
$fs = get_file_storage();
- $files = $fs->get_area_files(SYSCONTEXTID, 'portfolio', 'exporter', $this->id, '', false);
+ $files = $fs->get_area_files(SYSCONTEXTID, 'portfolio', 'exporter', $this->id, 'sortorder, itemid, filepath, filename', false);
if (empty($files)) {
return array();
}
$fs = get_file_storage();
- $files = $fs->get_area_files($context->id, 'mod_scorm', 'content', 0, '', false);
+ $files = $fs->get_area_files($context->id, 'mod_scorm', 'content', 0, 'sortorder, itemid, filepath, filename', false);
$version = 'AICC';
$ids = array();