30 Commits

Author SHA1 Message Date
Marina Glancy
44e86fb3d5 MDL-34859 backup: add restore defaults 2017-03-20 14:59:45 +08:00
Marina Glancy
92253b15b7 MDL-40838 backup: restore enrolment methods without users 2017-02-20 12:08:35 +08:00
Eloy Lafuente (stronk7)
53f95c99cb MDL-54205 backup: loggers close() and destroy()
Any backup & restore operation may be leaving opened files
if a file logger is being used. This implementes the close()
method, so every logger can close any resource.

Also, the recommended backup_controlled::destroy() method
now calls to new logger::destroy() method in charge of
deleting all the references and closing any resource.

Finally, some internally used controllers, were missing
their destroy call, leading to associated loggers to
remain open. Now all them are explicitly deltroyed.
2016-05-13 01:54:28 +02:00
Tony Levi
303936aa57 MDL-50453 core: Replace reserved word usage in progress\null (PHP7) 2015-06-15 12:21:27 +09:30
sam marshall
ddf368a213 MDL-44141 Completion: System updates data during restore
The completion system has code which is supposed to prevent it
updating completion status while grades are being restored. This
code was a nasty hack and had not worked for some time. As a result
completion dates were restored incorrectly.

This commit implements a 'proper' way to find out if a restore is
currently running, replacing the previous hack.
2014-03-18 13:31:34 +00: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
3ef7279f26 MDL-42084 Core: Change set_time_limit to core_php_time_limit::raise everywhere
Exceptions (places where set_time_limit is still left) are:

Third-party libraries:
  ADODB
  PHPMailer

Moodle core:
  PHPUnit - not relevant (CLI mode)
2013-11-06 16:40:01 +00:00
Damyon Wiese
5d5c4c0b73 MDL-43411 Backup: Fix restore from 1.9
The restore progress bars introduced a bug when restoring Moodle 1.9 backups.
build_plan needs to be surrounded with start_progress/end_progress with the mode
set to indeterminite or it throws coding errors.
2013-10-17 15:54:24 +08:00
sam marshall
bf2a039e9a MDL-42039 Restore: Add progress tracking in restore controller load
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
2013-10-10 10:57:24 +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
Dan Poltawski
0df3254212 Merge branch 'MDL-41254-m' of git://github.com/micaherne/moodle 2013-09-09 18:04:05 +08:00
Michael Aherne
91dbb24442 MDL-41254 backup Raise time and memory limit in precheck. 2013-09-02 10:22:40 +01:00
sam marshall
16cd708835 MDL-38190 (1) Backup/restore: Progress tracking API 2013-08-16 10:50:35 +01:00
Eloy Lafuente (stronk7)
749fd68cbb MDL-29262 restore: Clean controller obj form DB once finished ok 2012-04-23 00:14:32 +02:00
Eloy Lafuente (stronk7)
184acafab6 MDL-28180 backup - set excluded activities for any non-course operation 2011-12-12 00:30:58 +01:00
Tom Lanyon
7aa06e6ded MDL-28701 Change all uses of $CFG->dataroot/temp to $CFG->tempdir 2011-09-10 10:35:39 +02:00
Eloy Lafuente (stronk7)
b7a45fa782 MDL-24684 backup - basic protection against time/memory limits 2011-06-30 03:37:30 +02:00
David Mudrak
fe50f530fd MDL-27379 Backup conversion logging facilities 2011-06-06 13:56:06 +02:00
David Mudrak
1e2c735111 MDL-27376 MDL-27377 MDL-27378 Backup converters refactoring - work in progress
These are David's changes of Mark's code that replace the
plan/tasks/steps infrastructure with a bit simpler one. The changes will
be described in the next commit that will actually finish the
conversion.

TODO: refactor backup/converter/moodle1/stepslib.php into conversion
handlers.
2011-05-10 17:58:00 +02:00
David Mudrak
0164592b8c MDL-27376 MDL-27377 Backup converters API refactored
* Several base_converter methods made protected when there was no obvious
reason why they should be public (subject of eventual change still).
* The conversion chain now constructed in advance before any converter
class is instantiated, using Dijkstra's algorithm.
2011-05-10 17:57:59 +02:00
Mark Nielsen
c5c8b3503a Making the conversion process more re-usable 2011-05-10 17:57:51 +02:00
Mark Nielsen
1e8c265c2b Added converter format detection and added conversion logic to restore controller 2011-05-10 17:57:50 +02:00
Eloy Lafuente
8231bb159b MDL-24962 backup - clean plan/settings circular refs on restore 2010-11-15 16:08:02 +00:00
Eloy Lafuente
fe575d8215 NOBUG: Added note to avoid forgetting it 2010-11-01 15:52:18 +00:00
Sam Hemelryk
3acc9b81f5 restore MDL-23109 Added role mapping interface and implemented searchable course/category selectors 2010-07-27 06:58:39 +00:00
Sam Hemelryk
785d6603dd backup MDL-23109 Implemented base restore UI within Moodle and linked through the navigation. 2010-07-22 07:48:02 +00:00
Eloy Lafuente
8d4e41f4ec MDL-21432 backup - role load/mappings and integration with UI via controller (MDL-23109) 2010-07-20 22:51:04 +00:00
Eloy Lafuente
c3ea499d53 MDL-21432 backup - handle mnet_remoteusers and support for prechecks 2010-07-18 23:49:55 +00:00
Eloy Lafuente
482aac657a MDL-21432 backup - root task, inforef and users handling completed, various fixes 2010-07-14 23:59:19 +00:00
Eloy Lafuente
754a102b13 MDL-21432 backup - restore controller 2010-07-06 22:25:54 +00:00