238 Commits

Author SHA1 Message Date
Aparup Banerjee
ed6a14eb03 MDL-28453 backup - made temporary restoration courses hidden by default. 2011-07-25 16:34:11 +08:00
Eloy Lafuente (stronk7)
438606fca3 MDL-28156 restore - fix some notices restoring empty courses 2011-07-10 13:13:23 +02:00
Sun Zhigang
858d100fa3 MDL-27833 Backup - Fix can't search courses with non-latin characters during importing
PARAM_ALPHANUMEXT filter out all non-latin characters, including
Chinese, Japanese and etc. Use PARAM_NOTAGS instead.
2011-07-07 10:39:47 +02:00
David Mudrak
477f1d2b78 MDLQA-1147 Fixed a typo in the exception class name
Thanks Steve Turley for spotting and reporting this during the QA.
2011-06-29 00:10:59 +02:00
Eloy Lafuente (stronk7)
beae4a6684 MDL-25811 automated backups - clean running status after 90 mins of inactivity 2011-06-21 02:41:12 +02:00
David Mudrak
fad0f24499 MDL-22414 Removing obj_to_readable helper 2011-06-09 11:38:15 +02:00
David Mudrak
fe50f530fd MDL-27379 Backup conversion logging facilities 2011-06-06 13:56:06 +02:00
David Mudrak
a78b139ce6 Merge branch 'master' into backup-convert 2011-06-03 23:22:23 +02:00
David Mudrak
f6f7a7266c Merge branch 'master' into backup-convert
Conflicts:
	backup/util/xml/parser/processors/simplified_parser_processor.class.php
	backup/util/xml/parser/simpletest/testparser.php
2011-05-26 17:30:27 +02:00
Eloy Lafuente (stronk7)
c44299c172 MDL-27636 restore - add support for after_restore() to plugins. Credit goes to Mark Nielsen. Thanks! 2011-05-26 02:37:16 +02:00
Eloy Lafuente (stronk7)
d4dd06591b MDL-27594 backup - out unused (and incorrect) condition + stronger tests 2011-05-24 11:55:39 +02:00
Eloy Lafuente (stronk7)
eb78f0632d MDL-27594 backup - fix start/end notifications on empty chunks 2011-05-24 11:01:00 +02:00
Eloy Lafuente (stronk7)
54b8f33421 MDL-27594 backup - fix start/end notifications on empty chunks 2011-05-23 00:58:45 +02:00
David Mudrak
c18f90f22f Merge remote branch 'github/master' into backup-convert 2011-05-18 16:08:15 +02:00
David Mudrak
71d1751c53 Improved the information display about a non-standard backup file 2011-05-18 12:19:57 +02:00
David Mudrak
f666f14930 The first attempt to include backup conversion in the restore process
With this initial implementation, we do not display any information
about the backup contents yet. The non-standard backup file is just
silently converted at the beginning of the settings stage, as soon as
the restore controller is available.

In the future we will probably want to display the information about the
contents of the converted file as if we were restoring from standard
MBZ format. However this includes more work in the restore UI machinery
and I leave it open for now.
2011-05-18 01:55:27 +02:00
David Mudrak
3a0767218a The core_backup_renderer does not need the full backup information any more
In the previous implementation, the renderer needed full backup
information just to see if its type is TYPE_1COURSE or not. For
non-standard backups, we do not have the full backup information
available but we can easily decide if we are restoring the whole course
or just its part.
2011-05-18 01:14:24 +02:00
David Mudrak
d51345c7c6 Fixed the class name in the calling code after a recent change 2011-05-18 00:55:24 +02:00
David Mudrak
4eb2a097c5 The display() method in backup/restore UI returns the HTML rather then echoing it
This implementation uses a hacky trick with the output buffer unless
someone finds a time to add support for returning the HTML from
quickforms.
2011-05-18 00:50:26 +02:00
David Mudrak
383f6f63c7 Fixed wrong class name 2011-05-16 19:05:34 +02:00
David Mudrak
99a82518eb The main moodle_backup.xml file is now being generated by the converter 2011-05-16 19:02:13 +02:00
David Mudrak
17d2e210b7 Renamed converter factory method to more self-descriptive get_converter() 2011-05-13 12:06:10 +02:00
David Mudrak
a5ea28b32d Removing relics of the previous plan/tasks/steps based implementation
Kudos to Mark Nielsen for his initial work on this project. In his code,
Mark described the valuable logic of the conversion using a framework
mirroring plan/tasks/steps based architecture of the backup and restore.
My attempt to simplify it led to the current handlers-based
architecture.
2011-05-13 03:09:26 +02:00
David Mudrak
beb7de3736 More backup-converter API improvements
Added write_xml() helper that writes the given tree-ish structure into
the current xml writer. Improved get_contextid() so that it can use
indices for searching data. Added set_stash() and get_stash() helper
methods.
2011-05-12 15:36:09 +02:00
Eloy Lafuente (stronk7)
8298bedab7 MDL-27475 backup - fix start/end notifications order + tests 2011-05-11 20:01:13 +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
David Mudrak
e48477d94f MDL-22414 Fixed standard copyright file headers (R0417) 2011-05-10 17:57:59 +02:00
Eloy Lafuente (stronk7)
5b01180aed Apply parser processor new methods + observe $CFG->keeptempdirectoriesonbackup 2011-05-10 17:57:58 +02:00
Mark Nielsen
7c9d2927b8 Cleanup from last commit, just wanted prototype code to be saved to VCS 2011-05-10 17:57:57 +02:00
Mark Nielsen
72c089f117 Adding in activity support and adding base forum classes as proof of concept 2011-05-10 17:57:57 +02:00
Mark Nielsen
56bd1ab0e1 Added use of get_contextid and fixed some problems 2011-05-10 17:57:55 +02:00
Philip Cali
a656fcb387 Adding the convert_file function to the file manager. 2011-05-10 17:57:55 +02:00
Mark Nielsen
62c5daf122 Adding doc block todos 2011-05-10 17:57:55 +02:00
Mark Nielsen
6c0235b375 Adding doc block 2011-05-10 17:57:54 +02:00
Mark Nielsen
e10e887905 Might make it faster... 2011-05-10 17:57:54 +02:00
Mark Nielsen
eba6af755c Re-arranging function definition 2011-05-10 17:57:53 +02:00
Philip Cali
142ec51fcd Added contextid generation... I think. 2011-05-10 17:57:53 +02:00
Mark Nielsen
970bc1f3e0 Adding root and final tasks 2011-05-10 17:57:53 +02:00
Mark Nielsen
bb2e1609c5 Full example implementation of the convert course step 2011-05-10 17:57:53 +02:00
Mark Nielsen
dda19810e0 Starting to unit test - fixed bugs, things are... working!?! 2011-05-10 17:57:52 +02:00
Mark Nielsen
653bc98b0e Fixing several bugs while actually trying to execute some of the code 2011-05-10 17:57:52 +02:00
Mark Nielsen
5af8804415 Moving converters into sub-directories so they can have other files and simpletest directories specific to them 2011-05-10 17:57:51 +02:00
Mark Nielsen
8450e2c41f Attempting to write up processing of the moodle.xml file - the converter collects all of the element paths to watch and then dispatches them to the convert_structure_step classes. 2011-05-10 17:57:51 +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
Mark Nielsen
7336701ff1 Minor fixes and added more methods 2011-05-10 17:57:50 +02:00
Mark Nielsen
17252e2d8a Adding some of the base classes and starting to fill out their methods/properties 2011-05-10 17:57:50 +02:00
Sam Hemelryk
e1ce7c7e7b Merge branch 'MDL-26896' of git://github.com/stronk7/moodle 2011-04-11 14:48:01 +08:00
Eloy Lafuente (stronk7)
14e6710d99 MDL-26896 parser - add start/end path notifications 2011-04-11 02:16:58 +02:00