$string['filedenied'] = 'Access denied to this file';
$string['filenotfound'] = 'File not found';
$string['format_file'] = 'File';
-$string['format_html'] = 'HTML';
+$string['format_richhtml'] = 'HTML with attachments';
+$string['format_plainhtml'] = 'HTML';
$string['format_image'] = 'Image';
$string['format_mbkp'] = 'Moodle Backup Format';
$string['format_video'] = 'Video';
if (count($includedfiles) == 1 && count($fields) == 1) {
$formats= array(portfolio_format_from_file($includedfiles[0]));
} else if (count($includedfiles) > 0) {
- $formats = array(PORTFOLIO_FORMAT_RICHHTML);
+ $formats = array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_RICHHTML);
}
return array($formats, $includedfiles);
}
if (empty($attachments)) {
$button->set_formats(PORTFOLIO_FORMAT_PLAINHTML);
} else {
- $button->set_formats(PORTFOLIO_FORMAT_RICHHTML);
+ $button->set_formats(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_RICHHTML);
}
$commands[] = $button->to_html(PORTFOLIO_ADD_TEXT_LINK);
}
if ($this->attachment) {
// do nothing
} else if (!empty($this->multifiles) || !empty($this->singlefile)) {
- $this->supportedformats = array(PORTFOLIO_FORMAT_RICHHTML);
+ $this->supportedformats = array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_RICHHTML);
} else {
$this->supportedformats = array(PORTFOLIO_FORMAT_PLAINHTML);
}
public static function allows_multiple() {
return false;
}
+
+ public static function supported_formats() {
+ return array(PORTFOLIO_FORMAT_FILE); // don't support rich html, it breaks links
+ }
}