AC_4897, AC_4898, AC_4899: Multifile uploader fixes.
[acontent.git] / docs / home / course / index.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 if (isset($_sequence_links['resume']['url']))
27         $url = $_sequence_links['resume']['url'];
28 else if (isset($_sequence_links['first']['url']))
29         $url = $_sequence_links['first']['url'];
30 else
31 {
32         $url = TR_BASE_HREF.'home/course/course_start.php?_course_id='.$_course_id;
33 }
34
35 header('Location: '.$url);
36 ?>