2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************/
13 define('AT_INCLUDE_PATH', '../../../include/');
14 require(AT_INCLUDE_PATH.'vitals.inc.php');
16 authenticate(AT_PRIV_COURSE_TOOLS);
19 if (isset($_POST['cancel'])) {
20 $msg->addFeedback('CANCELLED');
21 header('Location: modules.php');
26 if (isset($_POST['submit'])) {
29 $_stack_names = array();
31 $_stack_names = array_keys($_stacks);
33 $_POST['stack'] = array_unique($_POST['stack']);
34 $_POST['stack'] = array_intersect($_POST['stack'], $_stack_names);
36 $side_menu = implode('|', $_POST['stack']);
38 $sql = "UPDATE ".TABLE_PREFIX."courses SET side_menu='$side_menu' WHERE course_id=$_SESSION[course_id]";
39 $result = mysql_query($sql, $db);
40 $msg->addFeedback('COURSE_PREFS_SAVED');
41 header('Location: side_menu.php');
45 require(AT_INCLUDE_PATH.'header.inc.php');
46 $savant->display('instructor/course_tools/side_menu.tmpl.php');
47 require(AT_INCLUDE_PATH.'footer.inc.php'); ?>