Moved scripts in "docs" one level up into root folder. In addition, removed "docs...
[atutor.git] / mods / _core / properties / admin / edit_course.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2010                                              */
6 /* Inclusive Design Institute                                           */
7 /* http://atutor.ca                                                     */
8 /* This program is free software. You can redistribute it and/or        */
9 /* modify it under the terms of the GNU General Public License          */
10 /* as published by the Free Software Foundation.                        */
11 /************************************************************************/
12 // $Id: edit_course.php 10142 2010-08-17 19:17:26Z hwong $
13
14 define('AT_INCLUDE_PATH', '../../../../include/');
15 require(AT_INCLUDE_PATH.'vitals.inc.php');
16 admin_authenticate(AT_ADMIN_PRIV_COURSES);
17
18 require(AT_INCLUDE_PATH.'../mods/_core/backups/classes/Backup.class.php');
19
20 if (isset($_POST['cancel'])) {
21         $msg->addFeedback('CANCELLED');
22         header('Location: ../../courses/admin/courses.php');
23         exit;
24 } else if (isset($_POST['submit'])) {
25         require(AT_INCLUDE_PATH.'../mods/_core/courses/lib/course.inc.php');
26         $errors = add_update_course($_POST, TRUE);
27
28         if (is_numeric($errors)) {
29                 $msg->addFeedback('COURSE_PROPERTIES');
30                 header('Location: '.AT_BASE_HREF.'mods/_core/courses/admin/courses.php');
31                 exit;
32         }
33 }
34
35 require(AT_INCLUDE_PATH.'header.inc.php'); 
36
37 $msg->printAll();
38
39 $course = intval($_REQUEST['course']);
40 $isadmin   = TRUE;
41
42
43 require(AT_INCLUDE_PATH.'../mods/_core/courses/html/course_properties.inc.php');
44
45 require(AT_INCLUDE_PATH.'footer.inc.php'); 
46 ?>