mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-16587 bit of a large refactor of the portfolio formats. still more to come.
This commit is contained in:
parent
a813ddc975
commit
6be1dcae99
16 changed files with 295 additions and 141 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue