2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2010 */
\r
6 /* Inclusive Design Institute */
\r
8 /* This program is free software. You can redistribute it and/or */
\r
9 /* modify it under the terms of the GNU General Public License */
\r
10 /* as published by the Free Software Foundation. */
\r
11 /************************************************************************/
\r
13 define('TR_INCLUDE_PATH', '../include/');
\r
14 require_once(TR_INCLUDE_PATH.'vitals.inc.php');
\r
15 require_once(TR_INCLUDE_PATH.'classes/testQuestions.class.php');
\r
16 require_once(TR_INCLUDE_PATH.'classes/DAO/TestsQuestionsDAO.class.php');
\r
17 require_once(TR_INCLUDE_PATH.'classes/Utility.class.php');
\r
20 Utility::authenticate(TR_PRIV_ISAUTHOR_OF_CURRENT_COURSE);
\r
21 $testsQuestionsDAO = new TestsQuestionsDAO();
\r
23 $_letters = array(_AT('A'), _AT('B'), _AT('C'), _AT('D'), _AT('E'), _AT('F'), _AT('G'), _AT('H'), _AT('I'), _AT('J'));
\r
25 if (isset($_GET['submit'])) {
\r
26 header('Location: '.TR_BASE_HREF.'tests/question_db.php?_course_id='.$_course_id);
\r
30 if (defined('TR_FORCE_GET_FILE') && TR_FORCE_GET_FILE) {
\r
31 $content_base_href = 'get.php/';
\r
33 $content_base_href = 'content/' . $_SESSION['course_id'] . '/';
\r
36 require_once(TR_INCLUDE_PATH.'header.inc.php');
\r
38 $qids = explode(',', $_GET['qid']);
\r
39 $rows = $testsQuestionsDAO->getByQuestionIDs($qids);
\r
42 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
\r
43 <input type="hidden" name="_course_id" value="<?php echo $_course_id; ?>" />
\r
44 <div class="input-form">
\r
46 if (is_array($rows)) {
\r
47 foreach ($rows as $row) {
\r
48 $obj = TestQuestions::getQuestion($row['type']);
\r
49 $obj->display($row);
\r
53 <div class="row buttons"><input type="submit" name="submit" value="<?php echo _AT('back'); ?>"/></div>
\r
56 <script type="text/javascript">
\r
58 function iframeSetHeight(id, height) {
\r
59 document.getElementById("qframe" + id).style.height = (height + 30) + "px";
\r
63 <?php require_once(TR_INCLUDE_PATH.'footer.inc.php'); ?>