MDL-15666 - change all the portfolio plugins and callers to use exceptions

rather than relying on return values (send_package and prepare_package)

move zipping of temporary files into the exporter class so it can be overridden during unit tests

fix a small todo in mahara plugin
This commit is contained in:
mjollnir_
2008-09-12 11:22:15 +00:00
parent 9176976151
commit 37f03ea00b
11 changed files with 60 additions and 55 deletions
-1
View File
@@ -3200,7 +3200,6 @@ class assignment_portfolio_caller extends portfolio_module_caller_base {
foreach ($this->files as $file) {
$this->exporter->copy_existing_file($file);
}
return true;
}
public function get_sha1() {
@@ -275,7 +275,7 @@ class assignment_online extends assignment_base {
function portfolio_prepare_package($exporter, $userid=0) {
$submission = $this->get_submission($userid);
return $exporter->write_new_file(format_text($submission->data1, $submission->data2), 'assignment.html');
$exporter->write_new_file(format_text($submission->data1, $submission->data2), 'assignment.html');
}
function portfolio_supported_formats() {