Backup/Restore Null Value Issue

Backup/Restore Null Value Issue

by Marc Veenstra -
Number of replies: 2

Whilst preparing processes for setting up courses for 2011 I encountered a problem with course backups not restoring. Some reading on the forums and tinkering with my files has identified the problem as being the following two lines in the Moodle.xml file:

<

<

If either of these two items contains the $@NULL@$ value the restore process dies. I can edit the Moodle.xml file and strip those values out to allow the restore to work but I would prefer to find out to to backup my course with the value!

Any suggestions?

I am using version 1.9.7 with MS SQL2005 and php 5.2.8. The server was set up fresh at the start of the year, ie. no upgrades have occurred on the courses at all. I am attempting to do the restore to the same server so there should be no version/schema problems. This issue also prevents importing directly from another course on the server.

Cheers,

Marc

ALLTEXT>$@NULL@$</ALLTEXT>POPUP>$@NULL@$</POPUP>
Average of ratings: -
In reply to Marc Veenstra

Re: Backup/Restore Null Value Issue

by K K -
Hello Marc
My system is windows 2003 r2, mssql 2005 and moodle 1.9.5. I also have troubles with restoring backups.
I open my 'moodle.xml' file and change all '$@NULL@$' to just 'NULL'. After this course restores normal. You may will have disabled the restore files from users and courses. And put it on server manualy. Write if you do that.

with best regards and sorry for my english
In reply to K K

Re: Backup/Restore Null Value Issue

by K K -
Maybe this helps to create right backups:
This code in backuplib.php

if (is_null($content)) {
$content = '$@NULL@$';

replace with

if (is_null($content)) {
$content = 'NULL';