tagging as ATutor 1.5.4-release
[atutor.git] / admin / edit_course.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2007 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
6 /* Adaptive Technology Resource Centre / University of Toronto                  */
7 /* http://atutor.ca                                                                                                             */
8 /*                                                                                                                                              */
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 // $Id$
14
15 define('AT_INCLUDE_PATH', '../include/');
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
17 admin_authenticate(AT_ADMIN_PRIV_COURSES);
18
19 require(AT_INCLUDE_PATH.'classes/Backup/Backup.class.php');
20
21 if (isset($_POST['cancel'])) {
22         $msg->addFeedback('CANCELLED');
23         header('Location: courses.php');
24         exit;
25 } else if (isset($_POST['course']) && !isset($_POST['setvisual'])) {
26         require(AT_INCLUDE_PATH.'lib/course.inc.php');
27         $errors = add_update_course($_POST, TRUE);
28
29         if (is_numeric($errors)) {
30                 $msg->addFeedback('COURSE_PROPERTIES');
31                 header('Location: '.AT_BASE_HREF.'admin/courses.php');
32                 exit;
33         }
34
35 }
36
37 require(AT_INCLUDE_PATH.'header.inc.php'); 
38
39 $msg->printAll();
40
41 $course = intval($_REQUEST['course']);
42 $isadmin   = TRUE;
43
44
45 require(AT_INCLUDE_PATH.'html/course_properties.inc.php');
46
47 require(AT_INCLUDE_PATH.'footer.inc.php'); 
48 ?>