]> git.mjollnir.org Git - moodle.git/commitdiff
portfolio NOBUG added some more helpful debugging information about common formats
authorPenny Leach <penny@liip.ch>
Thu, 19 Nov 2009 07:02:15 +0000 (07:02 +0000)
committerPenny Leach <penny@liip.ch>
Thu, 19 Nov 2009 07:02:15 +0000 (07:02 +0000)
lang/en_utf8/portfolio.php
lib/portfolio/exporter.php

index 3cf2f806e0627a465150dbf2385264c039a28acf..0e93ccf4ed251a23c9f330e8331d10352264a476 100644 (file)
@@ -93,6 +93,7 @@ $string['logs'] = 'Transfer logs';
 $string['logsummary'] = 'Previous successful transfers';
 $string['manageportfolios'] = 'Manage portfolios';
 $string['manageyourportfolios'] = 'Manage your portfolios';
+$string['mimecheckfail'] = 'The portfolio plugin $a->plugin doesn\'t support that mimetype $a->mimetype';
 $string['missingcallbackarg'] = 'Missing callback argument $a->arg for class $a->class';
 $string['moderatefilesizethreshold'] = 'Moderate transfer filesize';
 $string['moderatefilesizethresholddesc'] = 'Filesizes over this threshold will be considered to take a moderate amount of time to transfer';
@@ -103,7 +104,7 @@ $string['mustsetcallbackoptions'] = 'You must set the callback options either in
 $string['noavailableplugins'] = 'Sorry, but there are no available portfolios for you to export to';
 $string['nocallbackfile'] = 'Something in the module you\'re trying to export from is broken - couldn\'t find a required file ($a)';
 $string['nocallbackclass'] = 'Could not find the callback class to use ($a)';
-$string['nocommonformats'] = 'No common formats between any available portfolio plugin and the calling location $a';
+$string['nocommonformats'] = 'No common formats between any available portfolio plugin and the calling location $a->location (caller supported $a->formats)';
 $string['noclassbeforeformats'] = 'You must set the callback class before calling set_formats in portfolio_button';
 $string['noinstanceyet'] = 'Not yet selected';
 $string['nologs'] = 'There are no logs to display!';
index ed08e048ada2912ef701e3a88697843cff01ebde..8935dfedfe22121d88dd06112dc2af720ef592c9 100644 (file)
@@ -291,7 +291,7 @@ class portfolio_exporter {
         $expectedtime = $this->instance->expected_time($this->caller->expected_time());
         if (count($formats) == 0) {
             // something went wrong, we should not have gotten this far.
-            throw new portfolio_export_exception($this, 'nocommonformats', 'portfolio', null, get_class($this->caller));
+            throw new portfolio_export_exception($this, 'nocommonformats', 'portfolio', null, array('location' => get_class($this->caller), 'formats' => implode(',', $formats)));
         }
         // even if neither plugin or caller wants any config, we have to let the user choose their format, and decide to wait.
         if ($pluginobj || $callerobj || count($formats) > 1 || ($expectedtime != PORTFOLIO_TIME_LOW && $expectedtime != PORTFOLIO_TIME_FORCEQUEUE)) {