lp_edit.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php //$id: $
  2. /**
  3. * Script allowing simple edition of learnpath information (title, description, etc)
  4. * @package dokeos.learnpath
  5. * @author Yannick Warnier <ywarnier@beeznest.org>
  6. */
  7. /**
  8. * Script
  9. */
  10. $langFile[] = "learnpath";
  11. $langFile[] = "scormdocument";
  12. $langFile[] = "scorm";
  13. $show_description_field = false; //for now
  14. $nameTools = get_lang("Doc");
  15. event_access_tool(TOOL_LEARNPATH);
  16. if (! $is_allowed_in_course) api_not_allowed();
  17. /**
  18. * Display
  19. */
  20. $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));
  21. $interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=admin_view&lp_id=$learnpath_id", "name" => $_SESSION['oLP']->get_name());
  22. Display::display_header(null,'Path');
  23. api_display_tool_title($nameTools);
  24. if($my_version=='1.8'){
  25. Display::display_introduction_section(TOOL_LEARNPATH);
  26. }else{
  27. api_introductionsection(TOOL_LEARNPATH);
  28. }
  29. ?>
  30. <form name="form1" method="post" action="lp_controller.php">
  31. <h4>
  32. <?php echo get_lang('_edit_learnpath'); ?>
  33. </h4>
  34. <table width="400" border="0" cellspacing="2" cellpadding="0">
  35. <tr>
  36. <td align="right"><?php echo get_lang('_title');?></td>
  37. <td><input name="lp_name" type="text" value="<?php echo $_SESSION['oLP']->get_name();?>" size="50" /></td>
  38. </tr>
  39. <?php if($show_description_field){ ?>
  40. <tr>
  41. <td align="right" valign="top"><?php echo get_lang('_description');?></td>
  42. <td><textarea name='lp_description' cols='45'><?php echo $_SESSION['oLP']->get_description();?></textarea></td>
  43. </tr>
  44. <?php } ?>
  45. <tr>
  46. <td align="right"><?php echo get_lang('Charset');?></td>
  47. <td><select name="lp_encoding">
  48. <?php
  49. $encodings = array('UTF-8','ISO-8859-1','ISO-8859-15','cp1251','cp1252','KOI8-R','BIG5','GB2312','Shift_JIS','EUC-JP');
  50. foreach($encodings as $encoding){
  51. if($encoding == $_SESSION['oLP']->encoding){
  52. echo " <option value='$encoding' selected='selected'>$encoding</option>\n";
  53. }else{
  54. echo " <option value='$encoding'>$encoding</option>\n";
  55. }
  56. }
  57. ?></select></td>
  58. </tr>
  59. <tr>
  60. <td align="right"><?php echo get_lang('Origin');?></td>
  61. <td><select name="lp_maker">
  62. <?php
  63. include('content_makers.inc.php');
  64. foreach($content_origins as $indx => $origin){
  65. echo ' <option value="'.$origin.'">'.$origin.'</option>' ;
  66. }
  67. ?></select></td>
  68. </tr>
  69. <tr>
  70. <td align="right"><?php echo get_lang('Location');?></td>
  71. <td><select name="lp_proximity">
  72. <?php
  73. echo ' <option value="local" selected="selected">'.get_lang('Local')."</option>" .
  74. ' <option value="remote">'.get_lang('Remote')."</option>";
  75. ?></select></td>
  76. </tr>
  77. <tr>
  78. <td align="right">&nbsp;</td>
  79. <input type="hidden" name="action" value="update_lp" />
  80. <input type="hidden" name="lp_id" value="<?php echo $_SESSION['oLP']->get_id(); ?>" />
  81. <td><input type="submit" name="Submit" value="<?php echo get_lang('Ok'); ?>" /></td>
  82. </tr>
  83. </table>
  84. </form>
  85. <?php
  86. Display::display_footer();
  87. ?>