2 /****************************************************************/
\r
4 /****************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or*/
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /****************************************************************/
\r
14 define('AT_INCLUDE_PATH', '../../../include/');
\r
15 require(AT_INCLUDE_PATH.'vitals.inc.php');
\r
16 require(AT_INCLUDE_PATH.'../mods/_standard/tests/classes/testQuestions.class.php');
\r
17 authenticate(AT_PRIV_TESTS);
\r
19 $_letters = array(_AT('A'), _AT('B'), _AT('C'), _AT('D'), _AT('E'), _AT('F'), _AT('G'), _AT('H'), _AT('I'), _AT('J'));
\r
21 if (isset($_GET['submit'])) {
\r
22 header('Location: '.AT_BASE_HREF.'mods/_standard/tests/question_db.php');
\r
26 if (defined('AT_FORCE_GET_FILE') && AT_FORCE_GET_FILE) {
\r
27 $content_base_href = 'get.php/';
\r
29 $content_base_href = 'content/' . $_SESSION['course_id'] . '/';
\r
32 require(AT_INCLUDE_PATH.'header.inc.php');
\r
34 $qid = $addslashes($_GET['qid']);
\r
35 $sql = "SELECT * FROM ".TABLE_PREFIX."tests_questions WHERE course_id=$_SESSION[course_id] AND question_id IN ($qid)";
\r
36 $result = mysql_query($sql, $db);
\r
39 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
\r
40 <div class="input-form">
\r
42 while ($row = mysql_fetch_assoc($result)) {
\r
43 $obj = TestQuestions::getQuestion($row['type']);
\r
44 $obj->display($row);
\r
47 <div class="row buttons"><input type="submit" name="submit" value="<?php echo _AT('back'); ?>"/></div>
\r
50 <script type="text/javascript">
\r
52 function iframeSetHeight(id, height) {
\r
53 document.getElementById("qframe" + id).style.height = (height + 30) + "px";
\r
57 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>