Skip to content

Commit

Permalink
MDL-15935 - print a different message to the user when their portfoli…
Browse files Browse the repository at this point in the history
…o export has been queued
  • Loading branch information
mjollnir_ committed Aug 5, 2008
1 parent 294b492 commit 8f182ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions lang/en_utf8/portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
$string['enableddesc'] = 'This will allow administrators to configure remote systems for users to export content to';
$string['exporting'] = 'Exporting to portfolio';
$string['exportcomplete'] = 'Portfolio export complete!';
$string['exportqueued'] = 'Portfolio export has been successfully queued for transfer';
$string['exportedpreviously'] = 'Previous exports';
$string['failedtosendpackage'] = 'Failed to send your data to the selected portfolio system!';
$string['format_file'] = 'File';
Expand Down
12 changes: 7 additions & 5 deletions lib/portfoliolib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1924,10 +1924,9 @@ public function process_stage_queueorwait() {
global $SESSION;
$wait = $this->instance->get_export_config('wait');
if (empty($wait)) {
error_log(print_r(serialize($this), true));
events_trigger('portfolio_send', $this);
unset($SESSION->portfolio);
return $this->process_stage_finished();
return $this->process_stage_finished(true);
}
return true;
}
Expand Down Expand Up @@ -2001,15 +2000,18 @@ public function process_stage_send() {
*
* @return boolean whether or not to process the next stage. this is important as the control function is called recursively.
*/
public function process_stage_finished() {
public function process_stage_finished($queued=false) {
global $SESSION;
$returnurl = $this->caller->get_return_url();
$continueurl = $this->instance->get_continue_url();
$extras = $this->instance->get_extra_finish_options();

$this->print_header();
//@todo do something different here if we're queueing.
print_heading(get_string('exportcomplete', 'portfolio'));
if ($queued) {
print_heading(get_string('exportqueued', 'portfolio'));
} else {
print_heading(get_string('exportcomplete', 'portfolio'));
}
if ($returnurl) {
echo '<a href="' . $returnurl . '">' . get_string('returntowhereyouwere', 'portfolio') . '</a><br />';
}
Expand Down

0 comments on commit 8f182ee

Please sign in to comment.