]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14591 - notice to user if the remote system has forced queueing
authormjollnir_ <mjollnir_>
Mon, 1 Sep 2008 14:07:29 +0000 (14:07 +0000)
committermjollnir_ <mjollnir_>
Mon, 1 Sep 2008 14:07:29 +0000 (14:07 +0000)
lang/en_utf8/portfolio.php
lib/portfoliolib.php

index d4131c11cabfb82f1a09bf5f158abfb5018265a0..a6b45a79162644d2e1344bc71fe3f0c199422f68 100644 (file)
@@ -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!';
index ffa2aa9555c10fd60b94ab498113d9a5e0ec4b61..9b4c1ec5e90bd247dbabe87dcca12f98ecc9d4ca 100644 (file)
@@ -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) {