81 Commits

Author SHA1 Message Date
stronk7
c9c8984582 Now ORIGINAL_WWWROOT is saved in backup and restored too!! 2004-05-06 23:20:25 +00:00
stronk7
4c49c802d0 Some minor changes about the system to encode file.php calls included.
Solve an important issue about scheduled backups not working properly
    when encoding links...
Added support for event->visible in backup & restore.

TODO: Add wwwroot to backup/restore to use it when decoding.
      Change the system to encode forum calls.
2004-05-06 22:17:45 +00:00
stronk7
750024e833 Changed hiddentopics to hiddensections in backup and restore 2004-05-02 22:34:13 +00:00
stronk7
b9f2b9bd99 Small typo in las cvs version. Arghhh!! 2004-04-28 22:29:39 +00:00
stronk7
22c8200ff4 If group isn't detected when restoring events, default it to 0 2004-04-27 22:37:01 +00:00
stronk7
d2b5f1e8bf event->format is now in backup & restore. 2004-04-27 19:51:12 +00:00
stronk7
87808d0a01 Now, in topics format, every course can decide about how to
display hidden topics (collapsed or invisible)
Added support for course->hiddentopics in backup & restore
2004-04-27 16:37:53 +00:00
stronk7
56eea82e08 First version of inter-activities mantained in backup/restore.
All the conversion to some pseudo-codes are done at backup time.
In the restore process, every link is decoded to new ids.
For now, this is supported:
- In backup:
  -all links to forums are encoded.
- In restore:
  - all links to forums are decoded.
      - from forums (post->message).
      - from resources (resource->alltext).
The process requires a backup made with the same version (because it
has to be properly encoded at backup time). Old backups will work
without conversions at all.
Only tested with some little courses.
It would be perfect to have some "big" course to test it.
Please, test and feedback, ciao :-)
2004-04-24 00:40:45 +00:00
stronk7
229f852a8a Now blockinfo is fully supported in backup & restore. For old backups
(without blockinfo field, default blocks are applied). Every block
visibility is mantained in the process.
Bump versions a bit (2004042100) :-)
2004-04-20 23:28:46 +00:00
stronk7
0f3fe4b6ad First Official realease of the "Blocks System".
Integrated with Moodle:
    - Install automatically.
    - Update course->blockinfo for each course at installation time.
    - Modified course creation to insert into blockinfo field.
    - Modified restore to insert into blockinfo field.
    - Admin options (hide, show, delete, config) from admin page.
    - Lang strings inserted (en only).
    - Database support to mysql and postgresql (not tested!!).
Moodle, backup and block versions updated to 2004041800.
Tested with mysql: Install fresh and upgrade from previous.
section_activities block renamed to social_activities and created
its own lang file to support name "Social Activities". This can
be changed at any time.

TODO:
=====
Support it really in backup/restore.
????

Enjoy!! Ciao :-)
2004-04-18 23:20:53 +00:00
stronk7
df9a165ecc Now, after restoring the course, the restore proccess executes
every MODULE_refresh_events() function to recalculate every
activity event automatically.
2004-04-09 23:40:37 +00:00
stronk7
01f50e060e First attempt to encode/decode some absolute path parts
in the backup/restore process in order to have every call to file.php
working in destination courses. Specially useful to contents created
with th HTML editor because it uses this type of URLs to images, smiles...

NOTE: This make 1.3 backups not restorable in 1.2 systems !!
2004-04-01 23:31:56 +00:00
stronk7
1a6c02faba Detected 2 bugs when restoring users and scales about
recoding the id field !!
2004-03-10 17:10:26 +00:00
stronk7
063a889557 Now user_files are restored if the user existed previously but he
doesn't have a dir under the users dir.
See bug 1123 (http://moodle.org/bugs/bug.php?op=show&bugid=1123)
2004-03-10 16:15:42 +00:00
stronk7
fb2c01fbb3 Solved two bugs when restoring and groups or events exists in destination
course.
2004-02-22 22:22:58 +00:00
stronk7
cd44fdcb82 Some important changes:
- Now course events are supported in backup & restore.
        - in manual backups
        - in scheduled backups
    - Fixed important bug when restoring groups.
    - Added support to the "user change password" action
      (with some changes done in login/change_password.php)

Please, test it !!!!
2004-02-21 01:30:22 +00:00
moodler
8199e3f09a New user field called "emailstop" ... to stop emails.
I had to do it ... this is driving me nuts with some people
on moodle.org
2004-02-20 09:02:27 +00:00
stronk7
0f318c26b4 Now logs from:
- Assignments
- Choices
- Workshops
are restored too.
2004-02-15 21:18:52 +00:00
moodler
3c0561cfe7 New field in the groups table to "hidepicture" from being displayed
in locations like forums etc.

Backups done too, Eloy.  :-)
2004-02-15 07:29:55 +00:00
stronk7
ea3591e41a Now chat logs are included in restore. I've decided to start with this
simple module to be ready for the difficults... :-)
2004-02-15 00:54:56 +00:00
stronk7
2ecad74265 First version of restore logs !!
It restores:
    course logs
    user logs
Todo:
    module logs

Coming soon :-)
2004-02-13 23:28:45 +00:00
stronk7
3a4b33c3b9 Now course->lang is in backup & restore. 2004-02-09 22:24:34 +00:00
stronk7
41fd7fe497 Now user_preferences are fully supported in backup & restore. 2004-02-08 19:27:23 +00:00
stronk7
50dbc51fc9 Turn off some debug info. 2004-01-29 00:08:25 +00:00
moodler
66ee479190 Fixed tiny bug for courses without groups 2004-01-27 11:57:10 +00:00
stronk7
dfa14bc98f Now groups and members are restored and recoded when restoring courses.
Existing courses are searched by name+description to add members to
existing groups (when restoring over another course).
2004-01-25 20:57:58 +00:00
stronk7
e695cd3f36 Now groupmode in course_modules is supported too. 2004-01-22 20:27:17 +00:00
stronk7
568d750b41 Now groupmode and groupmodeforce (course table) are in backup and restore too. 2004-01-05 00:57:23 +00:00
stronk7
79619daf93 Added addslashes() to check for existing users, because some characters
can break the query (old users containing ', for example).
2004-01-04 22:58:28 +00:00
stronk7
4f7a557d6d Little change in the form that duplicated course shortnames are handled. This should
help when detecting copies of backup files.
2003-12-29 20:20:03 +00:00
moodler
3f125001bc New feature: Allow students to see their own activity reports.
This is a course setting.  By default it is off.  When on, there
is a new link in the course admin menu for students, and they can
browse the same report that teachers see.

The report icon is temporary.
2003-10-31 05:57:30 +00:00
stronk7
dabf73b44a timeaccess (students and teachers) included in backup/restore. :-) 2003-10-27 17:23:43 +00:00
moodler
e23defdb12 Not having any users in a backup is not necessarily an error. 2003-10-07 14:01:23 +00:00
stronk7
6ecc3ea8d3 Now course->maxbytes is supported in backup/restore. 2003-10-07 11:58:56 +00:00
stronk7
46f1f7822d Now, to restore course category do this:
- Check if (category_id, category_name) exists.
- Check if (category_name) exists.
- Check if category_id = 1 exists.
- Create a new, initially invisible category withe the info in backup-file.

This solves a issue when restoring to a new course and category_id 1
had been removed !!
2003-09-23 16:40:44 +00:00
stronk7
bd96236e86 Solved two possibe bugs:
- Restoring to courses without section 0 (manually deleted).
    - Restoring to sections without mods and null values in its sequence field.
Thanks to Janne Mikkonen...
2003-09-22 08:30:22 +00:00
stronk7
0611af101d Now, "needed" users are included in backup/restore when
"course users" are selected.  This uses the xxxx_get_participants()
function in every module.
This solves an issue about info in modules belonging to
unenrolled users (Bug #692 closed).
Mantain compatibility with old backups (1.1 and 1.1.1).
Updated version to "1.2 development".
Included support to "label" module (by Martin)
2003-09-14 21:43:34 +00:00
moodler
aac94fd0cc New field on course_modules called "indent" ... this is an integer
that tells us how far to indent the activity when it is displayed.

This gives us some more flexibility on the course outline to
arrange things as we might like them, into subtopics etc

Backup/restore is updated as well.

There is also a bit more robustness in course/mod.php
2003-09-14 16:31:33 +00:00
moodler
eb06f902f4 Undoing one of the less then brilliant changes I did earlier today to Eloy's code 2003-08-25 15:47:37 +00:00
moodler
830ce8241b Some fixes for robustness (make sure variables exist before using them
because it flags errors when in debug mode).

Also, when specifying array values by name use quotes around the name

 eg  $array['value'] instead of $array[value]

Finally, I changed the way user restoring works (slightly).  Before, if a
restored user was found to be a course creator or an admin, then this
status was restored.  I don't think this is a good idea - it could lead
to security problems when copying a backup from one site to another,
or if that person's status has changed since the backup was made.
I think it's best to only restore what is actually part of the course,
ie teacher or student.

If this broke anything else let me know!
2003-08-25 01:44:01 +00:00
stronk7
300ae26c2d Ooops I commited some debug source code in previous
versions. Going back. Sorry.
2003-08-23 17:40:27 +00:00
stronk7
41923e7511 Solved one problem when copying empty directories. 2003-08-23 17:33:34 +00:00
moodler
fff79722e5 A new course field called "showgrades" which allows the teacher to
turn the display of the grade book on and off.
2003-08-20 07:32:24 +00:00
stronk7
93e9a4c9cd Some minor changes to restore scales in existing course
(avoid some duplications)
2003-08-18 13:07:02 +00:00
stronk7
42f1ff47b4 Scales are now supported in backup/restore.
Updated version to 0.8.8 alpha. Please test.
2003-08-18 00:00:22 +00:00
stronk7
35a14ba021 Now editall and timemodified are in
backup/restore process
2003-08-16 11:31:32 +00:00
moodler
7140a97ae3 Missing string, bug in call to get_string 2003-08-09 12:40:08 +00:00
stronk7
642ac84855 Added suport to new restoreto options 2003-08-02 23:37:41 +00:00
stronk7
d37ca7c7f8 Chanfed to locate the pclzip properly. 2003-08-01 23:36:07 +00:00
moodler
9c1ae5ae32 Removed $moodle_home and $mods_home references.
Also removed direct references to $backup_version and $backup_release

backup.php now accepts teachers of their own course
2003-08-01 14:34:11 +00:00