205 Commits

Author SHA1 Message Date
mjollnir_
f90666aa5c Abstracted a bit of the restore procedure to allow for silent restoring.
Added new function, import_backup_file_silently
Changed everything that prints stuff to check for a constant first.
Backup_flush checks a different constant, this is so that output can still
get flushed to the browser when necessary but not print <li>s everywhere.
Please test this!
2006-01-15 21:09:13 +00:00
mjollnir_
1ecea97679 Granular backup & restore:
This patch allows the much requested selection of individual instances of modules within a course to backup and restore.
It needs A LOT of testing and probably some prettyifying too.
2006-01-13 03:45:31 +00:00
stronk7
d0fad6f1ae Fixed one important bug in restore of gradebook that was
preventing it to finish in a lot of situations.
(http://moodle.org/mod/forum/discuss.php?d=31461)

Merged from MOODLE_15_STABLE
2005-10-16 11:32:57 +00:00
mjollnir_
212f79a5e9 Fix to bug 4026 and 3913. Credit: jjg7 at humboldt dot edu 2005-09-08 21:30:42 +00:00
stronk7
f718493562 Now course-guest, user-login and user-logout
log actions are restored properly.
Plus some problem with double &amp; entities solved.
Part of bug 3582.
(http://moodle.org/bugs/bug.php?op=show&bugid=3852)

Merged from MOODLE_15_STABLE
2005-08-03 19:04:05 +00:00
moodler
f2e34253c3 Removing and re-adding currency support in courses 2005-07-22 17:19:52 +00:00
moodler
f5e1319ec3 Merged SC139 from stable 2005-07-12 08:00:51 +00:00
stronk7
92f9357579 Improved automatic relinking in backup and restore. Credits go to skodak.
Complete refactoring of the system that was really awful (my fault!).
Now everything is in its place and working like a charm, making things really
easier to be implemented and amplied. Bug 3678
(http://moodle.org/bugs/bug.php?op=show&bugid=3678)
(http://moodle.org/mod/forum/discuss.php?d=26530)

Merged from MOODLE_15_STABLE
2005-07-04 17:48:59 +00:00
stronk7
2b41040945 Checking some fields because they were breaking restore of old courses.
Bug 3444
(http://moodle.org/bugs/bug.php?op=show&bugid=3444)
2005-06-19 18:29:33 +00:00
mjollnir_
d27920b9ad Merged from MOODLE_15_STABLE Fix for bug 3508 -- only do the clam log on backup/restore for restoring course/user/group files, not for temp backup data 2005-06-16 02:33:42 +00:00
stronk7
c098e8c503 Small typo, preventing group events to be restored properly.
Records in backup_ids table must use the name of the table
without the prefix as name. Bug 3360. Thanks Jon.
(http://moodle.org/bugs/bug.php?op=show&bugid=3360)

Merged from MOODLE_15_STABLE
2005-06-03 16:46:28 +00:00
stronk7
000b822e54 Now restore code for quizzes is enabled again. pre15 restore
seems to work and 1.5 backup 1.5 is in being done by Gustav's team.
2005-05-22 19:25:48 +00:00
stronk7
f623680bab Added the restore_get_best_quiz_category() function
user to look for, at restore time, the best quiz
category to be used (i.e. the existing category with
the same stamp belonging to the same course or,
alternatively, belogns to other course but is published
and the user has editing rights).

It replaces the old-old stuff at restore code and
recent simplification that was producing some problems.
2005-05-14 23:32:32 +00:00
stronk7
adc7ade8c6 Disable temporary the restore of quiz questions and attempts
to avoid moodlers filling their DBs (not always test servers!)
with non-consistent data.

Can be enabled by setting $CFG->enablerestorequiz = true;

(while working on it both Gustav's team and I, obviously this will be
removed once stabilished)
2005-05-09 13:33:18 +00:00
moodler
b345a30f35 Added support for trackforums 2005-04-25 18:45:21 +00:00
stronk7
04592aec06 Now event->repeatid is included in backup/restore. Thanks for
your support Jon!
Bump to 1.5 beta
2005-04-22 23:49:48 +00:00
stronk7
2332688f43 One copy/paste typo and a problem restoring to existing courses solved. 2005-04-22 00:55:04 +00:00
stronk7
868e94e763 Now gradebook is restored completely. Logic says:
- If destination course is using 'simple' gradebook, restore nothing.
- If destination course has letters defined, don't restore backup letters.
- If one category exists in the course (by name) it's reused.
- Items belonging to non-restored modules are skipped.
- If users aren't restored, exceptions are skipped.

Test, test, test... :-)
2005-04-22 00:26:22 +00:00
stronk7
75766456f9 Now all the wiki formated texts are converted to markdown
by the restore process. Such conversion is performed for
every backup file prior to 2005041100.
Wiki internal links are dinamically changed and then,
converted to Markdown.
2005-04-12 23:40:40 +00:00
stronk7
805788218b Converting wiki to markdown in old (<2005041100) courses.
First step. Launcher created.
2005-04-12 16:10:47 +00:00
stronk7
80117b519d Now group images are in backup & restore 2005-03-07 23:40:25 +00:00
moodler
3ac6807ee1 Added backup/restore support for the new fields I added today 2005-03-05 10:31:58 +00:00
defacer
c0a570cef0 Fixed handling of activity blocks when restore does not include that type of activity. 2005-02-28 16:03:05 +00:00
defacer
1fa95628f6 Backup and restore for block instances within activities!
Made using the new goodies from the new pagelib, some really useful advice
from "Backup Man" Eloy and lots of love.
2005-02-28 04:50:36 +00:00
defacer
9bee8b701e Fixing a bug when restoring a course with events but not users. 2005-02-28 00:55:52 +00:00
martinlanghoff
97cfb9352c Merged from MOODLE_14_STABLE - Backing out bad sortorder fix in restorelib -- actually we didn't need one. 2005-02-24 21:14:32 +00:00
martinlanghoff
5875a2f3ca Merged from MOODLE_14_STABLE - Fix problem when restoring courses to empty categories 2005-02-23 04:49:15 +00:00
stronk7
7fae497cdc Now parent and sortorder is supported at restore too.
The tree is automatically rebuilt using new ids if
necessary.
2005-02-20 18:01:40 +00:00
stronk7
7142bf514d Changed a forbidden null detected by the new AdoDB libraries. 2005-02-18 16:57:58 +00:00
stronk7
2205d909ae Now user->theme, group->theme and course->theme are supported 2005-02-15 18:37:08 +00:00
stronk7
b20dfc6e14 Bad use of get_admin(). Thanks Penny! 2005-02-14 17:40:07 +00:00
stronk7
8281899156 Show messages info only if present (SITE course) to avoid
unnecessary headaches to moodlers.
2005-02-13 23:34:54 +00:00
stronk7
5a9fa34b6a Modify some hardcoded admin ids... 2005-02-13 23:22:19 +00:00
stronk7
6d1e416208 Now MIM is restored completely too!!!
It was more complex than I thought!
2005-02-13 19:09:41 +00:00
moodler
9ff5e44a93 Added Blackboard restore using XSLT. Works with BB 5.5 and BB 6.0.
Completely untested by me but it LOOKS like it should work.  It's quite
standalone, and is basically a single function call during the restore
precheck which looks in the backup to see if it's a BB file, then
converts it using XSLT.

Apart from a little tidyup and renaming, I added a check so that it
should just silently fail if XSLT functions aren't available

Many thanks to Ziba Scott <ziba@linuxbox.com> who wrote it!
2005-02-08 07:19:49 +00:00
stronk7
1bbf415fe8 Now the restore process is XHTMLised 2005-02-07 23:28:52 +00:00
stronk7
5dc2d8ef3a deleted some negations used to test the restore metadata process. :-) 2005-02-07 17:58:50 +00:00
stronk7
cee6968fa1 Now metacourses are working in restore too!
Please test them!!
2005-02-07 17:52:58 +00:00
stronk7
1d9169d312 Now group members are only included (backup and restore) if
we have selected to have users! Thanks to Etienne! Bug 2486
(http://moodle.org/bugs/bug.php?op=show&bugid=2486)

Merged from MOODLE_14_STABLE
2005-02-04 16:24:12 +00:00
defacer
b5039f5d15 Removing some diagnostic output that had been forgotten. 2005-01-31 03:47:14 +00:00
defacer
7542a4e574 Dropping the use of MOODLE_PAGE_COURSE <gasp>!
The new constant is PAGE_COURSE_VIEW, and it's more streamlined with the
new CSS-related ids for 1.5. There are great possibilities for the future
here, so we 're getting ready.

On the other hand, this has to be the ugliest hack I 've ever inflicted
on any program (look at pagelib.php). Thankfully it will only stay for just
a little while.
2005-01-31 02:18:15 +00:00
stronk7
8a792ed10f group->password is now supported 2005-01-30 12:12:06 +00:00
stronk7
57aad2a02a added support for:
- user->policyagreed:
        if the destination server is different, reset it
   - user_students->enrol and user_teachers->enrol
        if not set or the destination server is different, set it to $CFG->enrol
somethings should be modified in the rest of moodle:
    - update all the 'manual' entries to 'internal'
    - modify the enrol_teacher() to use $CFG->enrol by default
    - make every enrol method set this field properly.
    - perhaps, mark metadata users with a new value too.
2005-01-30 11:39:12 +00:00
stronk7
ad4f774cd4 THEME is out of this directory.
I hope to have done it correctly!
2005-01-28 00:01:20 +00:00
stronk7
96e76b6291 Two missing parameters added 2005-01-27 19:43:42 +00:00
stronk7
94df8a48c3 Now scheduled backup supports new blocks.
Moved blocks code to library.
Fixed a missing global preventing restore to work.
2005-01-27 19:07:51 +00:00
mjollnir_
873bf8758f Initial checkin for import course content functionality (uses backup/restore). Probably needs wording changes and new icon! Please test me *thoroughly*! 2005-01-27 02:35:10 +00:00
stronk7
12f7885b2b upgrading to 1.5
steps 1, 2 and 3 done.
2005-01-23 23:24:58 +00:00
mjollnir_
68ba62d21a Merged from MOODLE_14_STABLE: Adding fix for idnumber duplication problem in restoring from backup discussed at http://moodle.org/mod/forum/discuss.php?d=16297 2004-12-17 03:04:24 +00:00
stronk7
b5104c34f1 Skipping empty categories in restore. They shouldn't exist but
I've received some examples of this these days.

Merged from MOODLE_14_STABLE
2004-12-10 18:27:53 +00:00