return get_string('pluginname', 'portfolio_download');
}
+ public function steal_control($stage) {
+ if ($stage == PORTFOLIO_STAGE_FINISHED) {
+ return $this->get_base_file_url();
+ }
+ return false;
+ }
+
public static function allows_multiple() {
return false;
}
public function prepare_package() {
$files = $this->exporter->get_tempfiles();
+
+ if (count($files) == 1) {
+ $this->set('file', array_shift($files));
+ return true;
+ }
+
$zipper = new zip_packer();
$filename = 'portfolio-export.zip';
return true;
}
- public function get_extra_finish_options() {
- global $CFG;
- return array($CFG->wwwroot . '/portfolio/file.php?id=' . $this->exporter->get('id') => get_string('downloadfile', 'portfolio_download'));
- }
-
public function verify_file_request_params($params) {
// for download plugin the only thing we need to verify is that
// the logged in user is the same as the exporting user