mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 09:55:33 +02:00
MDL-16587 portfolio export formats - support straight file export not just RICHHTML (html + attachments) , it doesn't make sense in things like box.net
This commit is contained in:
parent
1ab172856d
commit
62e7195480
@ -41,7 +41,8 @@ $string['failedtopackage'] = 'Could not find files to package';
|
||||
$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';
|
||||
|
@ -2767,7 +2767,7 @@ class data_portfolio_caller extends portfolio_module_caller_base {
|
||||
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);
|
||||
}
|
||||
|
@ -3184,7 +3184,7 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
|
||||
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);
|
||||
}
|
||||
@ -7300,7 +7300,7 @@ class forum_portfolio_caller extends portfolio_module_caller_base {
|
||||
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);
|
||||
}
|
||||
|
@ -243,4 +243,8 @@ class portfolio_plugin_boxnet extends portfolio_plugin_push_base {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user