Index: temp_moodle_dev/moodle/mod/chat/lib.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/chat/lib.php,v diff -u -r1.2 -r1.3 --- temp_moodle_dev/moodle/mod/chat/lib.php 16 Jan 2009 06:00:13 -0000 1.2 +++ temp_moodle_dev/moodle/mod/chat/lib.php 20 Jul 2009 06:01:36 -0000 1.3 @@ -908,13 +908,12 @@ */ function chat_import_instance($filepath, $userid, $courseid, $sectionid) { // file contents contains serialized chat object - $filestr = file_get_contents($filepath); - $all=unserialize($filestr); - + $filestr = file_get_contents($filepath); + $all=unserialize($filestr); + //we split the array so we can get the chat and its submissions - $chat = $all[0]; - // $messages = $all[1]; - // $users = $all[2]; + $chat = $all; + // import this chat into a new course $chat->course = $courseid;