question.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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.php 10705 2007-01-12 22:40:01Z pcool $
  20. */
  21. // name of the language file that needs to be included
  22. $language_file = 'survey';
  23. require ('../inc/global.inc.php');
  24. require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
  25. require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
  26. /** @todo replace this with the correct code */
  27. /*
  28. $status = surveymanager::get_status();
  29. api_protect_course_script();
  30. if($status==5)
  31. {
  32. api_protect_admin_script();
  33. }
  34. */
  35. /** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
  36. if (!api_is_allowed_to_edit())
  37. {
  38. Display :: display_header();
  39. Display :: display_error_message(get_lang('NotAllowedHere'));
  40. Display :: display_footer();
  41. exit;
  42. }
  43. $surveyid=$_REQUEST['surveyid'];
  44. $groupid=$_REQUEST['groupid'];
  45. $ques_type = $_GET['qtype'];
  46. $table_category = Database :: get_main_table(TABLE_MAIN_CATEGORY);
  47. $table_survey = Database :: get_course_table(TABLE_SURVEY);
  48. $table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
  49. $table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
  50. $ques_id = $_GET['qid'];
  51. $gname=surveymanager::get_groupname($db_name,$groupid);
  52. $header2 = get_lang('GroupName');
  53. $header2 = $header2." ".$gname;
  54. $header3 = get_lang('Type');
  55. $header3=$header3." ".$ques_type;
  56. $sql = "SELECT * FROM $table_survey_question where qid='$ques_id'";
  57. $res = api_sql_query($sql);
  58. $obj = mysql_fetch_object($res);
  59. $ques=$obj->caption;
  60. ?>
  61. <html>
  62. <head>
  63. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  64. <title>White Template</title>
  65. <link href="../survey/css_white/style.css" rel="stylesheet" type="text/css">
  66. <style type="text/css">
  67. <!--
  68. body {
  69. margin-left: 0px;
  70. margin-top: 0px;
  71. margin-right: 0px;
  72. margin-bottom: 0px;
  73. }
  74. .style5 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
  75. -->
  76. </style>
  77. </head>
  78. <body>
  79. <table width="100%" cellpadding="0" cellspacing="1" bordercolor="#000000" bgcolor="#000000">
  80. <tr>
  81. <td width="66%" bgcolor="#FFFFFF" class="bg-3">&nbsp;&nbsp;<span class="text">My Portal &gt; Course Home &gt; Survey</span></td>
  82. <td width="34%" align="right" bgcolor="#FFFFFF" class="bg-3"><span class="text"></span>&nbsp;</td>
  83. </tr>
  84. <tr bgcolor="#FFFFFF">
  85. <td colspan="2" align="center" valign="top"><br>
  86. <br>
  87. <table width="600" border="0" cellspacing="0" cellpadding="0">
  88. <tr>
  89. <td width="23" height="21"><img src="../survey/images_white/top-1.gif" width="23" height="21"></td>
  90. <td height="21" background="../survey/images_white/top-2.gif">&nbsp;</td>
  91. <td width="20" height="21"><img src="../survey/images_white/top-3.gif" width="20" height="21"></td>
  92. </tr>
  93. <tr>
  94. <td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
  95. <td><strong>Question: </strong><br><?php echo $ques;?><br><br><strong>Answers: </strong><br>
  96. <textarea name="textfield" cols="50" rows="3" disabled='true'><?php echo $obj->a1;?></textarea>
  97. <input name="radiobutton" type="radio" value="radiobutton"><br><textarea name="textfield" cols="50" rows="3" disabled='true'><?php echo $obj->a2;?></textarea>
  98. <input name="radiobutton" type="radio" value="radiobutton"></td>
  99. <td background="../survey/images_white/right.gif">&nbsp;</td>
  100. </tr>
  101. <tr>
  102. <td background="../survey/images_white/left.gif">&nbsp;</td>
  103. <td><p>&nbsp;</p>
  104. </td>
  105. <td background="../survey/images_white/right.gif">&nbsp;</td>
  106. </tr>
  107. <tr>
  108. <td><img src="../survey/images_white/bottom-1.gif" width="23" height="21"></td>
  109. <td background="../survey/images_white/bottom-2.gif">&nbsp;</td>
  110. <td><img src="../survey/images_white/bottom-3.gif" width="20" height="21"></td>
  111. </tr>
  112. </table>
  113. <p><br>
  114. <br>
  115. </p>
  116. <p>&nbsp;</p>
  117. <p>&nbsp; </p></td>
  118. </tr>
  119. <tr align="right" bgcolor="#FFFFFF">
  120. <td height="30" align="left" class="bg-4">&nbsp;&nbsp;<span class="text">Manager : </span><span class="text-2">user admin</span> </td>
  121. <td height="30" class="bg-4"><span class="text">Platform</span> <span class="text-2">Dokeos 1.6.3</span> <span class="text">&copy; 2006&nbsp;&nbsp;</span></td>
  122. </tr>
  123. </table>
  124. </body>
  125. </html>