]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16587 portfolio export formats - support straight file export not just RICHHTML...
authormjollnir_ <mjollnir_>
Tue, 11 Nov 2008 19:54:50 +0000 (19:54 +0000)
committermjollnir_ <mjollnir_>
Tue, 11 Nov 2008 19:54:50 +0000 (19:54 +0000)
lang/en_utf8/portfolio.php
mod/data/lib.php
mod/forum/lib.php
portfolio/type/boxnet/lib.php

index 8b4ef3d011a8e598869d88a356d49f6138017620..f957c94d8e23559e45bb309f7510bb6b570f9c5e 100644 (file)
@@ -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';
index d097bc337495cf38d26c60d364b2c1bf4773b8e6..861e5fdc782781498671573fffdbe4cfb78098e4 100755 (executable)
@@ -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);
     }
index 7b82ca4d8372c5e1f002e017f0b1d1bfda3e2114..31e34a5abcd171bcb34fab1f6013c6d6ed7f6c7a 100644 (file)
@@ -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);
         }
index 91668a82f0367f9bd45b634fcd144122a8e32556..0763c9f525d4a75590154aa219c90520875d9737 100644 (file)
@@ -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
+    }
 }