MDL-16587 bit of a large refactor of the portfolio formats. still more to come.

This commit is contained in:
mjollnir_ 2008-10-11 17:33:20 +00:00
parent a813ddc975
commit 6be1dcae99
16 changed files with 295 additions and 141 deletions

View file

@ -275,11 +275,11 @@ class assignment_online extends assignment_base {
function portfolio_prepare_package($exporter, $userid=0) {
$submission = $this->get_submission($userid);
$exporter->write_new_file(format_text($submission->data1, $submission->data2), 'assignment.html');
$exporter->write_new_file(format_text($submission->data1, $submission->data2), 'assignment.html', false);
}
function portfolio_supported_formats() {
return array(PORTFOLIO_FORMAT_HTML);
return array(PORTFOLIO_FORMAT_PLAINHTML);
}
}

View file

@ -358,7 +358,7 @@ class assignment_upload extends assignment_base {
}
if (has_capability('mod/assignment:exportownsubmission', $this->context)) {
$button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id, 'file' => $file->get_id()), '/mod/assignment/lib.php');
$button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id, 'fileid' => $file->get_id()), '/mod/assignment/lib.php');
$button->set_formats(portfolio_format_from_file($file));
$output .= $button->to_html(PORTFOLIO_ADD_ICON_LINK);
}