From 69dba3578e8af3e959b1544b00066357ce8c0b78 Mon Sep 17 00:00:00 2001 From: Eric Marguin Date: Thu, 27 Sep 2007 14:48:20 +0200 Subject: [PATCH] [svn r13326] oogie : add the png converted to document tool --- main/newscorm/presentation.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/newscorm/presentation.class.php b/main/newscorm/presentation.class.php index e1f01ae115..b9ac93e96a 100644 --- a/main/newscorm/presentation.class.php +++ b/main/newscorm/presentation.class.php @@ -91,7 +91,6 @@ class presentation extends learnpath { $cmd = 'cd '.api_get_path(SYS_PATH).'main/inc/lib/ppt2png && java '.$classpath.' DocumentConverter '.api_get_setting('service_ppt2lp','host').' 2002'.' "'.$file.'" "'.$base_work_dir.$created_dir.'"'.' '.$slide_width.' '.$slide_height.' '.api_get_setting('service_ppt2lp','user').' '.api_get_setting('service_ppt2lp','ftp_password'); } chmod ($base_work_dir.$created_dir,0777); - $shell = exec($cmd, $files, $return); chmod ($base_work_dir.$created_dir,0755); @@ -110,6 +109,12 @@ class presentation extends learnpath { foreach($files as $file){ $i++; + + // add the png to documents + $document_id = add_document($_course,$created_dir.'/'.$file,'file',filesize($base_work_dir.$created_dir.'/'.$file),$file); + api_item_property_update($_course,TOOL_DOCUMENT,$document_id,'DocumentAdded',$_SESSION['_uid'],$to_group_id,$to_user_id); + + // create an html file $html_file = $file.'.html'; $fp = fopen($base_work_dir.$created_dir.'/'.$html_file, 'w+');