94 Commits

Author SHA1 Message Date
Rossco Hellmans
383b0f95ab MDL-64310 backup: allow session to be released during backup/restore
Amended to fix a wrong call to backup_controller() constructor,
originally not passing USER->id
2020-01-14 23:54:42 +01:00
Matt Porritt
698222f6cb MDL-66225 Backup: fix irrecoverable state
Fix condition where if an asynchronous backup
completes via the UI and the user refreshes the
page a new backup was created with a mismatched
backup id.
This caused a permanently failing ad-hoc task
and blocked further backups for that course.
2019-10-23 04:20:00 +00:00
Mark Nelson
420384ae36 MDL-35773 core_backup: removed unnecessary set_samesite_notification() 2019-07-26 11:59:56 +08:00
Mark Nelson
8e83e54815 MDL-35773 core_backup: removed introduction of 'set_mode' 2019-07-26 11:59:56 +08:00
Matt Porritt
d7e4481e98 MDL-35773 Backup: API should have option to not backup files
Allow both UI and automated backups to be created without
including files.  Instead include only file references.
This is essentially implementing "SAMESITE" to backup files
instead of only for import and export functionality.
A new backup setting to include files (defaults to yes)
has been included.

The restore process will also look for and attempt to
restore files from the trashdir as part of restoring
backups.  Additionally to support this process the
ammount of time files are kept in trashdir before they
are cleaned up via cron is also adjustable via admin
setting.
2019-07-26 11:59:56 +08:00
Matt Porritt
2cd901a4e7 MDL-28505 Backup: Asynchronous backup and restore
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.
2019-04-09 00:15:42 +00:00
Damyon Wiese
ddd7ff1827 MDL-43334 backup: Lanuage for cancel
Cancel backup buttons need clear lang strings.
2018-07-09 12:17:18 +08:00
Daniel Thee Roperto
ef8ceb2fc2 MDL-57809 weblib: Added missing NO_OUTPUT_BUFFERING directive. 2017-06-23 09:43:07 +10:00
Daniel Thee Roperto
6eaa9d2ffb MDL-57809 weblib: Added opening disclaimer and file-level phpdocs. 2017-06-23 09:43:07 +10:00
Mark Nelson
d14ba3a2f4 MDL-52940 core_backup: prevent always displaying logs 2016-02-01 12:43:53 +08:00
James Pratt
809fdb83b1 MDL-41754 (1) Progress tracking : moved from backup and restore to core 2014-01-27 17:45:50 +07:00
sam marshall
40e8f0260c MDL-42815 Backup/restore: Error saving files - log messages unhelpful
This commit contains three changes in the three files:
1. A bug in the backup process meant that anything logged after a
   certain point did not appear in the on-screen display of the
   backup log, because the logger was serialised and deserialised
   but display code referred to the old version. Changed so that
   code retrieves new object.
2. Add more information to backup log when there is a missing file.
3. Add more information to restore log when there is a missing file
   (and remove existing code duplication of the current message).

The 'missing file' situation is one that generally shouldn't occur in
normal usage, but when it does happen, it is useful to have full
information about the file.
2013-11-11 17:15:32 +00:00
Damyon Wiese
f0ae8d7a66 Merge branch 'MDL-38196-master' of git://github.com/sammarshallou/moodle
Conflicts:
	backup/backup.php
	theme/bootstrapbase/style/moodle.css
2013-10-10 09:31:33 +08:00
sam marshall
77b3d9dfdf MDL-38196 Backup/restore: Display log if non-empty
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).
2013-10-08 11:00:11 +01:00
sam marshall
e555a4439f MDL-41722 Backup: Very large course times out on user interface pages
Adds 'Preparing page display' progress bars for user interface pages
if they take a long time to display.

Also adds changes where other parts of the backup progress timed out on
long backups. After this change, and MDL-41838, it is finally possible on
my dev server to successfully back up the 'XL' test course.
2013-10-04 10:32:13 +01:00
sam marshall
f06abc2ac1 MDL-38190 (3) Backup/restore: Progress display in main user interface 2013-08-16 16:28:04 +01:00
sam marshall
975f8442c9 MDL-38191 Backup/restore: Should use large memory limit 2013-08-09 11:01:14 +01:00
Jason Fowler
c8d1e4aa8c MDL-35056 - Backup/Restore - Converting the 'Unmet Dependencies' Message to be a Developer Debug message to make moodle less confusing to the average user 2012-12-18 09:58:53 +13:00
Adrian Greeve
a689cd1def MDL-34469 - lib - replacement of the deprecated get_context_instance and get_context_by_id functions (group 15) 2012-07-30 14:59:57 +08:00
Tim Hunt
ff5d6f8872 MDL-33682 backup: cope with sections called '0'
It was not previously possible to have a section called 0 because of
bugs in the standard course formats, but we hit this with the OU course
format. You got an exception because backup settings tested to see if
their lable was empty, which means a section name of '0' was fatal.
Should work now.
2012-06-12 17:46:47 +01:00
Petr Skoda
748e96512b MDL-32095 fix backup API to be E_STRICT compatible 2012-03-26 16:04:16 +02:00
Sam Hemelryk
71e0b3b5c7 MDL-29188 multilang Reviewed the uses of section name and ensured things were being formatted consistently 2011-09-08 09:27:38 +12:00
Sam Hemelryk
44bb101dfe backup MDL-24962 Backup, Restore, and Import all now explicitly destroy the UI, controller, and stage objects upon completion. 2010-11-18 02:09:23 +00:00
Sam Hemelryk
4886029cba backup MDL-22142 Several changes to the backup UI and it's classes as noted below
*  backup moodleforms for specific stages are now cached between stage processing and display making it possible to leave all validation up to the bridge.
    * The backup stage now relies entirely on the backup controllers save, load, and check methods + dependency checks rather then previous stage processing to ensure accuracy.
    * filename is now a required field and validated to ensure it ends with .zip and is a valid filename.
    * There is now a previous button for backup stages after the initial and before the complete.
    * The progress bar previous stages are now links as well allowing the user to jump to previous stages (not linked on complete of course).
    * The root settings are only shown on the schema stage now if they were changed because of dependency.
    * Stages are now numbered in the progress bar.
    * The complete page now shows a notice that the backup was complete and provides a continue button to view the backup file.
    * Adds administration blocks to the backup pages.
2010-05-10 02:53:31 +00:00
Sam Hemelryk
8c6d7f34ed backup MDL-22142 P19 - Moved optional_param call for backupid out of load controller static method and into backup.php 2010-05-02 03:36:26 +00:00
Sam Hemelryk
105f805c01 backup MDL-22142 P15 - Backup.php now adds meaningful heading 2010-05-02 03:08:56 +00:00
Sam Hemelryk
9c27e9ab11 backup MDL-22142 P10 - Backup.php now checks more backup capabilities 2010-05-02 02:35:01 +00:00
Sam Hemelryk
a2190f5c22 backup MDL-22142 P9 - Properly check section/cm in backup.php 2010-05-02 02:25:26 +00:00
Sam Hemelryk
1904e9b35b backup MDL-22142 This is the user interface for backups, several minor/cosmetic issues still to be ironed out. See the tracker for details 2010-05-01 09:51:39 +00:00
Eloy Lafuente
d294000348 MDL-21666 backup & restore caps - moving to new naming schema. More to come. 2010-02-19 17:50:14 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
Petr Skoda
7e7089e359 MDL-20901 fixed input validation 2009-11-19 18:11:14 +00:00
Petr Skoda
795b694516 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 15:39:15 +00:00
Petr Skoda
2a250a0b2e MDL-20697 removing duplicate error string cannotfindsite, fixing get_site() which is now using exceptions 2009-11-01 09:21:41 +00:00
samhemelryk
e6a40d2231 backup MDL-19789 Added set_url calls 2009-10-15 03:05:35 +00:00
samhemelryk
67c351d2d8 backup MDL-19789 Updated print_header and build_navigation to OUTPUT and PAGE equivalents 2009-09-07 06:18:27 +00:00
skodak
92ebcabeb3 MDL-20169 fixed coding style, parameter type required 2009-08-27 19:14:45 +00:00
nicolasconnault
9549b98659 MDL-19789 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 04:29:16 +00:00
nicolasconnault
3474860fa0 MDL-19789 Converted all print_footer() calls 2009-08-06 14:23:15 +00:00
nicolasconnault
e11adf4884 MDL-19789 Migrated calls to print_heading 2009-08-06 08:19:03 +00:00
tjhunt
93d4a373f9 blocklib: MDL-19010 always include blocklib in setup.php, stip includes elsewhere 2009-05-06 09:13:16 +00:00
skodak
f1953d38f3 MDL-17847 moved backup install.xml and upgrade.php to core 2009-01-10 20:03:08 +00:00
skodak
93f66983cc MDL-17773 new get_login_url() function - fixes missing httpslogin tweaks 2009-01-02 22:56:48 +00:00
skodak
ad4375ac7f MDL-14679 towards /backup conversion 2008-06-01 14:46:48 +00:00
dongsheng
a4f9dc75da MDL-14129, fix misuse string 2008-04-23 01:53:30 +00:00
dongsheng
fa6086a84b MDL-14129, fix print_error 2008-04-22 08:52:25 +00:00
dongsheng
5a2a53316f MDL-14129, remove all the other error() call 2008-04-04 02:54:20 +00:00
skodak
fbb51be65a cosmetic fix for CONTEXT:SYSTEM fetching; merged from MOODLE_19_STABLE 2008-03-08 15:36:52 +00:00
nicolasconnault
e295df447f MDL-10870 All files updated to new build_navigation() method. 2007-08-17 11:18:58 +00:00
moodler
f12621d332 Fixed course theme MDL-10833 2007-08-13 13:36:52 +00:00