public function extract_files_from_zip($zipfile, $contextid) {
        global $USER;

        $feedbackfilesupdated = 0;
        $feedbackfilesadded = 0;
        $userswithnewfeedback = array();

        // Unzipping a large zip file is memory intensive.
        raise_memory_limit(MEMORY_EXTRA);

        $packer = get_file_packer('application/zip');
        core_php_time_limit::raise(ASSIGNFEEDBACK_FILE_MAXFILEUNZIPTIME);

        return $packer->extract_to_storage($zipfile,
                                    $contextid,
                                    'assignfeedback_file',
                                    ASSIGNFEEDBACK_FILE_IMPORT_FILEAREA,
                                    $USER->id,
                                    'import');

    }
public function extract_files_from_zip($zipfile, $contextid) {
        global $USER;

        $feedbackfilesupdated = 0;
        $feedbackfilesadded = 0;
        $userswithnewfeedback = array();

        // Unzipping a large zip file is memory intensive.
        raise_memory_limit(MEMORY_EXTRA);

        $packer = get_file_packer('application/zip');
        core_php_time_limit::raise(ASSIGNFEEDBACK_FILE_MAXFILEUNZIPTIME);

        return $packer->extract_to_storage($zipfile,
                                    $contextid,
                                    'assignfeedback_file',
                                    ASSIGNFEEDBACK_FILE_IMPORT_FILEAREA,
                                    $USER->id,
                                    'import');

    }
public function extract_files_from_zip ( $ zipfile , $ contextid ) { global $ USER ; $ feedbackfilesupdated = 0 ; $ feedbackfilesadded = 0 ; $ userswithnewfeedback = array ( ) ; // Unzipping a large zip file is memory intensive. raise_memory_limit ( MEMORY_EXTRA ) ; $ packer = get_file_packer ( 'application/zip' ) ; core_php_time_limit :: raise ( ASSIGNFEEDBACK_FILE_MAXFILEUNZIPTIME ) ; return $ packer -> extract_to_storage ( $ zipfile , $ contextid , 'assignfeedback_file' , ASSIGNFEEDBACK_FILE_IMPORT_FILEAREA , $ USER -> id , 'import' ) ; }
Extract the uploaded zip to a temporary import area for this user

@param stored_file $zipfile The uploaded file
@param int $contextid The context for this assignment
@return bool - True if the files were unpacked
Extract the uploaded zip to a temporary import area for this user