preview_mcma.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. // $Id: course_add.php,v 1.10 2005/05/30 11:46:48 bmol Exp $
  3. /*
  4. ==============================================================================
  5. Dokeos - elearning and course management software
  6. Copyright (c) 2004 Dokeos S.A.
  7. Copyright (c) 2003 University of Ghent (UGent)
  8. Copyright (c) 2001 Universite catholique de Louvain (UCL)
  9. Copyright (c) Olivier Brouckaert
  10. For a full list of contributors, see "credits.txt".
  11. The full license can be read in "license.txt".
  12. This program is free software; you can redistribute it and/or
  13. modify it under the terms of the GNU General Public License
  14. as published by the Free Software Foundation; either version 2
  15. of the License, or (at your option) any later version.
  16. See the GNU General Public License for more details.
  17. Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com
  18. ==============================================================================
  19. */
  20. /**
  21. ==============================================================================
  22. * @package dokeos.admin
  23. ==============================================================================
  24. */
  25. /*
  26. ==============================================================================
  27. INIT SECTION
  28. ==============================================================================
  29. */
  30. $langFile = 'survey';
  31. require_once ('../inc/global.inc.php');
  32. api_protect_admin_script();
  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. $table_category = Database :: get_main_table(MAIN_CATEGORY_TABLE);
  38. $table_survey = Database :: get_main_table(MAIN_SURVEY_TABLE);
  39. $table_group = Database :: get_main_table(MAIN_GROUP_TABLE);
  40. $table_question = Database :: get_main_table(MAIN_SURVEYQUESTION_TABLE);
  41. $tool_name = get_lang('ViewQuestions');
  42. $header1 = get_lang('SurveyName');
  43. $header2 = get_lang('GroupName');
  44. $header3 = get_lang('Type');
  45. $interbredcrump[] = array ("url" => "index.php", "name" => get_lang('Survey'));
  46. $coursePathWeb = api_get_path(WEB_COURSE_PATH);
  47. $coursePathSys = api_get_path(SYS_COURSE_PATH);
  48. $questionid = '1';
  49. $enterquestion = $_REQUEST['enterquestion'];
  50. $mutlichkboxtext = $_REQUEST['mutlichkboxtext'];
  51. $surveyid = $_REQUEST['surveyid'];
  52. $groupid = $_REQUEST['groupid'];
  53. $qid = 'Multiple Choice (multiple answer)';
  54. /*if(isset($_REQUEST['back']))
  55. {
  56. $surveyid = $_REQUEST['surveyid'];
  57. $groupid = $_REQUEST['groupid'];
  58. header("location:mcma.php?groupid=$groupid&surveyid=$surveyid");
  59. exit;
  60. }
  61. */
  62. /*
  63. -----------------------------------------------------------
  64. Libraries
  65. -----------------------------------------------------------
  66. */
  67. /*
  68. ==============================================================================
  69. FUNCTIONS
  70. ==============================================================================
  71. */
  72. /*
  73. ==============================================================================
  74. MAIN CODE
  75. ==============================================================================
  76. */
  77. Display::display_header($tool_name);
  78. ?>
  79. <form name="question" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
  80. <input type="hidden" name="action" value="add_question">
  81. <input type="hidden" name="groupid" value="<?=$groupid?>">
  82. <input type="hidden" name="surveyid" value="<?=$surveyid?>">
  83. <table>
  84. <tr>
  85. <td><?php api_display_tool_title($header1) ?></td>
  86. <?php $surveyname = surveymanager::get_surveyname($surveyid); ?>
  87. <td><?php api_display_tool_title($surveyname)?></td>
  88. </tr>
  89. <tr>
  90. <td><?php api_display_tool_title($header2) ?></td>
  91. <?php $groupname = surveymanager::get_groupname($groupid); ?>
  92. <td><?php api_display_tool_title($groupname) ?></td>
  93. </tr>
  94. <tr>
  95. <td><?php api_display_tool_title($header3) ?></td>
  96. <td><?php api_display_tool_title($qid)?></td>
  97. </tr>
  98. <tr>
  99. <td><?php echo get_lang('question'); ?></td>
  100. </tr>
  101. <tr>
  102. <td><textarea cols="50" rows="6" name="questions"> <?echo $enterquestion;?></textarea></td>
  103. </tr>
  104. <tr>
  105. <td></br><?php echo get_lang('answer'); ?></td>
  106. </tr>
  107. <tr>
  108. <?
  109. for($i=1;$i<=10;$i++)
  110. {
  111. ?><tr><td><textarea name="yes" cols="50" rows="3"><?echo $mutlichkboxtext[$i];?></textarea></td></tr>
  112. <?
  113. }
  114. ?>
  115. <td></br><input type="button" name="back" value="<?php echo get_lang('back'); ?>" onClick="javascript:history.go(-1);"></td>
  116. <!-- <td></br><input type="submit" value="<?php echo get_lang('import'); ?>"></td>-->
  117. </tr>
  118. </table>
  119. </form>
  120. <?php
  121. //<textarea rows="4" name="comment"></textarea>
  122. /*
  123. ==============================================================================
  124. FOOTER
  125. ==============================================================================
  126. */
  127. Display :: display_footer();
  128. ?>