Commit Graph

252 Commits

Author SHA1 Message Date
Marina Glancy 5c6377900a MDL-25454: using the faster way to check if record exists in db 2011-09-29 17:06:37 +08:00
Marina Glancy 0623443356 MDL-25454 before skipping course backup make sure that there are no change entries in it's log during the last month. Store the nextstarttime even for courses that were not backed up 2011-09-29 10:02:08 +08:00
Aparup Banerjee d8f2500f46 Merge branch MDL-29186-m21 of git://github.com/samhemelryk/moodle
- resolved conflicts, minor whitespace and fixed quote.
    - note: textlib_get_instance() is already deprecated
2011-09-13 16:19:47 +08:00
Aparup Banerjee 6519a7769d Merge branch MDL-29187-m21 of git://github.com/samhemelryk/moodle
- resolved conflict.
2011-09-13 13:54:43 +08:00
Aparup Banerjee 717c3395be Merge branch 'wip-MDL-29189-m21' of git://github.com/samhemelryk/moodle into MOODLE_21_STABLE 2011-09-13 11:45:51 +08:00
Eloy Lafuente (stronk7) 366c19fabd MDL-28488 backup - conditionaly apply defaults based on mode
Some modes of backup cannot be preloaded with general backup
settings because they may conflict with the definitions required/set
by the mode (for example, import backups are, by definition, without
users always, so we cannot apply one default in the opposite direction).

So, after the patch, current general_backup setting will be only applied
to general backups, import/hub modes won't be using any default and
automated backup defaults should be loaded here (TODO)
2011-09-11 21:57:00 +02:00
Eloy Lafuente (stronk7) 56a1642c5b MDL-28488 backup - '[backup|restore]:configure cap does not control import mode anymore 2011-09-11 21:56:45 +02:00
Eloy Lafuente (stronk7) 993261dcff 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-11 21:56:13 +02:00
Sam Hemelryk 0347dd4d70 MDL-29186 multilang Reviewed the uses of course fullname and ensured things were being formatted consistently 2011-09-08 09:39:00 +12:00
Sam Hemelryk 5da6f4eeb6 MDL-29187 multilang Reviewed the uses of category name and ensured things are being formatted correctly 2011-09-08 09:36:55 +12:00
Sam Hemelryk 34c46428f1 MDL-29189 mutlilang Reviewed the uses of course shortname and ensured things are being formatted consistently 2011-09-08 09:30:10 +12:00
Eloy Lafuente (stronk7) 152ee16812 MDL-29072 Import course - whitespace fixes 2011-09-05 10:42:55 +02:00
Henning Bostelmann 02aac22ff8 MDL-29072 Import course: Use correct capability for course selection 2011-09-05 13:41:34 +12:00
Sagie Maoz 56f2ab3335 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:39:12 +08:00
Aparup Banerjee 2d4c4b65d4 MDL-28453 backup - made temporary restoration courses hidden by default. 2011-07-25 16:44:50 +08:00
Eloy Lafuente (stronk7) 4daa20bb5b MDL-28156 restore - fix some notices restoring empty courses 2011-07-10 13:12:49 +02:00
Sun Zhigang fbe00fbec7 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:24 +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