Júlia, from the PX team, has suggested a few improvements to make it easier to
understand the Restore main page:
- Displaying a notification instead of the empty table when there are no files
in an area.
- Improve the copy, removing the help buttons and moving this information to the
main page.
- Replacing "Import a backup file" with "Upload a backup file".
- Adding some space between the different areas.
- Displaying a different text in the different "Manage backup files" buttons.
The backup/view.php page has been created to display the list of
course reuse actions available for users.
That way, the "Course reuse" option in the secondary navigation
will display this page instead of redirecting to the first action
available.
Apart from that, the headers for all the Course reuse actions have
been homogenised and the tertiary navigation selector has been included,
to replace headers and make it easier navigate between actions.
The Course backup area was not displaying the course backups when
accessing to the Restore page for an activity because the context
was not updated properly for this area.
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.
The new setting will allow to host the temporary backup files
into a specific target directory. Defaults to '$CFG->tempdir/backup'.
Calling make_backup_temp_directory() checks that the required sub-directory
will be properly created under the new target directory.
- added relevant cap check on restorefile.php to improve the error
message when attempting to restore automated backups. This cap is
already responsible for controlling restores from automated areas.
- Restored the 'viewautomatedfilearea' capabilities original lang
string.
dirname() is a slow function compared with __DIR__ and using
'/../'. Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code. This allows those required includes to perform as
best as possible in this situation.
Change the start of restore process so that the archive file can
be passed as a pathnamehash pointing to the Moodle file object,
rather than only as a filename in the temporary directory. This
avoids making an unnecessary copy of the archive file, which can
take a long time (and potentially cause a timeout) in the case
of multi-gigabyte backups.
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.