moodleou / moodle-mod_ouwiki

Alternative wiki module for Moodle 2 (designed for use in teaching and learning)
36 stars 32 forks source link

Restore from Moodle 19 does not work (testing Nicolas Dunand proposal) #8

Closed nadavkav closed 11 years ago

nadavkav commented 12 years ago

I am getting: XML : /var/moodledata-macam-moodle2/temp/backup/36854ff225a54f5756b5db0b9d302792/activities/ouwiki_8522/ouwiki.xml Missing

Debug info: Error code: missing_moodle_backup_xml_file Stack trace: line 80 of /backup/util/plan/restore_structure_step.class.php: restore_step_exception thrown line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute() line 192 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute() line 163 of /backup/util/plan/base_plan.class.php: call to restore_activity_task->execute() line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute() line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute() line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan() line 46 of /backup/restore.php: call to restore_ui->execute()

Although the source zipped Moodle 19 backup include the XML file of the original OUWiki activity and all its pages no ouwiki.xml file is created during the Moodle 2 restore. 36854ff225a54f5756b5db0b9d302792/activities/ouwiki_8522/ has only : temp/backup/36854ff225a54f5756b5db0b9d302792/activities/ouwiki_8522/grades.xml /temp/backup/36854ff225a54f5756b5db0b9d302792/activities/ouwiki_8522/module.xml /temp/backup/36854ff225a54f5756b5db0b9d302792/activities/ouwiki_8522/roles.xml

nadavkav commented 11 years ago

Any news on this?

( I have recently came across many Moodle 19 courses that uses ouwiki which I could not restore into Moodle 2.4 )

sammarshallou commented 11 years ago

Nadav: We didn't write, test, or use the restore from 1.9 code; it was implemented by Mark Nielsen. I'm afraid we don't support it here but we'd appreciate any fixes from the community.

nadavkav commented 11 years ago

I will try it and let you know :-)

nadavkav commented 11 years ago

We found the bug :-) OUWiki module backup process on Moodle 19 was adding a redundant "/n" to the ouwiki module XML tag when it was using the full_tag XML function. public function tag_full($tag,$content,$endline=true) { Should be $endline=false) { And on some other functions too.

We have a patch for mod/ouwiki for Moodle 19 (I will post it here soon) but... We wonder if this should be fixed in Moodle 2+ instead of Moodle 19 Any ideas?

jason-platts commented 11 years ago

Thanks a patch for 1.9 would be useful for any other users that have this issue and chance upon here. (though sounds like you could just do a find/replace on the backup XML file in a text editor)

From my brief look I couldn't see any way of fixing the XML in Moodle 2 prior to the conversion so I think fixing the source of the issue in 1.9 is the way to go.

Closing this issue as not Moodle 2 related...

nadavkav commented 11 years ago

Moodle 19 fix: https://github.com/nadavkav/RTL-BIDI-Hebrew-Moodle-Plugins/commit/1abc7c7713eaafe6b83c7306cc8cff36ec5ae7fd