$weight) { $qid = intval($qid); $weight = intval($weight); $orders = $_POST['ordering']; asort($orders); $orders = array_keys($orders); foreach ($orders as $k => $id) $orders[$k] = intval($id); $orders = array_flip($orders); $testsQuestionsAssocDAO->Update($tid, $qid, $weight, $orders[$qid]+1); $count++; } $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY'); header('Location: '.$_SERVER['PHP_SELF'] .'?tid='.$tid.'&_course_id='.$_course_id); exit; } $cats = array(); $cats[0] = _AT('cats_uncategorized'); $cat_rows = $testsQuestionsCategoriesDAO->getByCourseID($_course_id); if (is_array($cat_rows)) { foreach ($cat_rows as $cat_row) { $cats[$cat_row['category_id']] = $cat_row['title']; } } require_once(TR_INCLUDE_PATH.'header.inc.php'); $row = $testsDAO->get($tid); echo '