Skip to content
Permalink
Browse files

MDL-14591 - notice to user if the remote system has forced queueing

  • Loading branch information...
mjollnir_
mjollnir_ committed Sep 1, 2008
1 parent aed2937 commit f1ebc1926e9b94d5cc2d95647a5d4388c9c24775
Showing with 10 additions and 0 deletions.
  1. +1 −0 lang/en_utf8/portfolio.php
  2. +9 −0 lib/portfoliolib.php
@@ -23,6 +23,7 @@
$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!';
@@ -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 @@ public function process_stage_config() {
} 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 @@ public function process_stage_config() {
);
$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 @@ public function process_stage_finished($queued=false) {
$key = 'exportcomplete';
if ($queued) {
$key = 'exportqueued';
if ($this->forcequeue) {
$key = 'exportqueuedforced';
}
}
$this->print_header($key, false);
if ($returnurl) {

0 comments on commit f1ebc19

Please sign in to comment.
You can’t perform that action at this time.