Commit Graph

138 Commits

Author SHA1 Message Date
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
Dan Poltawski
04a03ff282 Merge branch 'wip-MDL-50851-master' of git://github.com/marinaglancy/moodle 2016-01-12 14:17:14 +00:00
Cameron Ball
088d6086d8 MDL-21912 restore: Add admin setting to restore conflicting admin user 2016-01-11 14:08:58 +08:00
Marina Glancy
c4e868d5f0 MDL-50851 user: use new tag API for interests 2016-01-10 15:25:47 +08:00
Damyon Wiese
51311962c4 MDL-46455 backup: Keep external database logstore code self-contained.
General backup/restore does not need to handle external data sources natively - so
any changes needed to achieve this should be contained to the plugin that needs it.
2015-10-09 16:23:09 -07:00
Mark Nelson
bcfa51ca41 MDL-46455 logstore_database: added backup/restore support 2015-10-09 16:23:09 -07:00
Tony Levi
303936aa57 MDL-50453 core: Replace reserved word usage in progress\null (PHP7) 2015-06-15 12:21:27 +09:30
Matt Sammarco
868b086c4a MDL-18177 backup: Add backup option to include groups and groupings 2015-02-20 11:45:22 +11:00
David Monllao
03c39daad8 MDL-31500 backup: Allow front page backup/restore
Removes restore on front page restrictions and allows
front page modules duplication.
2014-11-21 14:55:09 +08:00
Dan Poltawski
cb1bf3f51a Merge branch 'MDL-40228-master' of git://github.com/FMCorz/moodle 2014-06-30 08:55:35 +01:00
Eloy Lafuente (stronk7)
8b8c78946f Merge branch 'MDL-46079-master' of https://github.com/sammarshallou/moodle 2014-06-25 01:32:11 +02:00
sam marshall
9f7b688c63 MDL-46079 Restore: Can run out of memory in get_records call 2014-06-20 14:15:28 +01:00
Frederic Massart
073be367e2 MDL-40228 backup: Settings were ignored during automated backups 2014-06-20 15:37:32 +08:00
Russell Smith
d2c58b95bb MDL-43835 phpunit: Correct unit tests.
When different ID's are set for each sequence a number
of unit test failures appear.  They have been corrected
to allow unit tests to pass with the new generator in place.
2014-06-17 19:08:01 +10:00
sam marshall
e974eef932 MDL-45574 Backup progress: Can time out with large number of files
When there are many files inside a single resource, it's possible
for the backup to time out because it does not report progress
while adding entries to the backup_ids table.
2014-06-06 10:41:40 +01:00
Ankit Agarwal
a9282e4120 MDL-45258 tags:context object/0 should not be passed to tag_set() 2014-04-28 15:35:01 +08:00
Mark Nelson
cc033d48b5 MDL-44316 core_tag: changed the API to accept a contextid and component 2014-03-22 13:50:08 -07:00
Dan Marsden
538864dffd MDL-44066 Restore: Restore source field.
Causes problems when restoring a SCORM pacakge that uses an alias.
2014-03-08 21:09:30 +13:00
James Pratt
809fdb83b1 MDL-41754 (1) Progress tracking : moved from backup and restore to core 2014-01-27 17:45:50 +07:00
Petr Škoda
2803f3c1b5 MDL-43402 remove all zlib detection code
Zlib extension is now required.
2013-12-27 11:06:18 +08: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
3b4e5a83f4 Merge branch 'MDL-38734-master' of git://github.com/danpoltawski/moodle 2013-11-01 08:55:29 +08:00
Damyon Wiese
3a33578926 Merge branch 'wip-mdl-30812' of git://github.com/rajeshtaneja/moodle 2013-10-28 12:11:34 +08:00
Rajesh Taneja
0daadaaeaf MDL-34612 Restore: Gracefully handle empty file contenthash while restoring 2013-10-22 09:47:42 +08:00
sam marshall
b6cdb4d660 MDL-42389 Restore: Broken restore causes notice before exception 2013-10-18 12:00:56 +01:00
Tony Levi
1b55bdb644 MDL-38734: Automated backup failure causing all course to fail
Conflicts:
	backup/moodle2/backup_stepslib.php
2013-10-18 15:07:35 +08:00
sam marshall
0e2637054f MDL-42039 Restore: Add progress tracking while creating users
When restoring a backup that contains a large number of users
to a different server where those users don't already exist,
creating users can take a significant time. This change adds
progress reporting so that it doesn't time out and shows
activity in the user interface while doing the creation.
2013-10-10 10:57:31 +08:00
sam marshall
37ff843d7d MDL-42039 Restore: Add progress reporting between files in resource
When a resource contains a very large number of (presumably small)
files, we should display progress between each file so that it
doesn't time out.
2013-10-10 10:56:30 +08:00
Dan Poltawski
4f0eaf18f4 Merge branch 'MDL-40493-master' of git://github.com/damyon/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-08 16:42:17 +08: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
Damyon Wiese
3d27180e94 MDL-40493 User preference: Allow users to set their preferred text editor.
This changes the setting htmleditor in the user table from a 0 or 1 column
to a user preference for the name of their preferred html editor.
2013-10-02 12:49:30 +08:00
Marina Glancy
9e11059326 Merge branch 'MDL-12403-master' of git://github.com/danpoltawski/moodle 2013-09-30 18:04:38 +10:00
Dan Poltawski
2d2489e59e MDL-12403 backup: prevent unset config from being applied 2013-09-26 09:55:13 +08:00
Dan Poltawski
99d5203824 MDL-12403 backup: ability configure default for question bank excludes 2013-09-26 09:55:13 +08:00
Marina Glancy
84128f46b2 Merge branch 'MDL-41087-master' of git://github.com/sammarshallou/moodle 2013-09-24 16:29:00 +10:00
sam marshall
4fb31ae6cd MDL-41669 Restore: Progress bar needs to include more tasks
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.
2013-09-16 17:18:12 +01:00
sam marshall
2a70b70c44 MDL-41087 Backup: add progress tracking in slow steps
Adds calls to the new backup progress tracking API within various steps of the
backup system - previously it only tracked progress between steps, but some steps
can themselves be slow. This ensures the system displays progress (either by
moving the progress bar if possible, or by making the wibbler below it pulsate)
during nearly all of the backup process.
2013-09-13 11:07:23 +01:00
sam marshall
07e720010a MDL-41146 Backup: backup_includes_files can leak memory 2013-08-12 13:49:26 +01:00
Petr Škoda
2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Dan Poltawski
50aa2587a4 Merge branch 'MDL-40618_restore_get_questions' of https://github.com/mr-russ/moodle 2013-07-29 14:14:58 +08:00
Russell Smith
3e7e2ab2ee MDL-40618 backup: centralize info field, use info in queries.
encode_backup_temp_info() and decode_backup_temp_info() have been
introduced to keep the info field encoding in one place.
Many locations used get_backup_ids_record() to obtain info, that
makes lots of calls to get_backup_ids_record() which can be slow.
We now complete all those inline by adding the info field to the query.
To reduce memory usage, all queries of that nature have been changed
to use get_recordset_*. gzcompress was introduced if available to minimize
traffic to/from the database and to decrease the memory required for caching.
The compression time is saved by the benefits in other places of having smaller data.
2013-07-23 19:50:53 +10:00
Dan Poltawski
3ee8607d46 Merge branch 'MDL-40584' of https://github.com/mr-russ/moodle 2013-07-23 12:35:41 +08:00
Russell Smith
42574d0900 MDL-40584 backup: Query db once per category in precheck
The cache is function local and testing against a large database
indicates 10k questions is a large category.  Restore already
uses MEMORY_EXTRA and that will have enough space for the couple
of megabtyes a local sql hash will introduce.
2013-07-15 16:44:45 +10:00
Damyon Wiese
d7bf5fd1f7 Merge branch 'MDL-40440-m' of git://github.com/andrewnicols/moodle 2013-07-15 14:42:10 +08:00
Frederic Massart
8e8891b76b MDL-40403 libraries: Deprecate get_parent_contexts() 2013-07-09 13:34:44 +08:00
Yuliya Bozhko
2832093f53 MDL-39558 badges: Add backup/restore to course badges 2013-07-03 09:35:06 +08:00
Andrew Nicols
100360f96c MDL-40440 Backup: Skip files that already exist 2013-07-02 11:13:03 +01:00
Eloy Lafuente (stronk7)
d745d2d45e MDL-40103 Now xmldb code matches original templates 100%
There were still some differences between the php code
used in the issue and the php code generated by the
xmldb editor for the template tables. This commit put
both 100% in sync.
2013-06-18 15:22:51 +02:00
Dan Poltawski
6ef007def6 Merge branch 'MDL-37761-m' of git://github.com/andrewnicols/moodle 2013-06-18 16:47:18 +08:00
Andrew Nicols
b1850c12c1 MDL-37761 Backup: Do not include files in backups when importing courses/activities
When we import courses or duplicate activities, the deduplicating nature of
the file_storage system means that we don't actually have to include the
real files in the backup - just their metadata from the file table.

The restoration process needs to know not to expect files from the backup
phase so a flag is set in moodle_backup metadata.
2013-06-18 07:52:04 +01:00