question_type.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. /*
  3. DOKEOS - elearning and course management software
  4. For a full list of contributors, see documentation/credits.html
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. See "documentation/licence.html" more details.
  10. Contact:
  11. Dokeos
  12. Rue des Palais 44 Paleizenstraat
  13. B-1030 Brussels - Belgium
  14. Tel. +32 (2) 211 34 56
  15. */
  16. /**
  17. * @package dokeos.survey
  18. * @author
  19. * @version $Id: question_type.php 10680 2007-01-11 21:26:23Z pcool $
  20. */
  21. /*
  22. ==============================================================================
  23. INIT SECTION
  24. ==============================================================================
  25. */
  26. // name of the language file that needs to be included
  27. $language_file = 'survey';
  28. // including the global dokeos file
  29. require_once ('../inc/global.inc.php');
  30. // including additional libraries
  31. /** @todo check if these are all needed */
  32. /** @todo check if the starting / is needed. api_get_path probably ends with an / */
  33. require_once (api_get_path(LIBRARY_PATH).'/fileManage.lib.php');
  34. require_once (api_get_path(CONFIGURATION_PATH) ."/add_course.conf.php");
  35. require_once (api_get_path(LIBRARY_PATH)."/add_course.lib.inc.php");
  36. require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
  37. require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
  38. // Database table definitions
  39. $table_survey = Database :: get_main_table(TABLE_MAIN_SURVEY);
  40. $table_group = Database :: get_main_table(TABLE_MAIN_GROUP);
  41. $table_survey_question = Database :: get_main_table(TABLE_MAIN_SURVEYQUESTION);
  42. $tool_name = get_lang('SelectQuestionByType');
  43. $interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('Survey'));
  44. //$questtype=$_POST['add_question'];
  45. Display::display_header($tool_name);
  46. api_display_tool_title($tool_name);
  47. ?>
  48. <SCRIPT LANGUAGE="JavaScript" src="set_default_value.js"></SCRIPT>
  49. <SCRIPT LANGUAGE="JavaScript" src="validatelibraryitems.js"></script>
  50. <table>
  51. <tr>
  52. <td>
  53. <?php api_display_tool_title($group_name);?>
  54. </td>
  55. </tr>
  56. </table>
  57. <?php
  58. if( isset($error_message) )
  59. {
  60. Display::display_error_message($error_message);
  61. }
  62. ?>
  63. <form name="question" method="post" action="question_bytype.php">
  64. <table>
  65. <tr>
  66. <td>
  67. <?php echo get_lang('Selectype');?>
  68. </td>
  69. <td>
  70. <select name="add_question">
  71. <option value="0"><?php echo get_lang('Select');?></option>
  72. <option value="<?php echo get_lang('YesNo');?>" <?php if(isset($_POST['add_question'])){if($_POST['add_question']=="1")echo "selected";}?>><?php echo get_lang('YesNo');?></option>
  73. <option value="<?php echo get_lang('MultipleChoiceSingle');?>" <?php if(isset($_POST['add_question'])){if($_POST['add_question']=="2")echo "selected";}?>><?php echo get_lang('MultipleChoiceSingle');?></option>
  74. <option value="<?php echo get_lang('MultipleChoiceMulti');?>" <?php if(isset($_POST['add_question'])){if($_POST['add_question']=="3")echo "selected";}?>><?php echo get_lang('MultipleChoiceMulti');?></option>
  75. <option value="<?php echo get_lang('Open');?>" <?php if(isset($_POST['add_question'])){if($_POST['add_question']=="4")echo "selected";}?>><?php echo get_lang('Open');?></option>
  76. <option value="<?php echo get_lang('Numbered');?>" <?php if(isset($_POST['add_question'])){if($_POST['add_question']=="5")echo "selected";}?>><?php echo get_lang('Numbered');?></option>
  77. </select>
  78. </td>
  79. </tr>
  80. <tr></tr>
  81. <tr>
  82. <td></td>
  83. <td>
  84. <input type="submit" name= 'next' value="<?php echo get_lang('Next');?>">
  85. </td>
  86. </tr>
  87. </table>
  88. </form>
  89. <?php
  90. Display :: display_footer();
  91. ?>