mcsa_view.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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: mcsa_view.php 10680 2007-01-11 21:26:23Z 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. $table_category = Database :: get_main_table(TABLE_MAIN_CATEGORY);
  44. $table_survey = Database :: get_course_table(TABLE_SURVEY);
  45. $table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
  46. $table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
  47. $tool_name = get_lang('ViewQuestions');
  48. $header1 = get_lang('SurveyName');
  49. $header2 = get_lang('GroupName');
  50. $header3 = get_lang('Type');
  51. $ques_id = $_GET['qid'];
  52. $ques_type = $_GET['qtype'];
  53. $db_name = $_REQUEST['db_name'];
  54. $sql = "SELECT * FROM $table_survey_question where qid=$ques_id";
  55. $res = api_sql_query($sql);
  56. $obj = mysql_fetch_object($res);
  57. ?>
  58. <html>
  59. <head>
  60. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  61. <title>White Template</title>
  62. <link href="../survey/css_white/style.css" rel="stylesheet" type="text/css">
  63. <style type="text/css">
  64. <!--
  65. body {
  66. margin-left: 0px;
  67. margin-top: 0px;
  68. margin-right: 0px;
  69. margin-bottom: 0px;
  70. }
  71. .style5 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
  72. -->
  73. </style>
  74. </head>
  75. <body>
  76. <table width="100%" cellpadding="0" cellspacing="1" bordercolor="#000000" bgcolor="#000000">
  77. <tr>
  78. <td width="66%" bgcolor="#FFFFFF" class="bg-3">&nbsp;&nbsp;<span class="text">My Portal &gt; Course Home &gt; Survey</span></td>
  79. <td width="34%" align="right" bgcolor="#FFFFFF" class="bg-3"><span class="text"></span>&nbsp;</td>
  80. </tr>
  81. <tr bgcolor="#FFFFFF">
  82. <td colspan="2" align="center" valign="top"><br>
  83. <br>
  84. <table width="600" border="0" cellspacing="0" cellpadding="0">
  85. <tr>
  86. <td width="23" height="21"><img src="../survey/images_white/top-1.gif" width="23" height="21"></td>
  87. <td height="21" background="../survey/images_white/top-2.gif">&nbsp;</td>
  88. <td width="20" height="21"><img src="../survey/images_white/top-3.gif" width="20" height="21"></td>
  89. </tr>
  90. <tr>
  91. <td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
  92. <td><strong>Question: </strong><br><?php echo $obj->caption;?><br><br><strong>Answers: </strong><br>
  93. <?php
  94. for($i=1;$i<10;$i++)
  95. {
  96. $temp = "a".$i;
  97. if(empty($obj->$temp))
  98. break;
  99. else
  100. {
  101. ?>
  102. <textarea cols="50" rows="3" disabled='true'><?php echo $obj->$temp;?></textarea>
  103. <input name="radiobutton" type="radio" value="radiobutton"><br>
  104. <?php
  105. }
  106. }
  107. ?>
  108. </td>
  109. <td background="../survey/images_white/right.gif">&nbsp;</td>
  110. </tr>
  111. <tr>
  112. <td background="../survey/images_white/left.gif">&nbsp;</td>
  113. <td><p>&nbsp;</p>
  114. </td>
  115. <td background="../survey/images_white/right.gif">&nbsp;</td>
  116. </tr>
  117. <tr>
  118. <td><img src="../survey/images_white/bottom-1.gif" width="23" height="21"></td>
  119. <td background="../survey/images_white/bottom-2.gif">&nbsp;</td>
  120. <td><img src="../survey/images_white/bottom-3.gif" width="20" height="21"></td>
  121. </tr>
  122. </table>
  123. <p><br>
  124. <br>
  125. </p>
  126. <p>&nbsp;</p>
  127. <p>&nbsp; </p></td>
  128. </tr>
  129. <tr align="right" bgcolor="#FFFFFF">
  130. <td height="30" align="left" class="bg-4">&nbsp;&nbsp;<span class="text">Manager : </span><span class="text-2">user admin</span> </td>
  131. <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>
  132. </tr>
  133. </table>
  134. </body>
  135. </html>