$testsQuestionsAssocDAO = new TestsQuestionsAssocDAO();
$question_rows = $testsQuestionsAssocDAO->getByTestID($tid);
- if (!is_array($question_rows)) return;
+ if (!is_array($question_rows)) return false;
else {
foreach ($question_rows as $row) {
$obj = TestQuestions::getQuestion($row['type']);
}
//export
-test_qti_export($tid, $test_row['title']);
+if (!test_qti_export($tid, $test_row['title'])) {
+ $msg->addInfo('TEST_NO_QUESTION');
+ header('Location: index.php?_course_id='.$_course_id);
+ exit;
+}
?>
\ No newline at end of file