From 61b516be769b7c2e17bf3faf703740c4a95e2de0 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 17 Oct 2007 17:22:08 +0200 Subject: [PATCH] [svn r13516] Added XSD schemas in SCORM export --- main/newscorm/learnpath.class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 3df18fa3e3..3b3a5e73aa 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -7868,6 +7868,20 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') EOD; file_put_contents($garbage_path.$temp_dir_short.'/document/non_exportable.html', $file_content); + //Add the extra files that go along with a SCORM package + $main_code_path = api_get_path(SYS_CODE_PATH).'newscorm/packaging/'; + $extra_files = scandir($main_code_path); + foreach($extra_files as $extra_file) + { + if(strpos($extra_file,'.')===0) continue; + else + { + $dest_file = $garbage_path.$temp_dir_short.'/'.$extra_file; + $this->create_path($dest_file); + copy($main_code_path.$extra_file,$dest_file); + } + } + //Finalize the imsmanifest structure, add to the zip, then return the zip $xmldoc->save($garbage_path.'/'.$temp_dir_short.'/imsmanifest.xml');