263 Commits

Author SHA1 Message Date
moodler
76eac7a58d FIxed some short PHP tags 2003-09-09 08:38:24 +00:00
paca70
d150f5b476 Quick (untested) fix to make table and index creation work. 2003-08-28 18:24:00 +00:00
stronk7
3b16f21626 Ready !! :-) 2003-08-28 00:50:11 +00:00
stronk7
202ba3902e Now STAMP fiel is supported in backup & restore.
If it exists in backup-file used, else, old search-by-name is used.
When inserting new categories, stamp is filled it it doesn't exist.
Updated version to 1.1 Beta +++ !!
2003-08-27 17:09:01 +00:00
stronk7
461da6bdb6 Now existing categories are used only if their publish
field is set to yes. Else, a new "local" category is created.
Added some lines of code to mantain old compatibility when detecting
existing questions (do it by name if the stamp is not found) and insert
the stamp too !!
Please, test.
2003-08-27 00:40:14 +00:00
stronk7
d04983d8a3 Now restoring workshops are working too !!
Now all is ready to be 1.1 Beta 1.
Congratulations everybody !!
Anyway, some polish must be done, friends...
2003-08-25 22:40:38 +00:00
stronk7
6252f5dcd3 Now workshops backup are included too !!
Only one step to Beta !! (workshop restore)
2003-08-25 19:56:42 +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
fb2fcf3af5 Added some optional_variables to avoid some NOTICES 2003-08-24 14:46:52 +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
stronk7
bbc69d99c1 Changed one notify 2003-08-23 17:02:20 +00:00
stronk7
1923285635 Now stamp and version are fully supported in backup/restore.
The process look for category, stamp and version to calculate
when to create a question or use a existing one.
This avoid duplicates in RANDOM and RANDOMSAMATCH qtypes.
2003-08-23 15:21:58 +00:00
stronk7
a057e13d1f Up to 0.8.9 alpha.
Now multianswer questions are working too.
Too complicated !!
2003-08-23 00:36:08 +00:00
moodler
ae5f8de620 Added some more error messages when restoring 2003-08-22 13:20:06 +00:00
stronk7
6a0e7bafd4 XML support 2003-08-21 22:54:47 +00:00
moodler
e6ea5c0664 Fixed some bad Postgres SQL that I made! :-) 2003-08-20 12:09:15 +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
6466b6bb56 Forgot to change one line !! :-) 2003-08-18 00:04:38 +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
823e087163 Started work with scales !! 2003-08-17 20:17:41 +00:00
stronk7
35a14ba021 Now editall and timemodified are in
backup/restore process
2003-08-16 11:31:32 +00:00
moodler
63bcc9b55b Use isteacheredit instead of isteacher 2003-08-16 06:37:06 +00:00
stronk7
f43f3f65bc Solved one important bug in RANDOM(4) and RANDOMSAMATCH(6)
question types.
And modified some of the quiz_answers restore system to
allow remapping answers with existing questions.
//Detected by scott dot elliott at mchsi dot com in Bug 84
2003-08-15 11:08:51 +00:00
stronk7
d968b8e61a Included and commented one new debug 2003-08-15 11:03:07 +00:00
moodler
7140a97ae3 Missing string, bug in call to get_string 2003-08-09 12:40:08 +00:00
moodler
6a2d42e6fb Changed function name 2003-08-07 16:04:54 +00:00
moodler
81d3268da1 Remove login link on first install 2003-08-07 06:56:34 +00:00
stronk7
80de201bfc Updated.
Now chat modules are included in backup and restore
2003-08-03 22:48:41 +00:00
stronk7
51de923ed1 Reuse an existing string. 2003-08-03 15:15:23 +00:00
stronk7
fa383df984 Solved bug. Now user files are checked againt users to backup.
Before this every thir under users was in backup.
2003-08-03 09:39:27 +00:00
stronk7
4398d023a9 Updated:
- Teachers can backup/restore their courses.
- New option "restore to existing, deleting old".
- backupdata dirname harcoded.
- backup and restore buttons in main course page.
2003-08-03 01:05:38 +00:00
stronk7
be2a6fc6ca Teacher restoring and admin restoring finished.
Allow restore into new course (only admins),
      restore into existing course deleting old and
      restore into existing course adding to old
Teachers are limited to "current course" while admins ca
select any course. :-)
2003-08-03 00:42:41 +00:00
stronk7
35ea159433 delete_dir_contents function now allows excluding a dir 2003-08-03 00:40:08 +00:00
stronk7
642ac84855 Added suport to new restoreto options 2003-08-02 23:37:41 +00:00
stronk7
0c6e10b33e Now "backupdir" string is hardcoded in backup process. 2003-08-02 16:13:44 +00:00
stronk7
9e426d54ee Added preliminary support to teachers.
Not working yet.
2003-08-02 16:06:33 +00:00
stronk7
8f7ab28112 Now "backupdir" string is hardcoded in backup process.
Backup of logs in chunks is included, but the limit
clause doesn't seem to work. I'll test it later.
2003-08-02 16:03:00 +00:00
stronk7
1692281e40 Minor change to allow continue after upgrade_backup 2003-08-02 10:32:57 +00:00
stronk7
e9346b95b7 backup_release is now saved to config too. It was losed in lastest changes
to update module facility !!
2003-08-01 23:46:49 +00:00
stronk7
d37ca7c7f8 Chanfed to locate the pclzip properly. 2003-08-01 23:36:07 +00:00
moodler
bd38123e98 Completed mods to allow teachers to make backups 2003-08-01 14:42:14 +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
moodler
10dcde409b Further integration of backup into main Moodle.
The database checks/upgrades are now done on the main
admin page like the other modules.

The database files are now standard format .sql and .php files

PostgreSQL support was added - BUT HAS NOT BEEN TESTED YET!!
2003-08-01 13:59:17 +00:00
stronk7
101735cc89 Included fix_category_courses() to
adjust the new category structure
2003-07-31 18:01:45 +00:00
stronk7
f5786441aa Changed to version.php
(to be more consistent with the rest of the modules)
2003-07-31 16:56:40 +00:00
stronk7
2c54aa080b Copied from old backup_version.php
(to be more consistent with the rest of the modules)
2003-07-31 16:55:11 +00:00
stronk7
d538d4008f Changed calls to backup_version.php to version.php
(to be more consistent with the rest of the modules)
2003-07-31 16:54:05 +00:00