2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2010 */
6 /* Inclusive Design Institute */
8 /* This program is free software. You can redistribute it and/or */
9 /* modify it under the terms of the GNU General Public License */
10 /* as published by the Free Software Foundation. */
11 /************************************************************************/
13 define('TR_INCLUDE_PATH', '../include/');
14 require_once(TR_INCLUDE_PATH.'vitals.inc.php');
15 require_once(TR_INCLUDE_PATH.'classes/testQuestions.class.php');
16 require_once(TR_INCLUDE_PATH.'classes/DAO/TestsDAO.class.php');
17 require_once(TR_INCLUDE_PATH.'classes/Utility.class.php');
20 Utility::authenticate(TR_PRIV_ISAUTHOR_OF_CURRENT_COURSE);
21 $testsDAO = new TestsDAO();
23 $tid = intval($_GET['tid']);
25 /* Retrieve the content_id of this test */
26 if (!($test_row = $testsDAO->get($tid))) {
27 $msg->addError('ITEM_NOT_FOUND');
28 header('Location: index.php?_course_id='.$_course_id);
33 if (!test_qti_export($tid, $test_row['title'])) {
34 $msg->addInfo('TEST_NO_QUESTION');
35 header('Location: index.php?_course_id='.$_course_id);