e00bb44a7087000d88c3b0d57afad267cab67dcc
[atutor.git] / mods / openmeetings / html / course_meeting.inc.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong                */
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: course_meeting.inc.php 7208 2008-01-09 16:07:24Z harrisw $
14
15 //Check if the room is open, if not.  Print error msg to user.
16 if (!$om_obj->om_getRoom()):
17 ?>
18         <div class="openmeetings">
19                 <h5><?php echo _AT('openmeetings_course_conference'); ?></h5>
20                 <?php echo _AT('openmeetings_no_course_meetings'); ?>
21         </div>
22
23 <?php
24 else:
25         //Get the room id
26         //TODO: Course title added/removed after creation.  Affects the algo here.
27         if (isset($_SESSION['course_title']) && $_SESSION['course_title']!=''){
28                 $room_name = $_SESSION['course_title'];
29         } else {
30                 $room_name = 'course_'.$course_id;
31         }
32
33         //Log into the room
34         $room_id = $om_obj->om_addRoom($room_name);
35         ?>
36         <div class="openmeetings">
37                 <h5><?php echo _AT('openmeetings_course_conference'); ?></h5>
38                 <ul>
39                         <li><a href="mods/openmeetings/view_meetings.php?room_id=<?php echo $room_id . SEP; ?>sid=<?php echo $om_obj->getSid(); ?>"><?php echo $_SESSION['course_title']; ?></a></li>
40                 </ul>
41         </div><br/>
42
43 <?php endif; ?>