Commit d744be73 authored by Nigel Cunningham's avatar Nigel Cunningham
Browse files

Bug1363817: Show progress in title during bulkimport.php.



admin/users/bulkimport.php works one file at a time, with a page
reload for each user imported. It could probably do with a rewrite
to be more like bulkdownload. For now, though, give the user an
idea of the status via the page title.

Change-Id: I8f41e1889d9071930d049e4f51769fa1e760963b
Signed-off-by: default avatarNigel Cunningham <nigelc@catalyst-au.net>
parent 46b64552
......@@ -104,7 +104,11 @@ function meta_redirect() {
$SESSION->set('bulkimport_failedusers', $FAILEDUSERS);
$url = get_config('wwwroot') . '/admin/users/bulkimport.php';
print_meta_redirect($url);
$failed = sizeof($FAILEDUSERS) ? ' (' . sizeof($FAILEDUSERS) . ' failed)' : '';
$done = sizeof($FAILEDUSERS) + sizeof($ADDEDUSERS);
$total = $done + sizeof($LEAP2AFILES);
$title = "Completed {$done}/{$total}{$failed}";
print_meta_redirect($url, $title);
exit;
}
......
......@@ -123,8 +123,9 @@ function execute_javascript_and_close($js='') {
exit;
}
function print_meta_redirect($url) {
function print_meta_redirect($url, $title = 'Mahara Redirect') {
print '<html><head><meta http-equiv="Refresh" content="0; url=' . $url . '">';
print "<title>$title</title>";
print '</head><body><p>Please follow <a href="'.$url.'">link</a>!</p></body></html>';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment