remove old readme
[atutor.git] / docs / mods / _core / courses / admin / create_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$
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 require(AT_INCLUDE_PATH.'../mods/_core/courses/lib/course.inc.php');
20
21 if (isset($_POST['cancel'])) {
22         $msg->addFeedback('CANCELLED');
23         header('Location: '.AT_BASE_HREF.'mods/_core/courses/admin/courses.php');
24         exit;
25 } else if (isset($_POST['form_course'])) {
26         $errors = add_update_course($_POST, TRUE);
27 //debug($_POST);
28         if ($errors !== FALSE) {
29                 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
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 = 0;
40 $isadmin   = TRUE;
41 $sql = "SELECT member_id, login FROM ".TABLE_PREFIX."members WHERE status=".AT_STATUS_INSTRUCTOR;
42 $result = mysql_query($sql, $db);
43
44 $savant->assign('result', $result);
45 $savant->assign('course', $course);
46 $savant->assign('isadmin', $isadmin);
47
48
49
50 require(AT_INCLUDE_PATH.'../mods/_core/courses/html/course_properties.inc.php');
51
52 require(AT_INCLUDE_PATH.'footer.inc.php');
53
54 ?>