100 Commits

Author SHA1 Message Date
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
Andrew Nicols
f1454424b5 MDL-40165 Backup: Split out test classes into multiple files 2013-06-18 06:25:13 +01:00
Marina Glancy
5883de26ae Merge branch 'MDL-40165-m' of git://github.com/andrewnicols/moodle 2013-06-18 12:59:04 +10:00
Eloy Lafuente (stronk7)
27c07947c4 MDL-40103 Fix wrong call, causing restore to fail. 2013-06-18 01:30:14 +02:00
Russell Smith
62d6f183c4 MDL-40103 Backup: Move install.xml templates to inline XML 2013-06-15 15:07:03 +10:00
Andrew Nicols
fd66d1de70 MDL-40165 Backup: Split out test classes into multiple files 2013-06-13 08:55:54 +01:00
Rex Lorenzo
b4d33e02c0 MDL-34275 - Use default copyright license when restoring files 2013-05-07 09:09:38 +01:00
Andrew Robert Nicols
d9bae60289 MDL-31390 Allow data to be sorted at backup 2013-03-01 10:03:13 +00:00
Simon Coggins
ec2d8ceb88 MDL-35332 lib: Improve security of hashed passwords 2013-02-09 06:47:57 +13:00
Davo Smith
f5744d1cfa MDL-31484 backup - repeated restores with anonymised users now works correctly 2012-11-29 19:57:16 +00:00
Mark Nielsen
ac1f907e77 MDL-34837 backup: Restore does not fail when some courses have the same name 2012-10-15 17:18:34 +08:00
Eloy Lafuente (stronk7)
edeb39d44a Merge branch 'MDL-33812-master' of git://github.com/FMCorz/moodle 2012-09-04 00:19:53 +02:00
Frederic Massart
3b232aeffb MDL-28346 Backup: Restore does not fail when a file is missing 2012-09-03 14:13:11 +08:00
Frederic Massart
61d71da334 MDL-33812 Backup: Added some upgrade information about the changes 2012-09-03 14:12:28 +08:00
Frederic Massart
e2aebdc928 MDL-33812 Backup: Respect of backup_auto_keep 2012-09-03 14:12:28 +08:00
Jason Ilicic
b3e10b89e9 MDL-34529: Fixed ordering of course sections when performing import/restore by adding the sort parameter. 2012-08-20 14:00:45 +02: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
Petr Skoda
c52551dc3c MDL-8249 localise standard role names and descriptions if empty 2012-07-06 08:22:34 +02:00
David Mudrák
83b2cc562d MDL-33430 Set newcontextid and newitemid when sending file to the pool 2012-06-21 02:31:18 +02:00
David Mudrák
4b6b087faf MDL-33430 Do not restore aliases yet, stash them for later processing 2012-06-21 02:29:34 +02:00
Eloy Lafuente (stronk7)
f0852f474b MDL-33630 backup: invalidate ids cache on temptable drop. 2012-06-10 04:57:40 +02:00
Aparup Banerjee
380d472314 Merge branch 'wip-mdl-27120' of git://github.com/rajeshtaneja/moodle 2012-05-30 14:22:34 +08:00
Marina Glancy
f1bd371c79 MDL-33373 fixed bug in backup of files as a regression from MDL-28666 2012-05-30 10:11:41 +08:00
Rajesh Taneja
e7b24943e6 MDL-27120 backup: fixed docblock and code cleanup 2012-05-29 16:22:45 +08:00
Tony Levi
7f98b12f91 MDL-27120: Cache DB operations in restore_dbops 2012-05-29 14:44:07 +08:00
Dongsheng Cai
6723372514 MDL-28666 Extends repository to support references
1. Allow repository to create references to external contents
2. Extends files API to handle file references
3. Generic file caching
4. Backup/restore file references
5. Download external contents if repository uninstalled
6. Allow filepicker to display iframe
7. PHPUnit test suits
2012-05-21 11:57:51 +08:00
Dan Poltawski
e0ed91ba39 Merge branch 'MDL-29262' of git://github.com/stronk7/moodle
Conflicts:
	version.php
2012-04-23 12:42:16 +08: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)
6e803b9fe4 MDL-29262 backup: Clean controller obj form DB once finished ok 2012-04-23 00:03:37 +02:00
Petr Skoda
bb7898c6ab MDL-32569 convert remaining backup tests and drop old simpletests 2012-04-21 16:24:33 +02:00
Petr Skoda
a66b2ae4f4 MDL-32434 deprecate drop_temp_table() in favour of drop_table() 2012-04-15 12:23:15 +02:00
Petr Skoda
4b02743182 MDL-32149 improve testcase naming and list in config file 2012-04-03 22:30:57 +02:00
Petr Skoda
1cbf2a20ca MDL-32149 setUp() and tearDown() are supposed to be 'protected', add missing blog testcase 2012-04-03 22:30:56 +02:00
Petr Skoda
dbf5a44798 MDL-32149 add backup tests and dropping of extra tables 2012-04-03 22:30:54 +02:00
Eloy Lafuente (stronk7)
2ed7cc2730 Merge branch 'w10_MDL-31301_m23_textlibcleanup' of git://github.com/skodak/moodle 2012-03-06 16:06:53 +01:00
Petr Skoda
6f3451e540 MDL-31301 remove all uses of moodle_strtolower() and deprecated it 2012-03-03 11:46:26 +01:00
Eloy Lafuente (stronk7)
ac6dc09c26 MDL-29248 backup: take rid of the setting and code handling the 'private' user filearea 2012-03-01 13:09:47 +01:00
Eloy Lafuente (stronk7)
f88224624d MDL-29248 backup: delete user_files settings, lang strings and uses 2012-03-01 13:09:47 +01:00
Eloy Lafuente (stronk7)
ede7105fd9 MDL-27233 move the restorer enrol/ra creation to the very beginning of the restore process
Some early steps in restore are using capability checks to decide how to
restore some information. But at that stage, if the course contents have
been removed and the user had perms at course level only (usually teacher)
the process can fail because some content is not restoreable due to the
lack of permissions.

Moving the restorer step to the beginning really helps is those situations
and it does not hurt at all.

Also, fixed one notice detected when testing this.
2011-11-25 01:07:27 +01:00