Commit graph

595 commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
77c2ca69af MDL-28488 backup - make backup and import capabilities independent
Before this change, in order to perform one course import it was
necessary to have both the backupcourse and the backuptargetimport
capabilities. After agreement now each one will control its own
backup mode. Same applies for restore.
2011-09-09 17:46:21 +02:00
Sam Hemelryk
91d284c145 MDL-29186 multilang Reviewed the uses of course fullname and ensured things were being formatted consistently 2011-09-08 09:38:46 +12:00
Sam Hemelryk
63390481c4 MDL-29187 multilang Reviewed the uses of category name and ensured things are being formatted correctly 2011-09-08 09:37:07 +12:00
Sam Hemelryk
8ebbb06adf MDL-29189 mutlilang Reviewed the uses of course shortname and ensured things are being formatted consistently 2011-09-08 09:30:27 +12:00
Eloy Lafuente (stronk7)
01d6182fa8 MDL-29072 Import course - whitespace fixes 2011-09-05 10:41:57 +02:00
Henning Bostelmann
96576a2ac1 MDL-29072 Import course: Use correct capability for course selection 2011-08-23 19:07:54 +01:00
Sagie Maoz
0d5e5644b8 MDL-26721 automated backups - Fix typo
Causing the 'role assignment' backup inclusion to be tied to the users

Signed-off-by: Dan Poltawski <dan.poltawski@luns.net.uk>
2011-08-08 15:40:55 +08:00
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