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/Utility.class.php');
\r
19 Utility::authenticate(TR_PRIV_ISAUTHOR_OF_CURRENT_COURSE);
\r
21 if (isset($_GET['submit_create'])) {
\r
22 header('Location: create_question_'.$_GET['question_type'].'.php?_course_id='.$_course_id);
\r
26 $_pages['tests/questions.php?tid='.$_GET['tid'].'&_course_id='.$_course_id]['title_var'] = 'questions';
\r
27 $_pages['tests/questions.php?tid='.$_GET['tid'].'&_course_id='.$_course_id]['parent'] = 'tests/index.php';
\r
28 $_pages['tests/questions.php?tid='.$_GET['tid'].'&_course_id='.$_course_id]['children'] = array('tests/add_test_questions.php');
\r
30 $_pages['tests/add_test_questions.php']['title_var'] = 'add_questions';
\r
31 $_pages['tests/add_test_questions.php']['parent'] = 'tests/questions.php?tid='.$_GET['tid'].'&_course_id='.$_course_id;
\r
33 require_once(TR_INCLUDE_PATH.'header.inc.php');
\r
34 require_once(TR_INCLUDE_PATH.'../tests/classes/TestsUtility.class.php');
\r
37 <?php $tid = intval($_GET['tid']); ?>
\r
38 <div class="input-form">
\r
39 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('category'); ?></legend>
\r
40 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
\r
41 <input type="hidden" name="tid" value="<?php echo $tid; ?>" />
\r
42 <input type="hidden" name="_course_id" value="<?php echo $_course_id; ?>" />
\r
44 <label for="cats"><?php echo _AT('category'); ?></label><br />
\r
45 <select name="category_id" id="cats">
\r
46 <option value="-1"><?php echo _AT('cats_all'); ?></option>
\r
47 <?php TestsUtility::printQuestionCatsInDropDown($_GET['category_id']); ?>
\r
50 <input type="submit" name="filter" value="<?php echo _AT('filter'); ?>" />
\r
51 <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>" />
\r
57 <?php require_once(TR_INCLUDE_PATH.'../tests/html/tests_questions.inc.php'); ?>
\r
59 <?php require_once(TR_INCLUDE_PATH.'footer.inc.php'); ?>