addFeedback('CANCELLED'); header('Location: index.php?_course_id='.$_course_id); exit; } else if (isset($_POST['submit'])) { $testsDAO = new TestsDAO(); if ($testsDAO->Create($_course_id, $_POST['title'], $_POST['description'])) { $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY'); header('Location: index.php?_course_id='.$_course_id); exit; } } $onload = 'document.form.title.focus();'; $savant->assign('course_id', $_course_id); require_once(TR_INCLUDE_PATH.'header.inc.php'); $msg->printErrors(); $savant->display('tests/create_edit_test.tmpl.php'); require (TR_INCLUDE_PATH.'footer.inc.php'); ?>