2c1122492339ee3b33da22d9cc68e2156260ca6a
[acontent.git] / docs / home / course / course_start.php
1 <?php
2 /************************************************************************/
3 /* AContent                                                             */
4 /************************************************************************/
5 /* Copyright (c) 2010                                                   */
6 /* Inclusive Design Institute                                           */
7 /*                                                                      */
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
13 define('TR_INCLUDE_PATH', '../../include/');
14 require_once(TR_INCLUDE_PATH.'vitals.inc.php');
15 require_once(TR_INCLUDE_PATH.'classes/DAO/CoursesDAO.class.php');
16
17 global $msg, $contentManager, $_course_id;
18
19 if ($_course_id <= 0)
20 {
21         $msg->addError('MISSING_COURSE_ID');
22         header('Location: '.TR_BASE_HREF.'home/index.php');
23         exit;
24 }
25
26 $msg->addInfo('NO_CONTENT_IN_COURSE');
27
28 require(TR_INCLUDE_PATH.'header.inc.php'); 
29
30 if (isset($_current_user) && $_current_user->isAuthor($_course_id)) {
31         $savant->assign('course_id', $_course_id);
32         $savant->display('home/course/course_start.tmpl.php');
33 }
34 require(TR_INCLUDE_PATH.'footer.inc.php'); 
35 ?>