You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by op...@codespot.com on 2012/10/31 10:00:34 UTC

[openmeetings-atutor-plugin] r2 committed - ATutor plugin moved to apache-extras.org

Revision: 2
Author:   seba.wagner
Date:     Wed Oct 31 01:59:58 2012
Log:      ATutor plugin moved to apache-extras.org
http://code.google.com/a/apache-extras.org/p/openmeetings-atutor-plugin/source/detail?r=2

Added:
  /trunk/.project
  /trunk/build.xml
  /trunk/openmeetings
  /trunk/openmeetings/CHANGELOG.txt
  /trunk/openmeetings/DISCLAIMER.txt
  /trunk/openmeetings/LICENSE.txt
  /trunk/openmeetings/NOTICE.txt
  /trunk/openmeetings/README.txt
  /trunk/openmeetings/add_group_meetings.php
  /trunk/openmeetings/html
  /trunk/openmeetings/html/course_meeting.inc.php
  /trunk/openmeetings/html/create_room.inc.php
  /trunk/openmeetings/html/create_room.tmpl.php
  /trunk/openmeetings/html/edit_room.inc.php
  /trunk/openmeetings/html/group_meeting.inc.php
  /trunk/openmeetings/html/update_room.inc.php
  /trunk/openmeetings/index.php
  /trunk/openmeetings/lib
  /trunk/openmeetings/lib/REST_openmeetings.php
  /trunk/openmeetings/lib/openmeetings.class.php
  /trunk/openmeetings/lib/openmeetings.inc.php
  /trunk/openmeetings/module.css
  /trunk/openmeetings/module.php
  /trunk/openmeetings/module.sql
  /trunk/openmeetings/module.xml
  /trunk/openmeetings/module_install.php
  /trunk/openmeetings/module_uninstall.php
  /trunk/openmeetings/openmeetings.php
  /trunk/openmeetings/openmeetings_delete.php
  /trunk/openmeetings/openmeetings_group.php
  /trunk/openmeetings/openmeetings_instructor.php
  /trunk/openmeetings/openmeetings_logo.png
  /trunk/openmeetings/view_meetings.php

=======================================
--- /dev/null
+++ /trunk/.project	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>atutor_plugin</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
=======================================
--- /dev/null
+++ /trunk/build.xml	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ -->
+<!DOCTYPE project>
+<project name="openmeetings atutor plugin" basedir="./" default="dist-bin"
+	xmlns="antlib:org.apache.tools.ant">
+
+	<property name="dist.dir" value="dist" />
+	<property name="project.version" value="1.0" />
+	<property name="project.distname" value="openmeetings-atutor-plugin" />
+	<property name="plugin.name" value="openmeetings" />
+
+	<target name="dist-bin" depends="clean">
+		<property name="archive.file.name"  
value="${dist.dir}/apache-${project.distname}-incubating-${project.version}"  
/>
+
+		<mkdir dir="${dist.dir}"/>
+		<copy todir="${dist.dir}">
+			<fileset dir="${basedir}">
+				<exclude name=".*"/>
+				<exclude name="dist/**"/>
+				<exclude name="build.xml"/>
+			</fileset>
+		</copy>
+		<zip destfile="${archive.file.name}.zip">
+			<zipfileset dir="${dist.dir}">
+				<include name="${plugin.name}/**/**" />
+			</zipfileset>
+		</zip>
+		<zip destfile="${archive.file.name}-src.zip">
+			<zipfileset dir="${basedir}">
+				<exclude name="*dist/**" />
+			</zipfileset>
+		</zip>
+		<tar longfile="gnu" compression="gzip"  
destfile="${archive.file.name}.tar.gz">
+			<tarfileset dir="${dist.dir}">
+				<include name="${plugin.name}/**/**" />
+			</tarfileset>
+		</tar>
+		<tar longfile="gnu" compression="gzip"  
destfile="${archive.file.name}-src.tar.gz">
+			<tarfileset dir="${basedir}">
+				<exclude name="*dist/**" />
+			</tarfileset>
+		</tar>
+	</target>
+
+	<target name="clean">
+		<delete includeemptydirs="true" dir="${dist.dir}" />
+	</target>
+
+</project>
=======================================
--- /dev/null
+++ /trunk/openmeetings/CHANGELOG.txt	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,50 @@
+Apache OpenMeetings ATutor Plugin Change Log
+
+Todo:
+- Determine between student and instructor in room creation (moderation  
flag 1 vs. 0)
+
+Aug 2, 2012 (Josh Dolitsky)
+------------
+- Refactored plugin to use REST instead of SOAP/NuSOAP Library
+- Updated deprecated OpenMeetings API calls
+- Removed sizing options from room adding (no longer part of API)
+- Modified ATutor module XML file to reflect current info
+- Changed image for module icon
+- Removed extra files from SOAP implementation
+- Added Apache headers and files
+
+Feb 5, 2009 (Harris W.)
+------------
+- Added the ability to delete conference rooms.
+- Now compatible with Openmeetings 0.7RC1 (Red5 7.0+)
+
+June 26, 2008 (Harris W.)
+------------
+- Added the ability to create diff type of rooms: conference/audience
+
+June 25, 2008 (Harris W.)
+------------
+- Admin can now delete or create group meetings
+
+June 19, 2008 (Harris W.)
+------------
+- Allow users to retrieve the recordings.  [June 25, 08 - milestone for  
version 5.3]
+- Make the index page a bit more pretty.
+
+June 11, 2008 (Harris W.)
+------------
+- Allow each group to have their own meeting, anyone in the group can  
start off the meeting, and when all exit, room should be deleted.
+- Course meeting should be triggered by instructor only.  Otherwise page  
should display the meeting time (There is no meeting at the moment.  THe  
next available meeting is at xxxx)
+- Instructor should probably be capable to adjust their own meeting size  
in their own config.
+- Research on how recorded video works, see if we can remove meetings as  
well.
+- admin/openmeetings, check if there is a slash at the end.
+
+June 05, 2008 (Harris W.)
+------------
+- allow admin to change the room size.
+- clean room after course is deleted.
+- though these would be way easier to do it in the openmeeting's end
+- upgrade nusoup script
+- update readme, and write up something that teaches the user to setup red5
+- allow 2 modes
+
=======================================
--- /dev/null
+++ /trunk/openmeetings/DISCLAIMER.txt	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,15 @@
+Apache OpenMeetings ATutor Plugin is an effort undergoing incubation at  
the Apache Software
+Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted projects until a further  
review
+indicates that the infrastructure, communications, and decision making  
process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
+
+For more information about the incubation status of the OpenMeetings  
project you
+can go to the following page:
+
+http://incubator.apache.org/openmeetings/
=======================================
--- /dev/null
+++ /trunk/openmeetings/LICENSE.txt	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,204 @@
+Apache OpenMeetings ATutor Plugin License:
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other  
modifications
+      represent, as a whole, an original work of authorship. For the  
purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces  
of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright  
owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control  
systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this  
License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2012 Josh Dolitsky
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
=======================================
--- /dev/null
+++ /trunk/openmeetings/NOTICE.txt	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,6 @@
+Apache OpenMeetings
+Copyright 2011-2012 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
=======================================
--- /dev/null
+++ /trunk/openmeetings/README.txt	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,13 @@
+This ATutor plugin uses Apache OpenMeetings [Incubating].
+You need your own Apache OpenMeetings instance running.
+
+Be sure Openmeetings is installed and functioning properly before  
attempting to install this module.
+
+Requires Openmeetings to be installed on this server, installation guide  
can be found at:
+http://incubator.apache.org/openmeetings/
+
+Installation
+1. Unzip the module into the ATutor mods/ directory.
+2. Login to ATutor as the administrator and run the ATutor administrator's  
Install Module tool. Select OpenMeetings to install.
+3. Once installed, on the administrator modules screen, enabled to module.
+4. Open the administrator's OpenMeetings screen and enter the URL,  
username and password to the Apache OpenMeetings installion you will be  
using.  The user account must have Admin-rights (at least access to REST  
API).
=======================================
--- /dev/null
+++ /trunk/openmeetings/add_group_meetings.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,143 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+define('AT_INCLUDE_PATH', '../../include/');
+require (AT_INCLUDE_PATH.'vitals.inc.php');
+require ('lib/openmeetings.class.php');
+require ('lib/openmeetings.inc.php');
+
+//Validate
+$_POST['room_id'] = intval($_REQUEST['room_id']);
+
+
+if (isset($_GET['group_id'])){
+	$group_id = intval($_GET['group_id']);
+
+	//TODO
+	//Handles instrcutor as an exception, cuz instructor can go in and create  
room as well
+	if (authenticate(AT_PRIV_OPENMEETINGS, true)){
+		$sql = 'SELECT g.title FROM '.TABLE_PREFIX."groups g WHERE  
g.group_id=$group_id";
+	} else {
+
+		$sql = 'SELECT g.title FROM '.TABLE_PREFIX."groups_members gm INNER  
JOIN ".TABLE_PREFIX."groups g WHERE gm.group_id=$group_id AND  
gm.member_id=$_SESSION[member_id]";
+	}
+
+}
+
+//Initiate Openmeeting
+$om_obj = new Openmeetings($_SESSION['course_id'], $_SESSION['member_id'],  
$group_id);
+
+//Login
+$om_obj->om_login();
+
+//Get the room id
+//TODO: Course title added/removed after creation.  Affects the algo here.
+if ($_row['title']!=''){
+	$room_name = $_row['title'];
+} else {
+	$room_name = 'group_'.$group_id;
+}
+
+//Form action
+//Handle form action
+if (isset($_POST['create_room']) || (isset($_POST['update_room']) &&  
isset($_POST['room_id']))) {
+
+	//mysql escape
+	$_POST['openmeetings_roomtype']				=  
intval($_POST['openmeetings_roomtype']);
+	$_POST['openmeetings_num_of_participants']	=  
intval($_POST['openmeetings_num_of_participants']);
+	(intval($_POST['openmeetings_ispublic']) ==  
1)?$_POST['openmeetings_ispublic']='true':$_POST['openmeetings_ispublic']='false';
+	$_POST['openmeetings_vid_w']				= intval($_POST['openmeetings_vid_w']);
+	$_POST['openmeetings_vid_h']				= intval($_POST['openmeetings_vid_h']);
+	(intval($_POST['openmeetings_show_wb']) ==  
1)?$_POST['openmeetings_show_wb']='true':$_POST['openmeetings_show_wb']='false';
+	$_POST['openmeetings_wb_w']					= intval($_POST['openmeetings_wb_w']);
+	$_POST['openmeetings_wb_h']					= intval($_POST['openmeetings_wb_h']);
+	(intval($_POST['openmeetings_show_fp']) ==  
1)?$_POST['openmeetings_show_fp']='true':$_POST['openmeetings_show_fp']='false';
+	$_POST['openmeetings_fp_w']					= intval($_POST['openmeetings_fp_w']);
+	$_POST['openmeetings_fp_h']					= intval($_POST['openmeetings_fp_h']);
+
+	//create a new room
+	if (isset($_POST['create_room'])){
+		//Get the room id
+		//TODO: Course title added/removed after creation.  Affects the algo  
here.
+		if (isset($_SESSION['course_title']) && $_SESSION['course_title']!=''){
+			$room_name = $_SESSION['course_title'];
+		} else {
+			$room_name = 'course_'.$course_id;
+		}
+
+		//add the room with the given parameters.
+		$om_obj->om_addRoom($room_name, $_POST);
+
+		$msg->addFeedback('OPENMEETINGS_ADDED_SUCEEDED');
+		header('Location: index.php');
+		exit;
+	} elseif (isset($_POST['update_room'])){
+		//update a room
+		$om_obj->om_updateRoom(intval($_POST['room_id']), $_POST);
+		$msg->addFeedback('OPENMEETINGS_UPDATE_SUCEEDED');
+		header('Location: index.php');
+		exit;
+	}
+} elseif (isset($_POST['cancel'])){
+	$msg->addFeedback('OPENMEETINGS_CANCELLED');
+	header('Location: index.php');
+	exit;
+} elseif (isset($_REQUEST['edit_room']) && isset($_POST['room_id'])){
+	//Log into the room
+	$room_id = $_POST['room_id'];
+
+	//Get the room obj
+	$room_obj = $om_obj->om_getRoomById($room_id);
+
+	//Assign existing variables to the room
+	$_POST['openmeetings_roomtype']				= intval($room_obj['roomtypes_id']);
+	$_POST['openmeetings_room_name']			= $addslashes($room_obj['name']);
+	$_POST['openmeetings_num_of_participants']	=  
$addslashes($room_obj['numberOfPartizipants']);
+	 
(($room_obj['ispublic'])=='true')?$_POST['openmeetings_ispublic']=1:$_POST['openmeetings_ispublic']=0;
+	$_POST['openmeetings_vid_w']				= intval($room_obj['videoPodWidth']);
+	$_POST['openmeetings_vid_h']				= intval($room_obj['videoPodHeight']);
+	 
(($room_obj['return']['showWhiteBoard'])=='true')?$_POST['openmeetings_show_wb']=1:$_POST['openmeetings_show_wb']=0;
+	$_POST['openmeetings_wb_w']					=  
intval($room_obj['whiteBoardPanelWidth']);
+	$_POST['openmeetings_wb_h']					=  
intval($room_obj['whiteBoardPanelHeight']);
+	 
(($room_obj['return']['showFilesPanel'])=='true')?$_POST['openmeetings_show_fp']=1:$_POST['openmeetings_show_fp']=0;
+	$_POST['openmeetings_fp_w']					= intval($room_obj['filesPanelWidth']);
+	$_POST['openmeetings_fp_h']					= intval($room_obj['filesPanelHeight']);
+	include (AT_INCLUDE_PATH.'header.inc.php');
+	include ('html/update_room.inc.php');
+	include (AT_INCLUDE_PATH.'footer.inc.php');
+	exit;
+} elseif (isset($_GET['action']) && $_GET['action'] == 'view'){
+	$room_id = intval($_GET['room_id']);
+	$sid	 = $addslashes($_GET['sid']);
+	header('Location: view_meetings.php?room_id='.$room_id.SEP.'sid='.$sid);
+	exit;
+}
+
+$room_id = $om_obj->om_getRoom();
+
+require (AT_INCLUDE_PATH.'header.inc.php');
+if ($room_id == false) {
+	include ('html/create_room.inc.php');
+} else {
+	//include page
+	include ('html/edit_room.inc.php');
+}
+require (AT_INCLUDE_PATH.'footer.inc.php');
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/html/course_meeting.inc.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,49 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+//Check if the room is open, if not.  Print error msg to user.
+if (!$om_obj->om_getRoom()):
+?>
+	<div class="openmeetings">
+		<h5><?php echo _AT('openmeetings_course_conference'); ?></h5>
+		<?php echo _AT('openmeetings_no_course_meetings'); ?>
+	</div>
+
+<?php
+else:
+	//Get the room id
+	//TODO: Course title added/removed after creation.  Affects the algo here.
+	if (isset($_SESSION['course_title']) && $_SESSION['course_title']!=''){
+		$room_name = $_SESSION['course_title'];
+	} else {
+		$room_name = 'course_'.$course_id;
+	}
+
+	//Log into the room
+	$room_id = $om_obj->om_addRoom($room_name);
+	?>
+	<div class="openmeetings">
+		<h5><?php echo _AT('openmeetings_course_conference'); ?></h5>
+		<ul>
+			<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>
+		</ul>
+	</div><br/>
+
+<?php endif; ?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/html/create_room.inc.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,50 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+//Get default values if POST is empty
+$_POST = loadDefaultValues($_POST);	//openmeetings.inc.php
+
+?>
+<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
+	<div class="input-form">
+		<div class="row"><p><?php echo  
_AT('openmeetings_create_room_instr'); ?></p></div>
+	</div>
+	<div class="input-form">
+		<?php include ('create_room.tmpl.php'); ?>
+
+		<div class="row buttons">
+			<input type="submit" name="create_room" value="<?php echo  
_AT('openmeetings_create_room'); ?>"  />
+		</div>
+	</div>
+</form>
+
+<script type="text/javascript">
+	function om_toggler(name, enabled){
+		var obj_w = document.getElementById(name + '_w');
+		var obj_h = document.getElementById(name + '_h');
+		if(enabled==true) {
+			obj_w.disabled = "";
+			obj_h.disabled = "";
+		} else if (enabled==false){
+			obj_w.disabled = "disabled";
+			obj_h.disabled = "disabled";
+		}
+	}
+</script>
=======================================
--- /dev/null
+++ /trunk/openmeetings/html/create_room.tmpl.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,42 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+
+?>
+<div class="row">
+	<p><label for="openmeetings_roomtype"><?php echo  
_AT('openmeetings_roomtype'); ?></label></p>
+	<?php
+		($_POST['openmeetings_roomtype']== 1)? $om_roomtype_conference  
= 'checked="checked"' : $om_roomtype_audience = 'checked="checked"';
+	?>
+	<input type="radio" name="openmeetings_roomtype"  
id="openmeetings_roomtype_conference" value="1" <?php echo  
$om_roomtype_conference;?>/><label  
for="openmeetings_roomtype_conference"><?php echo  
_AT('openmeetings_conference');  ?></label>
+	<input type="radio" name="openmeetings_roomtype"  
id="openmeetings_roomtype_audience" value="0" <?php echo  
$om_roomtype_audience;?>/><label for="openmeetings_roomtype_audience"><?php  
echo _AT('openmeetings_audience');  ?></label>
+</div>
+<div class="row">
+	<p><label for="openmeetings_num_of_participants"><?php echo  
_AT('openmeetings_num_of_participants'); ?></label></p>
+	<input type="text" name="openmeetings_num_of_participants" value="<?php  
echo $_POST['openmeetings_num_of_participants']; ?>"  
id="openmeetings_num_of_participants" size="80" style="min-width: 95%;" />
+</div>
+<div class="row">
+	<p><label for="openmeetings_ispublic"><?php echo  
_AT('openmeetings_ispublic'); ?></label></p>
+	<?php
+		($_POST['openmeetings_ispublic']== 1)? $om_ispublic_y  
= 'checked="checked"' : $om_ispublic_n = 'checked="checked"';
+	?>
+	<input type="radio" name="openmeetings_ispublic"  
id="openmeetings_ispublic_y" value="1" <?php echo $om_ispublic_y;?>/><label  
for="openmeetings_ispublic_y"><?php echo _AT('yes');  ?></label>
+	<input type="radio" name="openmeetings_ispublic"  
id="openmeetings_ispublic_n" value="0" <?php echo $om_ispublic_n;?>/><label  
for="openmeetings_ispublic_n"><?php echo _AT('no');  ?></label>
+</div>
=======================================
--- /dev/null
+++ /trunk/openmeetings/html/edit_room.inc.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,34 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+?>
+<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
+<div class="input-form">
+	<div class="row"><?php echo _AT('openmeetings_existing_room',  
$_SERVER['PHP_SELF'].'?action=view'.SEP.'room_id='.$room_id.SEP.'sid='.$om_obj->getSid()); ?></div>
+	<div class="row"><?php echo _AT('openmeetings_deleting_warning'); ?></div>
+	<div class="row buttons">
+		<input type="hidden" name="room_id" value="<?php echo $room_id?>" />
+		<input type="submit" name="edit_room" value="<?php echo  
_AT('openmeetings_edit_room'); ?>"  />
+		<input type="submit" name="delete_room" value="<?php echo  
_AT('openmeetings_delete_room'); ?>"  />
+		<input type="submit" name="create_room" value="<?php echo  
_AT('openmeetings_create_room'); ?>"  />
+	</div>
+</div>
+
+</form>
=======================================
--- /dev/null
+++ /trunk/openmeetings/html/group_meeting.inc.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,54 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+if (empty($_SESSION['groups'])) {
+	echo '<div  
class="openmeetings"><h5>'._AT('openmeetings_group_conference').'</h5>';
+	echo _AT('openmeetings_no_group_meetings').'</div>';
+} else {
+	echo '<div  
class="openmeetings"><h5>'._AT('openmeetings_group_conference').'</h5>';
+	$group_list = implode(',', $_SESSION['groups']);
+	$sql = "SELECT group_id, title FROM ".TABLE_PREFIX."groups WHERE group_id  
IN ($group_list) ORDER BY title";
+
+	$result = mysql_query($sql, $db);
+
+	echo '<ul>';
+	//loop through each group and print out a link beside them
+	while ($row = mysql_fetch_assoc($result)) {
+		//Check in the db and see if this group has a meeting alrdy, create on  
if not.
+		$om_obj->setGid($row['group_id']);
+		if ($om_obj->om_getRoom()){
+			//Log into the room
+			$room_id = $om_obj->om_addRoom($room_name);
+			echo '<li>'.$row['title'].' <a  
href="mods/openmeetings/view_meetings.php?room_id='.$room_id.SEP.'sid='.$om_obj->getSid().'">  
Room-id: '.$room_id.'</a>';
+			if ($om_obj->isMine($room_id) || authenticate(AT_PRIV_OPENMEETINGS,  
true)) {
+				//if 'I' created this room, then I will have the permission to  
edit/delete it from the database.
+				echo ' <a  
href="mods/openmeetings/add_group_meetings.php?edit_room=yes&room_id='.$room_id.'">['._AT('edit').']</a>';
+				echo ' <a  
href="mods/openmeetings/openmeetings_delete.php?room_id='.$room_id.'">['._AT('delete').']</a>';
+
+			}
+			echo '</li>';
+		} else {
+			echo '<li>'.$row['title'].' <a  
href="mods/openmeetings/add_group_meetings.php?group_id='.$row['group_id'].'">  
Start a conference </a>'.'</li>';
+		}
+	}
+	echo '</ul></div>';
+}
+
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/html/update_room.inc.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,47 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+?>
+<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
+	<div class="input-form">
+		<?php include ('create_room.tmpl.php'); ?>
+
+		<div class="row buttons">
+			<input type="hidden" name="openmeetings_room_name" value="<?php echo  
$_POST['openmeetings_room_name']; ?>" />
+			<input type="hidden" name="room_id" value="<?php echo $room_id; ?>"  />
+			<input type="submit" name="update_room" value="<?php echo  
_AT('save'); ?>"  />
+			<input type="submit" name="cancel" value="<?php echo  
_AT('cancel'); ?>"  />
+		</div>
+	</div>
+</form>
+
+<script type="text/javascript">
+	function om_toggler(name, enabled){
+		var obj_w = document.getElementById(name + '_w');
+		var obj_h = document.getElementById(name + '_h');
+		if(enabled==true) {
+			obj_w.disabled = "";
+			obj_h.disabled = "";
+		} else if (enabled==false){
+			obj_w.disabled = "disabled";
+			obj_h.disabled = "disabled";
+		}
+	}
+</script>
=======================================
--- /dev/null
+++ /trunk/openmeetings/index.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,62 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+define('AT_INCLUDE_PATH', '../../include/');
+require (AT_INCLUDE_PATH.'vitals.inc.php');
+require ('lib/openmeetings.class.php');
+require ('lib/openmeetings.inc.php');
+
+//css
+$_custom_css = $_base_path . 'mods/openmeetings/module.css'; // use a  
custom stylesheet
+
+//local variables
+$course_id = $_SESSION['course_id'];
+
+// Check access
+checkAccess($course_id);
+
+//Header begins here
+require (AT_INCLUDE_PATH.'header.inc.php');
+
+//Initiate Openmeeting
+$om_obj = new Openmeetings($course_id, $_SESSION['member_id']);
+
+$om_obj->om_login();
+
+//Handles form actions
+if (isset($_GET['delete']) && isset($_GET['room_id'])){
+	//have to makesure the user really do have permission over the paramater  
room id
+	$_GET['room_id'] = intval($_GET['room_id']);
+	if ($om_obj->isMine($_GET['room_id'])){
+		$om_obj->om_deleteRoom($_GET['room_id']);
+		$msg->addFeedback('OPENMEETINGS_DELETE_SUCEEDED');
+	} else {
+		$msg->addError('OPENMEETINGS_DELETE_FAILED');
+	}
+}
+
+//Course meetings
+include_once('html/course_meeting.inc.php');
+
+//Group meetings
+include_once('html/group_meeting.inc.php');
+
+require (AT_INCLUDE_PATH.'footer.inc.php');
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/lib/REST_openmeetings.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,270 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+if (!defined('AT_INCLUDE_PATH')) { exit; }
+
+class REST_openmeetings {
+	var $_rest = '';
+	function REST_openmeetings($rest) {
+
+		$this->_rest = $rest;
+		$getSession_obj	= $this->_performAPICall();
+
+		//check for session id
+		try {
+			$this->_sid = $getSession_obj['session_id'];
+		} catch (Exception $e) {
+			$this->_sid = session_id();
+			var_dump($e->getMessage());
+			exit('Error: no \'session_id\' in REST API response');
+		}
+	}
+
+	// make API calls w/ params
+	// NOTE: code based off of Apache OpenMeetings Moodle plug-in
+	function _performAPICall($resource='getSession', $service='UserService',  
$params=array()){
+
+		// This will allow you to view errors in the browser
+		// Note: set 'display_errors' to 0 in production
+		//ini_set('display_errors',1);
+		ini_set('display_errors',0);
+
+		// Report all PHP errors (notices, errors, warnings, etc.)
+		//error_reporting(E_ALL);
+
+		// URI used for making REST call. Each Web Service uses a unique URL.
+		$request = $this->_rest.$service.'/'.$resource;
+
+		// build the query string
+		$qs = http_build_query($params);
+
+		try {
+			// NOTE: Need php-curl to use (sudo apt-get install php-curl)
+			// Initialize the session by passing the request as a parameter
+			$session = curl_init($request);
+
+			// CURLOPT_RETURNTRANSFER will return the response
+			curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
+
+			// send query string
+			curl_setopt($session, CURLOPT_POSTFIELDS, $qs);
+
+			// Make the request
+			$response = curl_exec($session);
+
+			// get the status code
+			$status_code = curl_getinfo($session, CURLINFO_HTTP_CODE);
+
+			// Close the curl session
+			curl_close($session);
+
+		} catch (Exception $e) {
+			exit('Error: PHP cUrl extension not found. Must install php-curl (sudo  
apt-get install php-curl)');
+		}
+
+		// Confirm that the request was transmitted to the OpenMeetings! Image  
Search Service
+		if(!$response) {
+		   //die('Request OpenMeetings! OpenMeetings Service failed and no  
response was returned.');
+		   die('Please make sure an OpenMeetings instance is running. Unable to  
connect to OpenMeetings.');
+		}
+
+		// Check the HTTP Response code and display message if status code is  
not 200 (OK)
+		switch($status_code) {
+		        case 200:
+		                // Success
+		                break;
+		        case 503:
+		                die('Your call to OpenMeetings Web Services failed and  
returned an HTTP status of 503.
+		                     That means: Service unavailable. An internal  
problem prevented us from returning'.
+		                     ' data to you.');
+		                break;
+		        case 403:
+		                die('Your call to OpenMeetings Web Services failed and  
returned an HTTP status of 403.
+		                     That means: Forbidden. You do not have permission  
to access this resource, or are over'.
+		                     ' your rate limit.');
+		                break;
+		        case 400:
+		                // You may want to fall through here and read the  
specific XML error
+		                die('Your call to OpenMeetings Web Services failed and  
returned an HTTP status of 400.
+		                     That means:  Bad request. The parameters passed to  
the service did not match as expected.
+		                     The exact error is returned in the XML response.');
+		                break;
+		        default:
+				if ($status_code) {
+					die('Your call to OpenMeetings Web Services returned an unexpected  
HTTP status of: '
+				   	 . $status_code.' Request '.$request);
+				} else {
+					die('Your call to OpenMeetings Web Services returned no HTTP status.
+                                             Have you installed php-curl  
on the ATutor server?');
+				}
+
+		}
+
+		// Get the XML from the response, bypassing the header
+		if (!($xml = strstr($response, '<ns'))) {
+			$xml = null;
+		}
+
+		// uncomment these 3 lines to view raw response data from API
+		// echo '<b>Request:</b> '.$request.'<br><b>Params:</b> ';
+		// print_r($params);
+		//  
echo '<br><b>Code:</b> '.$status_code.'<br><b>Response:</b> '.htmlspecialchars($xml).'<br><br>';
+
+		// NOTE: Need php-xml to use (sudo apt-get install php-xml)
+		try {
+			$dom = new DOMDocument();
+		} catch (Exception $e) {
+			exit('Error: DOMDocument() class not found. Must install php-xml (sudo  
yum install php-xml)');
+		}
+
+		$dom->loadXML($xml);
+
+		$returnNodeList = $dom->getElementsByTagName('*');
+		$returnArray = array();
+		// create associative array from response
+		foreach ($returnNodeList as $returnNode) {
+			$returnArray[$returnNode->localName] = $returnNode->nodeValue;
+		}
+
+		return $returnArray;
+	}
+
+	function getSid(){
+		return $this->_sid;
+	}
+
+	function saveUserInstance($parameters = array()) {
+		return $this->_performAPICall(
+			'setUserObjectAndGenerateRoomHash',
+		        'UserService',
+
+			array(
+				'SID'			 => $this->_sid,
+				'username'		 => $parameters['username'],
+				'firstname'		 => $parameters['firstname'],
+				'lastname'		 => $parameters['lastname'],
+				'profilePictureUrl'	 => $parameters['profilePictureUrl'],
+				'email'			 => $parameters['email'],
+				'externalUserId'         => 1,
+				'externalUserType'       => 'ATutor',
+				'room_id'		 => 1,
+				'becomeModeratorAsInt'   => $parameters['becomeModeratorAsInt'],
+				'showAudioVideoTestAsInt'=> 1
+			)
+		);
+	}
+
+	function login($parameters = array()) {
+		if (!isset($parameters['username'])) {
+		    return false;
+		}
+		return $this->_performAPICall(
+		  'loginUser',
+		  'UserService',
+		  array(
+		    'SID'         => $this->_sid,
+		    'username'    => $parameters['username'],
+		    'userpass'    => $parameters['userpass']
+		  )
+		);
+
+	}
+
+
+	function addRoom($parameters = array()){
+		return $this->_performAPICall(
+			'addRoomWithModeration',
+			'RoomService',
+			array(
+			        'SID'				=> $parameters['SID'],
+				'name'				=> $parameters['name'],
+				'roomtypes_id'			=> $parameters['roomtypes_id'],
+				'comment'			=> 'Room created by ATutor',
+				'numberOfPartizipants'		=> $parameters['numberOfPartizipants'],
+				'ispublic'			=> $parameters['ispublic'],
+				'appointment'			=> $parameters['appointment'],
+				'isDemoRoom'                    => $parameters['isDemoRoom'],
+				'demoTime'                      => $parameters['demoTime'],
+				'isModeratedRoom'		=> $parameters['isModeratedRoom']
+			)
+		);
+	}
+
+	function myErrors() {
+		// leftover function from soap implementation
+		return '';
+	}
+
+	function getError($code) {
+		return $this->_performAPICall(
+			'getErrorByCode',
+			'UserService',
+			array(
+				'SID'		=> $this->_sid,
+				'errorid'	=> $code,
+				'language_id'	=> 1
+			)
+		);
+	}
+
+
+	function getRoomById($parameters = array()) {
+		return $this->_performAPICall(
+			'getRoomById',
+			'RoomService',
+			array(
+				'SID'		=> $parameters['SID'],
+				'rooms_id'	=> $parameters['rooms_id']
+			)
+		);
+	}
+
+	function updateRoom($parameters = array()) {
+		return $this->_performAPICall(
+			'updateRoomWithModeration',
+			'RoomService',
+			array(
+		    		'SID'				=> $parameters['SID'],
+				'rooms_id'			=> $parameters['rooms_id'],
+				'name'				=> $parameters['name'],
+				'roomtypes_id'			=> $parameters['roomtypes_id'],
+				'comment'			=> 'Room created by ATutor',
+				'numberOfPartizipants'		=> $parameters['numberOfPartizipants'],
+				'ispublic'			=> $parameters['ispublic'],
+				'appointment'			=> $parameters['appointment'],
+				'isDemoRoom'                    => $parameters['isDemoRoom'],
+				'demoTime'                      => $parameters['demoTime'],
+				'isModeratedRoom'		=> $parameters['isModeratedRoom']
+			  )
+		);
+	}
+
+	function deleteRoom($parameters = array()) {
+		return $this->_performAPICall(
+			'deleteRoom',
+			'RoomService',
+			array(
+				'SID'		=> $parameters['SID'],
+				'rooms_id'	=> $parameters['rooms_id']
+			)
+		);
+	}
+}
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/lib/openmeetings.class.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,252 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+if (!defined('AT_INCLUDE_PATH')) { exit; }
+
+require('REST_openmeetings.php');
+
+class Openmeetings {
+	var $_sid = '';	       //Openmeetings session id
+	var $_course_id = '';
+	var $_member_id = '';
+	var $_group_id = '';
+	var $_om;
+
+	//Constructor
+	function Openmeetings($course_id, $member_id, $group_id=0){
+		$this->_course_id	= abs($course_id);
+		$this->_member_id	= abs($member_id);
+		$this->_group_id	= abs($group_id);
+	}
+
+	//new function
+	function om_login() {
+
+		global $_config;
+
+		$om = new  
REST_openmeetings($_config['openmeetings_location'].'/services/');
+
+		$param = array ('username' => $_config['openmeetings_username'],
+				'userpass' => $_config['openmeetings_userpass']);
+
+		$result = $om->login($param);
+
+		if ($result < 0){
+			debug($om->getError($result), 'error');
+			return;
+		}
+
+		//If no error, then get the generated OM session id
+		$this->_sid = $om->getSid();
+
+		//Retrieve members information
+		$sql = 'SELECT login, first_name, last_name, email  
FROM '.TABLE_PREFIX.'members WHERE member_id='.$this->_member_id;
+
+		$result = mysql_query($sql);
+		$row = mysql_fetch_assoc($result);
+
+		// Save user instance
+		$params = array(
+					"username"				=> $row['login'],
+					"firstname"				=> $row['first_name'],
+					"lastname"				=> $row['last_name'],
+					"profilePictureUrl"		        => '',
+					"email"					=> $row['email'],
+					// TODO: determine if user is instructor here, 1 vs. 0
+					"becomeModeratorAsInt"                  => 1
+				  );
+
+
+		$om->saveUserInstance($params);
+		$this->_om=$om;
+
+		return $this->_sid;
+	}
+
+	/**
+	 * Add a room to the db iff it has not been created.  Each course should  
only have one room to it.
+	 * @param int		sid is the auth session id that was logged in into  
openmeetings.
+	 * @param array		the specification for openmeetings
+	 * @return room # of the created room, or the room # of the existed room
+	 */
+	function om_addRoom($room_name, $om_param=array()){
+
+		global $_config;
+
+		if ($this->_course_id < 0){
+			return false;
+		}
+
+		//Check if the room has already been created for this
+		if (($room_id = $this->om_getRoom()) !=false){
+			//instead of returning room id, we might have to delete it and carry on.
+			return $room_id;
+		}
+
+		$om = $this->_om;
+
+		$param = array ( 'SID'				=> $this->_sid,
+				 'name'				=> $room_name,
+				 'roomtypes_id'			=> $om_param['openmeetings_roomtype'],
+				 'numberOfPartizipants'		=>  
$om_param['openmeetings_num_of_participants'],
+				 'ispublic'			=> $om_param['openmeetings_ispublic'],
+				 'appointment'			=> 0,
+				 'isDemoRoom'                   => 0,
+				 'demoTime'                     => 1000,
+				 // TODO Check if it is
+				 'isModeratedRoom'		=> 0
+				);
+
+		//Add this room
+		$result = $om->addRoom($param);
+
+		//TODO: Check for error, and handles success/failure
+		if ($result){
+
+			//TODO: On success, add to DB entry.
+			$sql = 'INSERT INTO '.TABLE_PREFIX.'openmeetings_rooms SET  
rooms_id='.$result['return'].', course_id='.$this->_course_id
+				 . ', owner_id=' . $this->_member_id;
+			$rs  = mysql_query($sql);
+			if (!$rs){
+				return false;
+			}
+			$om_id = mysql_insert_id();
+			$sql = 'INSERT INTO '.TABLE_PREFIX."openmeetings_groups SET  
om_id=$om_id, group_id=$this->_group_id";
+			$rs = mysql_query($sql);
+
+			if ($rs){
+				return $result['return'];
+			}
+		}
+
+		return false;
+	}
+
+
+	/**
+	 * update room
+	 */
+	function om_updateRoom($room_id, $om_param=array()){
+
+		global $_config;
+
+		$om = $this->_om;
+
+		$param = array ( 'SID'				=> $this->_sid,
+				 'rooms_id'			=> $room_id,
+				 'name'				=> $om_param['openmeetings_room_name'],
+				 'roomtypes_id'			=> $om_param['openmeetings_roomtype'],
+				 'numberOfPartizipants'		=>  
$om_param['openmeetings_num_of_participants'],
+				 'ispublic'			=> $om_param['openmeetings_ispublic'],
+				 'appointment'			=> 0,
+				 'isDemoRoom'                   => 0,
+				 'demoTime'                     => 1000,
+				 // TODO Check if it is
+				 'isModeratedRoom'		=> 0
+				);
+		//update this room
+		$result = $om->updateRoom($param);
+		return $result;
+	}
+
+	/**
+	 * Retrieve Session id
+	 */
+	function getSid(){
+		return $this->_sid;
+	}
+
+	/**
+	 * Checks if there is a room for the given course id.
+	 *
+	 * @param	course id
+	 * @return	the room id if there is a room already assigned to this  
course; false otherwise
+	 */
+	function om_getRoom(){
+		$sql = 'SELECT rooms_id FROM '.TABLE_PREFIX.'openmeetings_rooms r  
NATURAL JOIN '
+		 .TABLE_PREFIX."openmeetings_groups g WHERE course_id =  
$this->_course_id AND group_id = $this->_group_id";
+		$result = mysql_query($sql);
+		if (mysql_numrows($result) > 0){
+			$row = mysql_fetch_assoc($result);
+			//instead of returning room id, we might have to delete it and carry on.
+			return $row['rooms_id'];
+		}
+		return false;
+	}
+
+
+	/**
+	 * Get room obj form the given room id
+	 */
+	function om_getRoomById($room_id){
+		global $_config;
+		if ($room_id == ''){
+			return false;
+		}
+
+		$om = $this->_om;
+		$param = array ( 'SID'	     => $this->_sid,
+				 'rooms_id'  => $room_id
+			       );
+		$result = $om->getRoomById($param);
+		return $result;
+	}
+
+	/**
+	 * Set the group id
+	 * @param	int	group id.
+	 */
+	function setGid($gid){
+		$this->_group_id = $gid;
+	}
+
+	/**
+	 * Delete a room
+	 */
+	function om_deleteRoom($room_id){
+		global $_config;
+		$om = $this->_om;
+		$param = array ( 'SID'	    => $this->_sid,
+				 'rooms_id' => $room_id
+				);
+
+		$result = $om->deleteRoom($param);
+		$sql = 'DELETE r, g FROM (SELECT om_id FROM '.TABLE_PREFIX
+		 ."openmeetings_rooms WHERE rooms_id=$room_id) AS t, ".TABLE_PREFIX
+				.'openmeetings_rooms r NATURAL  
JOIN '.TABLE_PREFIX.'openmeetings_groups g WHERE r.om_id =t.om_id';
+		mysql_query($sql);
+	}
+
+
+	/**
+	 * Return true if this user created the given room.
+	 * @param	int	room id
+	 * @return	true if it is, false otherwise.
+	 */
+	function isMine($room_id){
+		$sql = 'SELECT * FROM '.TABLE_PREFIX."openmeetings_rooms WHERE  
rooms_id=$room_id AND owner_id=$this->_member_id";
+		$result = mysql_query($sql);
+		if (mysql_numrows($result) > 0){
+			return true;
+		}
+		return false;
+	}
+}
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/lib/openmeetings.inc.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,68 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+if (!defined('AT_INCLUDE_PATH')) { exit; }
+
+/**
+ * Check against the array, if the value within is empty, replace each  
with the
+ * default values.
+ * @param	array	parameter
+ * @return	array
+ */
+function loadDefaultValues($post){
+	$_om_config = array (
+		'openmeetings_roomtype'			=> 1,	//conference
+		'openmeetings_num_of_participants'	=> 5,
+		'openmeetings_ispublic'			=> 1,	//true
+		'openmeetings_vid_w'			=> 270,
+		'openmeetings_vid_h'			=> 270,
+		'openmeetings_show_wb'			=> 1,	//true
+		'openmeetings_wb_w'			=> 600,
+		'openmeetings_wb_h'			=> 660,
+		'openmeetings_show_fp'			=> 1,	//true
+		'openmeetings_fp_w'			=> 270,
+		'openmeetings_fp_h'			=> 270
+	);
+
+	//replace each key if empty
+	foreach ($_om_config as $key=>$value){
+		if (empty($post[$key])){
+			$post[$key] = $value;
+		}
+	}
+
+	return $post;
+}
+
+
+/**
+ * Check if openmeeting is being setup correctly.
+ * @param	int	the course id
+ */
+function checkAccess($course_id){
+	global $_config, $msg;
+	if (!isset($_config['openmeetings_username']) | 
| !isset($_config['openmeetings_userpass'])){
+		include(AT_INCLUDE_PATH.'header.inc.php');
+		$msg->addError('OPENMEETINGS_NOT_SETUP');
+		include(AT_INCLUDE_PATH.'footer.inc.php');
+		exit;
+	}
+}
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/module.css	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,17 @@
+div.openmeetings {
+	background-color: #F8F8F8;
+	border: 1px solid #666;
+	padding: 1em;
+	margin: 1em;
+}
+
+div.openmeetings ul{
+	list-style: none;
+	font-family: Verdana, Helevetica, Arial, sans-serif;
+}
+
+div.openmeetings h5{
+	padding-top: 0;
+	padding-bottom: 0.5em;
+}
+
=======================================
--- /dev/null
+++ /trunk/openmeetings/module.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,78 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/*******
+ * doesn't allow this file to be loaded with a browser.
+ */
+if (!defined('AT_INCLUDE_PATH')) { exit; }
+
+/******
+ * this file must only be included within a Module obj
+ */
+if (!isset($this) || (isset($this) &&  
(strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a  
Module'); }
+
+/*******
+ * assign the instructor and admin privileges to the constants.
+ */
+define('AT_PRIV_OPENMEETINGS',       $this->getPrivilege());
+define('AT_ADMIN_PRIV_OPENMEETINGS', $this->getAdminPrivilege());
+
+/*******
+ * if this module is to be made available to students on the Home or Main  
Navigation.
+ */
+$_group_tool = $_student_tool = 'mods/openmeetings/index.php';
+
+/*******
+ * add the admin pages when needed.
+ */
+if (admin_authenticate(AT_ADMIN_PRIV_OPENMEETINGS, TRUE) ||  
admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {
+	$this->_pages[AT_NAV_ADMIN] = array('mods/openmeetings/openmeetings.php');
+	$this->_pages['mods/openmeetings/openmeetings.php']['title_var']  
= 'openmeetings';
+	$this->_pages['mods/openmeetings/openmeetings.php']['parent']    =  
AT_NAV_ADMIN;
+}
+
+/*******
+ * instructor Manage section:
+ */
+$this->_pages['mods/openmeetings/openmeetings_instructor.php']['title_var']  
= 'openmeetings_course_meetings';
+$this->_pages['mods/openmeetings/openmeetings_instructor.php']['parent']    
= 'tools/index.php';
+
+/*******
+ * student page.
+ */
+$this->_pages['mods/openmeetings/index.php']['title_var'] = 'openmeetings';
+$this->_pages['mods/openmeetings/index.php']['img']        
= 'mods/openmeetings/openmeetings_logo.png';
+
+$this->_pages['mods/openmeetings/view_meetings.php']['title_var']  
= 'openmeetings_view_meetings';
+$this->_pages['mods/openmeetings/view_meetings.php']['parent']  
= 'mods/openmeetings/index.php';
+$this->_pages['mods/openmeetings/add_group_meetings.php']['title_var']  
= 'openmeetings_grp_meetings';
+$this->_pages['mods/openmeetings/add_group_meetings.php']['parent']  
= 'mods/openmeetings/index.php';
+$this->_pages['mods/openmeetings/openmeetings_delete.php']['title_var']  
= 'openmeetings_delete';
+$this->_pages['mods/openmeetings/openmeetings_delete.php']['parent']  
= 'mods/openmeetings/index.php';
+$this->_pages['mods/openmeetings/openmeetings_group.php']['title_var']  
= 'openmeetings_grp_meetings';
+$this->_pages['mods/openmeetings/openmeetings_group.php']['parent']  
= 'mods/openmeetings/index.php';
+
+/*******
+ * Group functions
+ */
+function openmeetings_get_group_url($group_id) {
+	return 'mods/openmeetings/openmeetings_group.php?gid='.$group_id;
+}
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/module.sql	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,66 @@
+# sql file for Openmeeting module
+
+# Table for openmeetings
+CREATE TABLE `openmeetings_rooms` (
+   `om_id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
+   `course_id` mediumint(8) unsigned NOT NULL,
+   `owner_id` mediumint(8) unsigned NOT NULL,
+   `rooms_id` bigint( 20 ) NOT NULL ,
+   PRIMARY KEY ( `om_id` )
+);
+
+CREATE TABLE `openmeetings_groups` (
+   `om_id` mediumint(8) unsigned NOT NULL,
+   `group_id` mediumint(8) unsigned NOT NULL,
+   PRIMARY KEY ( `om_id`, `group_id` )
+);
+
+INSERT INTO `language_text` VALUES  
('en', '_module', 'openmeetings_missing_url', 'You must supply the URL to  
your Openmeetings installation in the field below.', NOW(), '');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings','Openmeetings',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_open','Open Openmeetings Admin',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_location','The location of your Openmeetings  
installation. This should be the base URL of your Openmeetings installation  
(e.g. http://www.myserver.com:5080/openmeetings).',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_own_window','Open Openmeetings in a New  
Window:',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_course_meetings','Course  
Openmeetings',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_view_meetings','View Openmeetings',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_grp_meetings','Group Openmeetings',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_existing_room','You already have started a  
<a href="%s">room</a>, would you like to edit your room or to start a new  
one?',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_deleting_warning','(Note, starting a new  
room will close your current room.  Once the room is closed, <strong>all  
chat logs and associated room materials will be  
deleted</strong>.)',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_no_course_meetings','There is no course  
meeting at the moment.  Instructor can add a course meeting.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_no_group_meetings','There is no group  
meeting at the moment.  You have to be assigned to a group in order to  
start a group meeting.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_course_conference','Course  
conference:',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_group_conference','Group  
conference(s):',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_num_of_participants','Number of  
participants',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_ispublic','Public meeting?',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_vid_w','Video Width (in pixel)',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_vid_h','Video Height (in pixel)',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_show_wb','Display whiteboard?',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_wb_w','Whiteboard Width (in  
pixel)',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_wb_h','Whiteboard Height (in  
pixel)',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_show_fp','Display file panel?',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_fp_w','File Panel Width (in  
pixel)',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_fp_h','File Panel Height (in  
pixel)',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_username','Openmeeting Username (Must have  
admin-rights)', NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_userpass','Openmeeting Password',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_grp_meetings','Openmeeting Group  
Meetings',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_delete','Delete Meeting Room',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_confirm_delete','Are you sure you want to  
delete this conference room?  All the associated chats and files will be  
deleted.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_roomtype','Room Mode',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_conference','Conference Mode',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_audience','Audience Mode',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_create_room_instr','Adjust the following  
settings, then click "Create" to start the conference/audience room.  For  
more information on the settings, please see the <a  
href="http://incubator.apache.org/openmeetings/RoomService.html#addRoomWithModeration"  
target="_new">Openmeetings documentation</a>.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_edit_room','Edit room',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_create_room','Create new room',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_module','openmeetings_delete_room','Remove room',NOW(),'');
+
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_FEEDBACK_OPENMEETINGS_URL_ADD_SAVED','Openmeetings  
configuration options were successfully saved.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_FEEDBACK_OPENMEETINGS_CANCELLED','Successfully cancelled  
without saving any changes.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_FEEDBACK_OPENMEETINGS_DELETE_SUCEEDED','The room has  
been successfully deleted.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_FEEDBACK_OPENMEETINGS_ADDED_SUCEEDED','The room has been  
added successfully.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_FEEDBACK_OPENMEETINGS_UPDATE_SUCEEDED','The room has  
been updated successfully.',NOW(),'');
+
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_ERROR_OPENMEETINGS_NOT_SETUP','Openmeetings has not been  
setup yet, please contact your administrator.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_ERROR_OPENMEETINGS_ADD_FAILED','The room cannot be  
created.  You must be belong to this group or you must have the permission  
to create a room.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_ERROR_OPENMEETINGS_DELETE_FAILED','An error has occured  
while deleting the room, please contact the administrator.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_ERROR_OPENMEETINGS_URL_ADD_EMPTY','You must enter a URL  
to the location of your Openmeetings installation.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_ERROR_OPENMEETINGS_USERNAME_ADD_EMPTY','You must enter  
an username to the account of your Openmeetings installation.',NOW(),'');
+INSERT INTO `language_text` VALUES  
('en', '_msgs','AT_ERROR_OPENMEETINGS_USERPASS_ADD_EMPTY','You must enter a  
password to the account of your Openmeetings installation.',NOW(),'');
=======================================
--- /dev/null
+++ /trunk/openmeetings/module.xml	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<module version="0.5">
+    <name lang="en">openmeetings</name>
+    <description lang="en">Apache OpenMeetings is a Multi-Language  
Cross-Platform Customizable Video-Conferencing and Collaboration Flash  
based web application.</description>
+    <maintainers>
+        <maintainer>
+            <name>Apache OpenMeetings</name>
+            <email>openmeetings-user@incubator.apache.org</email>
+        </maintainer>
+    </maintainers>
+    <url>http://incubator.apache.org/openmeetings/</url>
+    <license>ASF</license>
+    <release>
+        <version>0.5</version>
+        <date>2012-07-02</date>
+        <state>stable</state>
+	<notes>Requires Apache OpenMeetings to be installed on the user's  
system.  Details can be found at  
http://incubator.apache.org/openmeetings/installation.html</notes>
+    </release>
+</module>
=======================================
--- /dev/null
+++ /trunk/openmeetings/module_install.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,65 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/*******
+ * the line below safe-guards this file from being accessed directly from
+ * a web browser. It will only execute if required from within an ATutor  
script,
+ * in our case the Module::install() method.
+ */
+if (!defined('AT_INCLUDE_PATH')) { exit; }
+/*******
+ * Note: the many options for these variables are used to decrease  
confusion.
+ *       TRUE | FALSE | 1 will be the convention.
+ *
+ * $_course_privilege
+ *     specifies the type of instructor privilege this module uses.
+ *     set to empty | FALSE | 0   to disable any privileges.
+ *     set to 1 | AT_PRIV_ADMIN   to use the instructor only privilege.
+ *     set to TRUE | 'new'        to create a privilege specifically for  
this module:
+ *                                will make this module available as a  
student privilege.
+ *
+ * $_admin_privilege
+ *    specifies the type of ATutor administrator privilege this module  
uses.
+ *    set to FALSE | AT_ADMIN_PRIV_ADMIN   to use the super administrator  
only privilege.
+ *    set to TRUE | 'new'                  to create a privilege  
specifically for this module:
+ *                                         will make this module available  
as an administrator privilege.
+ *
+ *
+ * $_cron_interval
+ *    if non-zero specifies in minutes how often the module's cron job  
should be run.
+ *    set to 0 or not set to disable.
+ */
+$_course_privilege = TRUE; // possible values: FALSE | AT_PRIV_ADMIN | TRUE
+$_admin_privilege  = TRUE; // possible values: FALSE | TRUE
+
+
+if (!$msg->containsErrors() &&  
file_exists(dirname(__FILE__) . '/module.sql')) {
+	// deal with the SQL file:
+	require(AT_INCLUDE_PATH . 'classes/sqlutility.class.php');
+	$sqlUtility =& new SqlUtility();
+
+	/*
+	 * the SQL file could be stored anywhere, and named  
anything, "module.sql" is simply
+	 * a convention we're using.
+	 */
+	$sqlUtility->queryFromFile(dirname(__FILE__) . '/module.sql',  
TABLE_PREFIX);
+}
+
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/module_uninstall.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,45 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/*******
+ * the line below safe-guards this file from being accessed directly from
+ * a web browser. It will only execute if required from within an ATutor  
script,
+ * in our case the Module::uninstall() method.
+ */
+if (!defined('AT_INCLUDE_PATH')) { exit; }
+
+/******
+ * the following code checks if there are any errors (generated previously)
+ * then uses the SqlUtility to run reverted database queries of module.sql,
+ * ie. "create table" statement in module.sql is run as drop according  
table.
+ */
+if (!$msg->containsErrors() &&  
file_exists(dirname(__FILE__) . '/module.sql')) {
+	// deal with the SQL file:
+	require(AT_INCLUDE_PATH . 'classes/sqlutility.class.php');
+	$sqlUtility = new SqlUtility();
+
+	/*
+	 * the SQL file could be stored anywhere, and named  
anything, "module.sql" is simply
+	 * a convention we're using.
+	 */
+	$sqlUtility->revertQueryFromFile(dirname(__FILE__) . '/module.sql',  
TABLE_PREFIX);
+}
+
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/openmeetings.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,88 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/**
+ * This is the ATutor Openmeetings module page. It allows an admin user
+ * to set or edit  the URL for the Openmeetings installation for ATutor,  
and define an optional guest password.
+ */
+define('AT_INCLUDE_PATH', '../../include/');
+require (AT_INCLUDE_PATH.'vitals.inc.php');
+$_custom_css = $_base_path . 'mods/openmeetings/module.css'; // use a  
custom stylesheet
+admin_authenticate(AT_ADMIN_PRIV_OPENMEETINGS);
+
+if (isset($_POST['submit'])) {
+	$_POST['om_uri'] = $addslashes(trim($_POST['om_uri']));
+	if (substr($_POST['om_uri'], -1, 1) == '/') {
+		$_POST['om_uri'] = substr($_POST['om_uri'], 0, -1);
+	}
+	$_POST['om_username'] = $addslashes(trim($_POST['om_username']));
+	$_POST['om_userpass'] = $addslashes(trim($_POST['om_userpass']));
+
+	if (!$_POST['om_uri']){
+		$msg->addError('OPENMEETINGS_URL_ADD_EMPTY');
+	}
+	if (!$_POST['om_username']){
+		$msg->addError('OPENMEETINGS_USERNAME_ADD_EMPTY');
+	}
+	if (!$_POST['om_userpass']){
+		$msg->addError('OPENMEETINGS_USERPASS_ADD_EMPTY');
+	}
+
+	if (!$msg->containsErrors()) {
+		$_POST['om_uri'] = $addslashes($_POST['om_uri']);
+		$sql = "REPLACE INTO ".TABLE_PREFIX."config VALUES  
('openmeetings_location', '$_POST[om_uri]'),  
('openmeetings_username', '$_POST[om_username]'),  
('openmeetings_userpass', '$_POST[om_userpass]')";
+		mysql_query($sql, $db);
+		$msg->addFeedback('OPENMEETINGS_URL_ADD_SAVED');
+
+		header('Location: '.$_SERVER['PHP_SELF']);
+		exit;
+	}
+}
+
+require (AT_INCLUDE_PATH.'header.inc.php');
+
+?>
+<form action="<?php  $_SERVER['PHP_SELF']; ?>" method="post">
+	<div class="input-form">
+		<div class="row">
+			<p><label for="om_uri"><?php echo  
_AT('openmeetings_location'); ?></label></p>
+			<input type="text" name="om_uri" value="<?php echo  
$_config['openmeetings_location']; ?>" id="om_uri" size="80"  
style="min-width: 95%;" />
+		</div>
+		<div class="row">
+			<p><label for="om_username"><?php echo  
_AT('openmeetings_username'); ?></label></p>
+			<input type="text" name="om_username" value="<?php echo  
$_config['openmeetings_username']; ?>" id="om_username" size="20" />
+
+			<p><label for="om_userpass"><?php echo  
_AT('openmeetings_userpass'); ?></label></p>
+			<input type="text" name="om_userpass" value="<?php echo  
$_config['openmeetings_userpass']; ?>" id="om_userpass" size="20" />
+		</div>
+		<div class="row buttons">
+			<input type="submit" name="submit" value="<?php echo _AT('save'); ?>"   
/>
+		</div>
+	</div>
+</form>
+<div>
+<a href="<?php echo $_SERVER['PHP_SELF']; ?>" onclick="window.open('<?php  
echo  
$_config['openmeetings_location']; ?>','openmeetingswin','width=800,height=720,scrollbars=yes,  
resizable=yes'); return false"><?php echo   
_AT('openmeetings_own_window'); ?></a> </li>
+
+<?php exit; if ($_config['openmeetings_location'] != ''): ?>
+<iframe name="openmeetings" id="openmeetings" title="Openmeetings"  
frameborder="1" scrolling="auto" src="<?php echo  
$_config['openmeetings_location']; ?>/index.jsp" height="500" width="90%"  
align="center" style="border:thin white solid; align:center;"  
allowautotransparency="true"></iframe>
+<?php endif; ?>
+
+</div>
+<?php  require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/openmeetings_delete.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,71 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+define('AT_INCLUDE_PATH', '../../include/');
+require (AT_INCLUDE_PATH.'vitals.inc.php');
+require ('lib/openmeetings.class.php');
+
+//local variables
+$course_id = $_SESSION['course_id'];
+
+//validate variables
+$_REQUEST['room_id'] = intval($_REQUEST['room_id']);
+
+//Initiate Openmeeting
+$om_obj = new Openmeetings($course_id, $_SESSION['member_id']);
+
+//Login
+$om_obj->om_login();
+
+//Handles form actions
+if (isset($_POST['submit']) && $_REQUEST['room_id']){
+	//have to makesure the user really do have permission over the paramater  
room id
+	if ($om_obj->isMine($_REQUEST['room_id']) ||  
authenticate(AT_PRIV_OPENMEETINGS, true)){
+		$om_obj->om_deleteRoom($_REQUEST['room_id']);
+		$msg->addFeedback('OPENMEETINGS_DELETE_SUCEEDED');
+		header('Location: index.php');
+		exit;
+	} else {
+		$msg->addError('OPENMEETINGS_DELETE_FAILED');
+	}
+} elseif (isset($_POST['cancel'])) {
+	$msg->addFeedback('OPENMEETINGS_CANCELLED');
+	header('Location: index.php');
+	exit;
+}
+
+//Header begins here
+require (AT_INCLUDE_PATH.'header.inc.php');
+?>
+
+<form action="<?php  $_SERVER['PHP_SELF']; ?>" method="post">
+	<div class="input-form">
+		<div class="row">
+			<p><?php echo _AT('openmeetings_confirm_delete'); ?></p>
+		</div>
+		<div class="row buttons">
+			<input type="hidden" name="room_id" value="<?php echo  
$_REQUEST['room_id']; ?>" />
+			<input type="submit" name="submit" value="<?php echo _AT('yes'); ?>"  />
+			<input type="submit" name="cancel" value="<?php echo _AT('no'); ?>" />
+		</div>
+	</div>
+</form>
+
+<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/openmeetings_group.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,66 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+define('AT_INCLUDE_PATH', '../../include/');
+require (AT_INCLUDE_PATH.'vitals.inc.php');
+require ('lib/openmeetings.class.php');
+require ('lib/openmeetings.inc.php');
+//$_custom_css = $_base_path . 'mods/openmeetings/module.css'; // use a  
custom stylesheet
+
+//local variables
+$course_id = $_SESSION['course_id'];
+
+// Check access
+checkAccess($course_id);
+
+$_GET['gid'] = intval($_GET['gid']);
+
+//Initiate Openmeeting
+$om_obj = new Openmeetings($course_id, $_SESSION['member_id']);
+
+//Login
+$om_obj->om_login();
+
+//Group meetings
+$sql = "SELECT title FROM ".TABLE_PREFIX."groups WHERE group_id=$_GET[gid]  
ORDER BY title";
+//TODO: Check group permission from group table.
+$result = mysql_query($sql, $db);
+$row = mysql_fetch_assoc($result);
+
+if (mysql_numrows($result) == 0){
+	echo '<div  
class="openmeetings">'._AT('openmeetings_no_group_meetings').'</div>';
+	require (AT_INCLUDE_PATH.'footer.inc.php');
+	exit;
+}
+
+//Check in the db and see if this group has a meeting alrdy, create on if  
not.
+$om_obj->setGid($_GET['gid']);
+if ($om_obj->om_getRoom()){
+	//Log into the room
+	$room_id = $om_obj->om_addRoom($room_name);
+	 
header('Location: '.AT_BASE_HREF.'mods/openmeetings/view_meetings.php?room_id='.$room_id.SEP.'sid='.$om_obj->getSid());
+	exit;
+} else {
+	//Header begins here
+	require (AT_INCLUDE_PATH.'header.inc.php');
+	echo '<div class="openmeetings">'.$row['title'].'<a  
href="mods/openmeetings/add_group_meetings.php?group_id='.$_GET['gid'].'">  
Start a conference </a></div>';
+	require (AT_INCLUDE_PATH.'footer.inc.php');
+}
+?>
=======================================
--- /dev/null
+++ /trunk/openmeetings/openmeetings_instructor.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,131 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+define('AT_INCLUDE_PATH', '../../include/');
+require (AT_INCLUDE_PATH.'vitals.inc.php');
+authenticate(AT_PRIV_OPENMEETINGS);
+require ('lib/openmeetings.class.php');
+require ('lib/openmeetings.inc.php');
+
+//local variables
+$course_id = $_SESSION['course_id'];
+
+//Initiate Openmeeting
+$om_obj = new Openmeetings($course_id, $_SESSION['member_id']);
+
+//Login
+$om_obj->om_login();
+
+//Handle form action
+if (isset($_POST['create_room']) && isset($_POST['room_id'])) {
+	//delete course room
+	$_POST['room_id'] = intval($_POST['room_id']);
+	$om_obj->om_deleteRoom($_POST['room_id']);
+	$msg->addFeedback('OPENMEETINGS_DELETE_SUCEEDED');
+} else if (isset($_POST['delete_room']) && isset($_POST['room_id'])){
+	$_POST['room_id'] = intval($_POST['room_id']);
+	$om_obj->om_deleteRoom($_POST['room_id']);
+	$msg->addFeedback('OPENMEETINGS_DELETE_SUCEEDED');
+} else if (isset($_POST['create_room']) || (isset($_POST['update_room'])  
&& isset($_POST['room_id']))){
+	//mysql escape
+	$_POST['openmeetings_roomtype']				=  
intval($_POST['openmeetings_roomtype']);
+	$_POST['openmeetings_num_of_participants']	=  
intval($_POST['openmeetings_num_of_participants']);
+	(intval($_POST['openmeetings_ispublic']) ==  
1)?$_POST['openmeetings_ispublic']='true':$_POST['openmeetings_ispublic']='false';
+	$_POST['openmeetings_vid_w']				= intval($_POST['openmeetings_vid_w']);
+	$_POST['openmeetings_vid_h']				= intval($_POST['openmeetings_vid_h']);
+	(intval($_POST['openmeetings_show_wb']) ==  
1)?$_POST['openmeetings_show_wb']='true':$_POST['openmeetings_show_wb']='false';
+	$_POST['openmeetings_wb_w']					= intval($_POST['openmeetings_wb_w']);
+	$_POST['openmeetings_wb_h']					= intval($_POST['openmeetings_wb_h']);
+	(intval($_POST['openmeetings_show_fp']) ==  
1)?$_POST['openmeetings_show_fp']='true':$_POST['openmeetings_show_fp']='false';
+	$_POST['openmeetings_fp_w']					= intval($_POST['openmeetings_fp_w']);
+	$_POST['openmeetings_fp_h']					= intval($_POST['openmeetings_fp_h']);
+
+	//create a new room
+	if (isset($_POST['create_room'])){
+		//Get the room id
+		//TODO: Course title added/removed after creation.  Affects the algo  
here.
+		if (isset($_SESSION['course_title']) && $_SESSION['course_title']!=''){
+			$room_name = $_SESSION['course_title'];
+		} else {
+			$room_name = 'course_'.$course_id;
+		}
+
+		//add the room with the given parameters.
+		if (!$om_obj->om_addRoom($room_name, $_POST)) {
+			exit('couldnt add room');
+
+		}
+		$msg->addFeedback('OPENMEETINGS_ADDED_SUCEEDED');
+		header('Location: index.php');
+		exit;
+	} else if (isset($_POST['update_room'])){
+		//update a room
+		$om_obj->om_updateRoom(intval($_POST['room_id']), $_POST);
+		$msg->addFeedback('OPENMEETINGS_UPDATE_SUCEEDED');
+		header('Location: index.php');
+		exit;
+	}
+} else if (isset($_POST['edit_room']) && isset($_POST['room_id'])){
+	//Log into the room
+	$room_id = $om_obj->om_getRoom();
+
+	//Get the room obj
+	$room_obj = $om_obj->om_getRoomById($room_id);
+
+	//Assign existing variables to the room
+	$_POST['openmeetings_roomtype']				=  
intval($room_obj['return']['roomtype']['roomtypes_id']);
+	$_POST['openmeetings_room_name']			=  
$addslashes($room_obj['return']['name']);
+	$_POST['openmeetings_num_of_participants']	=  
$addslashes($room_obj['return']['numberOfPartizipants']);
+	 
(($room_obj['return']['ispublic'])=='true')?$_POST['openmeetings_ispublic']=1:$_POST['openmeetings_ispublic']=0;
+	$_POST['openmeetings_vid_w']				=  
intval($room_obj['return']['videoPodWidth']);
+	$_POST['openmeetings_vid_h']				=  
intval($room_obj['return']['videoPodHeight']);
+	 
(($room_obj['return']['showWhiteBoard'])=='true')?$_POST['openmeetings_show_wb']=1:$_POST['openmeetings_show_wb']=0;
+	$_POST['openmeetings_wb_w']					=  
intval($room_obj['return']['whiteBoardPanelWidth']);
+	$_POST['openmeetings_wb_h']					=  
intval($room_obj['return']['whiteBoardPanelHeight']);
+	 
(($room_obj['return']['showFilesPanel'])=='true')?$_POST['openmeetings_show_fp']=1:$_POST['openmeetings_show_fp']=0;
+	$_POST['openmeetings_fp_w']					=  
intval($room_obj['return']['filesPanelWidth']);
+	$_POST['openmeetings_fp_h']					=  
intval($room_obj['return']['filesPanelHeight']);
+	include (AT_INCLUDE_PATH.'header.inc.php');
+	include ('html/update_room.inc.php');
+	include (AT_INCLUDE_PATH.'footer.inc.php');
+	exit;
+} else if (isset($_POST['cancel'])){
+	$msg->addFeedback('OPENMEETINGS_CANCELLED');
+	header('Location: index.php');
+	exit;
+} else if (isset($_GET['action']) && $_GET['action'] == 'view'){
+	$room_id = intval($_GET['room_id']);
+	$sid	 = $addslashes($_GET['sid']);
+	header('Location: view_meetings.php?room_id='.$room_id.SEP.'sid='.$sid);
+	exit;
+}
+
+//Log into the room
+$room_id = $om_obj->om_getRoom();
+
+require (AT_INCLUDE_PATH.'header.inc.php');
+if ($room_id == false) {
+	include ('html/create_room.inc.php');
+} else {
+	//include page
+	include ('html/edit_room.inc.php');
+}
+require (AT_INCLUDE_PATH.'footer.inc.php');
+?>
=======================================
--- /dev/null	
+++ /trunk/openmeetings/openmeetings_logo.png	Wed Oct 31 01:59:58 2012
Binary file, no diff available.
=======================================
--- /dev/null
+++ /trunk/openmeetings/view_meetings.php	Wed Oct 31 01:59:58 2012
@@ -0,0 +1,66 @@
+<?php
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License") +  you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+define('AT_INCLUDE_PATH', '../../include/');
+require (AT_INCLUDE_PATH.'vitals.inc.php');
+//require ('openmeetings.class.php');
+//$_custom_css = $_base_path . 'mods/openmeetings/module.css'; // use a  
custom stylesheet
+
+//local variables
+$course_id = $_SESSION['course_id'];
+
+/*
+ * Check access
+ * Disallowing improper accesses from a GET request
+ */
+$sql	= "SELECT `access` FROM ".TABLE_PREFIX."courses WHERE  
course_id=$course_id";
+$result = mysql_query($sql, $db);
+$course_info = mysql_fetch_assoc($result);
+
+if ($course_info['access']!='public' && ($_SESSION['enroll'] ==  
AT_ENROLL_NO || $_SESSION['enroll'] == AT_ENROLL_ALUMNUS)) {
+	require(AT_INCLUDE_PATH.'header.inc.php');
+	$msg->printInfos('NOT_ENROLLED');
+	require(AT_INCLUDE_PATH.'footer.inc.php');
+	exit;
+}
+
+if (!isset($_config['openmeetings_username']) | 
| !isset($_config['openmeetings_userpass'])){
+	require(AT_INCLUDE_PATH.'header.inc.php');
+	echo 'Contact admin plz';
+	//Please contact your administrator, om needs to be setup.
+	require(AT_INCLUDE_PATH.'footer.inc.php');
+	exit;
+}
+
+
+//Header begins here
+require (AT_INCLUDE_PATH.'header.inc.php');
+
+$_GET['room_id']	= abs($_GET['room_id']);
+$_GET['sid']		= addslashes($_GET['sid']);
+?>
+
+<div>
+<a href="<?php echo $_SERVER['PHP_SELF']; ?>" onclick="window.open('<?php  
echo $_config['openmeetings_location']; ?>/?roomid=<?php echo  
$_GET['room_id']; ?>&sid=<?php echo  
$_GET['sid'];?>','marratechwin','width=800,height=720,scrollbars=yes,  
resizable=yes'); return false"><?php echo   
_AT('openmeetings_own_window'); ?></a> </li>
+
+<iframe name="openmeetings" id="openmeetings" title="Openmeetings"  
frameborder="1" scrolling="auto" src="<?php echo  
$_config['openmeetings_location']; ?>/?roomid=<?php echo  
$_GET['room_id']; ?>&sid=<?php echo $_GET['sid'];?>" height="700"  
width="90%" align="center" style="border:thin white solid; align:center;"  
allowautotransparency="true"></iframe>
+
+</div>
+<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>