Browse Source

[svn r10209] New import ppt->lp page + Link to this page in lp_list.php

Eric Marguin 18 years ago
parent
commit
ff9e38f88a
2 changed files with 56 additions and 1 deletions
  1. 2 1
      main/newscorm/lp_list.php
  2. 54 0
      main/upload/upload_ppt.php

+ 2 - 1
main/newscorm/lp_list.php

@@ -119,7 +119,8 @@ if(api_is_allowed_to_edit())
       UPLOAD SECTION - displays file upload box
      --------------------------------------*/
 		'<a href="../upload/index.php?curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/download_manager.gif" border="0" alt="scormbuilder" align="absmiddle">&nbsp;'.get_lang("UploadScorm").'</a>'.
-       '</td>' .
+       '</td>' . 
+       '<td>'.str_repeat('&nbsp',10).'<a href="../upload/upload_ppt.php?curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/powerpoint.gif" border="0" alt="scormbuilder" align="absmiddle">&nbsp;'.get_lang("PowerPointConvert").'</a></td>'.
     "</tr>
   </table>";
   

+ 54 - 0
main/upload/upload_ppt.php

@@ -0,0 +1,54 @@
+<?php // $Id$
+/**
+ * Action controller for the upload process. The display scripts (web forms) redirect
+ * the process here to do what needs to be done with each file.
+ * @package dokeos.upload
+ * @author Yannick Warnier <ywarnier@beeznest.org>
+ */
+/**
+ * First, initialise the script 
+ */
+// name of the language file which needs to be included
+// 'inc.php' is automatically appended to the file name
+$langFile = "document"; //the document file is loaded because most of the upload vocab relates to the document tool
+// global settings initialisation
+// also provides access to main api (inc/lib/main_api.lib.php)
+include("../inc/global.inc.php");
+
+$interbreadcrumb[]= array ("url"=>"../newscorm/lp_controller.php?action=list", "name"=> get_lang(TOOL_LEARNPATH));
+$nameTools = get_lang("FileUpload");
+Display :: display_header($nameTools);
+
+
+// check access permissions (edit permission is needed to add a document or a LP)
+$is_allowed_to_edit = api_is_allowed_to_edit();
+
+if(!$is_allowed_to_edit){
+	api_not_allowed();
+}
+
+?>
+
+<img src="../img/oogie.gif">
+
+<?
+
+$message="Welcome to Oogie PowerPoint converter<br>1. Browse your hard disk to find any .ppt or .odp file<br>2. Upload it to Oogie. It will tranform it into a Scorm learning path.<br>3. You will then be allowed to add audio comments on each slide and inserts test between slides for evaluation";
+
+Display::display_normal_message($message);
+
+echo '<br><br>';
+
+echo '<form method="POST" action="">';
+echo '<img src="../img/powerpoint_big.gif" align="absbottom">&nbsp;&nbsp;<input type="file" name="user_file"><br><br><input type="submit" name="submit" value="'.get_lang('ConvertToLP').'">&nbsp;&nbsp;<img src="../img/scormbuilder.gif" align="absmiddle">';
+echo '</form>';
+
+
+/*
+==============================================================================
+  FOOTER
+==============================================================================
+*/
+Display::display_footer();
+
+?>