There are inherent issues with task blocking which mean that it has
never worked properly. It is also very buggy and can lead to massive
performance issues with task processing.
It is almost impossible to deprecate this in a staged fashion because
various APIs use the methods and it is not possible to determine which
are API uses and which are other valid uses.
In reality there has been little-to-no uptake on the use of this feature
and it should just be removed.
These pages sit under the 'restore' and 'copy' menu items respectively
but the selected menu item isn't correct because the 'restore.php' and
'copyprogress.php' page URLs don't match the node action for their
respective 'restore' and 'copy' nodes. Force set the selected node in
each case to resolve this.
This patch adds asynchronous backup and restore functionality
to Moodle. This is an optional feature and is not enabled by
default. It can be enabled by site administrators.
Asynchronous backup and restores are actioned by the Moodle
adhoc task API. The progress of backup and restores is
displayedin the Moodle UI. Users can also be sent a message
when a backup or restore operation completes via the
Moodle messaging API.
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