In the case of a very large backup with many activities, simply loading
the restore controller (specifically, building the plan) can take a long
time and cause timeouts. This change adds progress reporting while the
restore controller is being loaded.
(This also reduces the time between first going to the page, and the
progress bar appearing, making a slightly better user experience.)
Conflicts:
backup/restore.php
When doing a backup or restore operation with the normal user interface,
if there is anything in the backup/restore log, it will now be displayed
at the end of the process below the Continue button.
If you have developer debugging enabled, it sets the display level to
LOG_DEBUG and there will always be content in the log. Otherwise, it
uses LOG_INFO which generally means the log is empty, and nothing
displays (no visible change for users).
Unfortunately it isn't possible to display the current stage before
printing header any more, because we need to be able to show a
progress bar while doing the code that considers whether or not
priunt stage. So this change removes stage information from page
title. It is still present (in bold) in the strip that shows where
you are within the restore/import.
This display was inconsistent anyway; change makes it consistent
between Restore and Import.
1. Changes progress bar code to allow headings for progress bar (so users have
some clue what's going on if a page has more than one progress bar).
2. Changes restore code so that a progress bar can display during pre-checks if
they take longer than 5 seconds.
3. Changes pre-check and restore code so that, in various points where the system
can take a long time within an individual step, intederminate progress is
indicated and it won't time out.
With this initial implementation, we do not display any information
about the backup contents yet. The non-standard backup file is just
silently converted at the beginning of the settings stage, as soon as
the restore controller is available.
In the future we will probably want to display the information about the
contents of the converted file as if we were restoring from standard
MBZ format. However this includes more work in the restore UI machinery
and I leave it open for now.
The course import now makes use of the backup and restore processed and the backup UI to allow the user to import one course into another.
The new UI is much the same as the backup ui except preceeded by a course selector to choose the course to import from.
* Root settings are now check boxes rather than selects
* Language strings adjusted as requested
* Final continue on backup now redirecteds to restore pre ui
* Category + course selectors now perform required capability checks
* Show/Hide settings from UI tested and implemented for overwrite_conf setting
* Final continue button is GET rather than post
* Temp zip file is deleted after successfull extraction
* Removed previous button from settings stage MDL-23480
/admin/. For teachers this gives an ugly access denied message,
so instead send them back to the course they came from.
Thanks to Wen Hao Chuang for the fix!
merged from MOODLE_19_STABLE