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
14 define('TR_INCLUDE_PATH', '../include/');
\r
15 require_once(TR_INCLUDE_PATH.'vitals.inc.php');
\r
16 require_once(TR_INCLUDE_PATH.'classes/DAO/TestsQuestionsCategoriesDAO.class.php');
\r
17 require_once(TR_INCLUDE_PATH.'classes/Utility.class.php');
\r
19 global $_course_id, $msg;
\r
21 Utility::authenticate(TR_PRIV_ISAUTHOR_OF_CURRENT_COURSE);
\r
23 if (isset($_POST['edit'], $_POST['category'])) {
\r
24 // debug('question_cats_manage.php?catid='.$_POST['category'].'&_course_id='.$_course_id);exit;
\r
25 header('Location: question_cats_manage.php?catid='.$_POST['category'].'&_course_id='.$_course_id);
\r
27 } else if (isset($_POST['delete'], $_POST['category'])) {
\r
28 header('Location: question_cats_delete.php?catid='.$_POST['category'].'&_course_id='.$_course_id);
\r
30 } else if (!empty($_POST)) {
\r
31 $msg->addError('NO_ITEM_SELECTED');
\r
34 require_once(TR_INCLUDE_PATH.'header.inc.php');
\r
36 $testsQuestionsCategories = new TestsQuestionsCategoriesDAO();
\r
37 $rows = $testsQuestionsCategories->getByCourseID($_course_id);
\r
39 $savant->assign('course_id', $_course_id);
\r
40 $savant->assign('rows', $rows);
\r
41 $savant->assign('msg', $msg);
\r
43 $savant->display('tests/question_cats.tmpl.php');
\r
45 require_once(TR_INCLUDE_PATH.'footer.inc.php'); ?>