From: mjollnir_ Date: Mon, 1 Sep 2008 14:07:29 +0000 (+0000) Subject: MDL-14591 - notice to user if the remote system has forced queueing X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f1ebc1926e9b94d5cc2d95647a5d4388c9c24775;p=moodle.git MDL-14591 - notice to user if the remote system has forced queueing --- diff --git a/lang/en_utf8/portfolio.php b/lang/en_utf8/portfolio.php index d4131c11ca..a6b45a7916 100644 --- a/lang/en_utf8/portfolio.php +++ b/lang/en_utf8/portfolio.php @@ -23,6 +23,7 @@ $string['exporting'] = 'Exporting to portfolio'; $string['exportingcontentfrom'] = 'Exporting content from $a'; $string['exportcomplete'] = 'Portfolio export complete!'; $string['exportqueued'] = 'Portfolio export has been successfully queued for transfer'; +$string['exportqueuedforced'] = 'Portfolio export has been successfully queued for transfer (the remote system has enforced queued transfers)'; $string['exportedpreviously'] = 'Previous exports'; $string['exportexceptionnoexporter'] = 'A portfolio_export_exception was thrown with an active session but no exporter object'; $string['failedtosendpackage'] = 'Failed to send your data to the selected portfolio system!'; diff --git a/lib/portfoliolib.php b/lib/portfoliolib.php index ffa2aa9555..9b4c1ec5e9 100644 --- a/lib/portfoliolib.php +++ b/lib/portfoliolib.php @@ -1825,6 +1825,8 @@ final class portfolio_exporter { private $stage; + private $forcequeue; + /** * id of this export * matches record in portfolio_tempdata table @@ -2014,6 +2016,7 @@ final class portfolio_exporter { } else if ($expectedtime == PORTFOLIO_TIME_FORCEQUEUE) { $pluginbits['wait'] = 0; $pluginbits['hidewait'] = 1; + $this->forcequeue = true; } $callerbits['hideformat'] = $pluginbits['hideformat'] = (count($formats) == 1); $this->caller->set_export_config($callerbits); @@ -2038,6 +2041,9 @@ final class portfolio_exporter { ); $this->instance->set_export_config($config); $this->caller->set_export_config(array('format' => $format, 'hideformat' => 1)); + if ($expectedtime == PORTFOLIO_TIME_FORCEQUEUE) { + $this->forcequeue = true; + } return true; // do not break - fall through to confirm } @@ -2197,6 +2203,9 @@ final class portfolio_exporter { $key = 'exportcomplete'; if ($queued) { $key = 'exportqueued'; + if ($this->forcequeue) { + $key = 'exportqueuedforced'; + } } $this->print_header($key, false); if ($returnurl) {