Author: sebawagner
Date: Tue May 22 18:29:01 2012
New Revision: 1341587

URL: http://svn.apache.org/viewvc?rev=1341587&view=rev
Log:
OPENMEETINGS-280 Update ATutor Module for OM 

Added:
    incubator/openmeetings/trunk/plugins/atutor_plugin/.project
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/TODO.txt
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/add_group_meetings.php
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/course_meeting.inc.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.inc.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.tmpl.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/edit_room.inc.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/group_meeting.inc.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/update_room.inc.php
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/index.php
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/SOAP_openmeetings.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/nusoap.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.class.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.inc.php
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.css
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.php
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.sql
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.xml
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_install.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_uninstall.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_delete.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_group.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_instructor.php
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_logo.png
   (with props)
    incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/readme
    
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/view_meetings.php

Added: incubator/openmeetings/trunk/plugins/atutor_plugin/.project
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/.project?rev=1341587&view=auto
==============================================================================
--- incubator/openmeetings/trunk/plugins/atutor_plugin/.project (added)
+++ incubator/openmeetings/trunk/plugins/atutor_plugin/.project Tue May 22 
18:29:01 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>

Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/TODO.txt
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/TODO.txt?rev=1341587&view=auto
==============================================================================
--- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/TODO.txt 
(added)
+++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/TODO.txt 
Tue May 22 18:29:01 2012
@@ -0,0 +1,42 @@
++======+
+| TODO |
++======+
+@author        harris w.
+@date  June 05,08
+
+June 05, 08
+------------
+- 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
+
+
+June 11, 08
+------------
+- 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 19, 08
+------------
+- Allow users to retrieve the recordings.  [June 25, 08 - milestone for 
version 5.3]
+- Make the index page a bit more pretty.
+
+June 25, 08
+------------
+- Admin can now delete or create group meetings
+
+June 26, 08
+------------
+- Added the ability to create diff type of rooms: conference/audience
+
+Feb 5, 09
+------------
+- Added the ability to delete conference rooms.
+- Now compatible with Openmeetings 0.7RC1 (Red5 7.0+)
\ No newline at end of file

Added: 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/add_group_meetings.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/add_group_meetings.php?rev=1341587&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/add_group_meetings.php
 (added)
+++ 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/add_group_meetings.php
 Tue May 22 18:29:01 2012
@@ -0,0 +1,141 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: add_group_meetings.php 7575 2008-06-02 18:17:14Z hwong $
+
+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]";
+       }
+       if (mysql_numrows($result) <= 0){
+               $msg->addError('OPENMEETINGS_ADD_FAILED');
+               header('index.php');
+               exit;
+       } 
+       $result = mysql_query($sql, $db);
+       $row = mysql_fetch_assoc($result);
+}
+
+//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['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;
+} 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'); 
+?>
\ No newline at end of file

Added: 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/course_meeting.inc.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/course_meeting.inc.php?rev=1341587&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/course_meeting.inc.php
 (added)
+++ 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/course_meeting.inc.php
 Tue May 22 18:29:01 2012
@@ -0,0 +1,43 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: course_meeting.inc.php 7208 2008-01-09 16:07:24Z harrisw $
+
+//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; ?>
\ No newline at end of file

Added: 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.inc.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.inc.php?rev=1341587&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.inc.php
 (added)
+++ 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.inc.php
 Tue May 22 18:29:01 2012
@@ -0,0 +1,44 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: create_room.inc.php 7208 2008-01-09 16:07:24Z harrisw $
+
+//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>

Added: 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.tmpl.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.tmpl.php?rev=1341587&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.tmpl.php
 (added)
+++ 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/create_room.tmpl.php
 Tue May 22 18:29:01 2012
@@ -0,0 +1,81 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: create_room.tmpl.php 7208 2008-01-09 16:07:24Z harrisw $
+?>
+<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>
+
+<!-- Video settings -->
+<div class="row">
+       <p><label for="openmeetings_vid_w"><?php echo 
_AT('openmeetings_vid_w'); ?></label></p> 
+       <input type="text" name="openmeetings_vid_w" value="<?php echo 
$_POST['openmeetings_vid_w']; ?>" id="openmeetings_vid_w" size="20" />
+</div>
+<div class="row">
+       <p><label for="openmeetings_vid_h"><?php echo 
_AT('openmeetings_vid_h'); ?></label></p> 
+       <input type="text" name="openmeetings_vid_h" value="<?php echo 
$_POST['openmeetings_vid_h']; ?>" id="openmeetings_vid_h" size="20" />
+</div>
+
+<!-- Whiteboard settings -->
+<div class="row">
+       <?php
+               ($_POST['openmeetings_show_wb']== 1)? $om_show_wb_y = 
'checked="checked"' : $om_show_wb_n = 'checked="checked"';
+       ?>
+       <p><label for="openmeetings_show_wb"><?php echo 
_AT('openmeetings_show_wb'); ?></label></p>     
+       <input type="radio" name="openmeetings_show_wb" 
id="openmeetings_show_wb_enabled" value="1" <?php echo $om_show_wb_y;?> 
onclick="om_toggler('openmeetings_wb', true);"/>
+       <label for="openmeetings_show_wb_enabled"><?php echo _AT('enable');  
?></label> 
+       <input type="radio" name="openmeetings_show_wb" 
id="openmeetings_show_wb_disabled" value="0" <?php echo $om_show_wb_n;?> 
onclick="om_toggler('openmeetings_wb', false);"/><label 
for="openmeetings_show_wb_disabled"><?php echo _AT('disable');  ?></label> 
+</div>
+<div class="row">
+       <p><label for="openmeetings_wb_w"><?php echo _AT('openmeetings_wb_w'); 
?></label></p>   
+       <input type="text" name="openmeetings_wb_w" value="<?php echo 
$_POST['openmeetings_wb_w']; ?>" id="openmeetings_wb_w" size="20" />
+</div>
+<div class="row">
+       <p><label for="openmeetings_wb_h"><?php echo _AT('openmeetings_wb_h'); 
?></label></p>   
+       <input type="text" name="openmeetings_wb_h" value="<?php echo 
$_POST['openmeetings_wb_h']; ?>" id="openmeetings_wb_h" size="20" />
+</div>
+
+<!-- File Panel settings -->
+<div class="row">
+       <?php
+               ($_POST['openmeetings_show_fp']== 1)? $om_show_fp_y = 
'checked="checked"' : $om_show_fp_n = 'checked="checked"';
+       ?>
+       <p><label for="openmeetings_show_fp"><?php echo 
_AT('openmeetings_show_fp'); ?></label></p>     
+       <input type="radio" name="openmeetings_show_fp" 
id="openmeetings_show_fp_enabled" value="1" <?php echo $om_show_fp_y;?> 
onclick="om_toggler('openmeetings_fp', true);"/><label 
for="openmeetings_show_fp_enabled"><?php echo _AT('enable');  ?></label> 
+       <input type="radio" name="openmeetings_show_fp" 
id="openmeetings_show_fp_disabled" value="0" <?php echo $om_show_fp_n;?> 
onclick="om_toggler('openmeetings_fp', false);"/><label 
for="openmeetings_show_fp_disabled"><?php echo _AT('disable');  ?></label> 
+</div>
+<div class="row">
+       <p><label for="openmeetings_fp_w"><?php echo _AT('openmeetings_fp_w'); 
?></label></p>   
+       <input type="text" name="openmeetings_fp_w" value="<?php echo 
$_POST['openmeetings_fp_w']; ?>" id="openmeetings_fp_w" size="20" />
+</div>
+<div class="row">
+       <p><label for="openmeetings_fp_h"><?php echo _AT('openmeetings_fp_h'); 
?></label></p>   
+       <input type="text" name="openmeetings_fp_h" value="<?php echo 
$_POST['openmeetings_fp_h']; ?>" id="openmeetings_fp_h" size="20" />
+</div>
\ No newline at end of file

Added: 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/edit_room.inc.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/edit_room.inc.php?rev=1341587&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/edit_room.inc.php
 (added)
+++ 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/edit_room.inc.php
 Tue May 22 18:29:01 2012
@@ -0,0 +1,28 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: edit_room.inc.php 7208 2008-01-09 16:07:24Z harrisw $
+
+?>
+<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>
\ No newline at end of file

Added: 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/group_meeting.inc.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/group_meeting.inc.php?rev=1341587&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/group_meeting.inc.php
 (added)
+++ 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/group_meeting.inc.php
 Tue May 22 18:29:01 2012
@@ -0,0 +1,48 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: group_meeting.inc.php 7208 2008-01-09 16:07:24Z harrisw $
+
+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>';
+}
+
+?>

Added: 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/update_room.inc.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/update_room.inc.php?rev=1341587&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/update_room.inc.php
 (added)
+++ 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/html/update_room.inc.php
 Tue May 22 18:29:01 2012
@@ -0,0 +1,41 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: create_room.inc.php 7208 2008-01-09 16:07:24Z harrisw $
+
+?>
+<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>

Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/index.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/index.php?rev=1341587&view=auto
==============================================================================
--- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/index.php 
(added)
+++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/index.php 
Tue May 22 18:29:01 2012
@@ -0,0 +1,57 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: index.php 7575 2008-06-02 18:17:14Z hwong $
+
+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']);
+
+//Login
+$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');
+?>
\ No newline at end of file

Added: 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/SOAP_openmeetings.php
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/SOAP_openmeetings.php?rev=1341587&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/SOAP_openmeetings.php
 (added)
+++ 
incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/SOAP_openmeetings.php
 Tue May 22 18:29:01 2012
@@ -0,0 +1,238 @@
+<?php
+/************************************************************************/
+/* ATutor                                                                      
                                                        */
+/************************************************************************/
+/* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong               
*/
+/* Adaptive Technology Resource Centre / University of Toronto                 
*/
+/* http://atutor.ca                                                            
                                                */
+/*                                                                             
                                                                */
+/* This program is free software. You can redistribute it and/or               
*/
+/* modify it under the terms of the GNU General Public License                 
*/
+/* as published by the Free Software Foundation.                               
                */
+/************************************************************************/
+// $Id: SOAP_openmeetings.php 7575 2008-06-02 18:17:14Z hwong $
+if (!defined('AT_INCLUDE_PATH')) { exit; }
+
+//require(AT_INCLUDE_PATH . 'classes/nusoap.php');
+require('nusoap.php');  //newer version, come with the module
+
+/**
+* SOAP_openmeetings
+* Class for using the SOAP service for openmeetings
+* Please refer to the following API: 
+*      http://code.google.com/p/openmeetings/wiki/SoapMethods
+*
+* @access      public
+* @author      Harris Wong
+*/
+class SOAP_openmeetings {
+       var $_sid                       = "";   //session id
+       var $_soapClient        = NULL; //soap connector
+       var $_wsdl                      = "";   //soap service link
+
+       function SOAP_openmeetings($wsdl) {
+               $this->_wsdl                    = $wsdl;
+               $this->_soapClient              = new 
nusoap_client($this->_wsdl, true);
+               $getSession_obj                 = 
$this->_performAPICall('getSession', '');     
+               //check session id
+               if (!$getSession_obj){
+                       $this->_sid = session_id();  //openmeeting will return 
error code on this
+               } else {
+                       $this->_sid = $getSession_obj['return']['session_id'];
+               }
+       }
+
+    /**
+    * Login as an user and sets a session
+    *
+    * @param  array
+    * @return mixed
+    * @access public
+    */
+    function login($parameters = array()) {
+        if (!isset($parameters["username"])) {
+            return false;
+        }
+        return $this->_performAPICall(
+          "loginUser",
+
+          array(
+            "SID"         => $this->_sid,
+            "username"    => $parameters["username"],
+            "userpass"    => $parameters["userpass"]
+          )
+        );
+    }
+
+
+       /**
+        * Sets user object
+     * @param  array
+     * @return mixed
+     * @access public
+     */
+    function saveUserInstance($parameters = array()) {
+        return $this->_performAPICall(
+          "setUserObject",
+
+          array(
+            "SID"                                      => $this->_sid,
+            "username"                         => $parameters["username"],
+            "firstname"                                => 
$parameters["firstname"],
+                   "lastname"                          => 
$parameters["lastname"],
+                   "profilePictureUrl"         => $parameters[""],
+                   "email"                                     => 
$parameters["email"]
+          )
+        );
+    }
+
+       /**
+        * Get error message
+        */
+       function getError($code){
+               return $this->_performAPICall(
+                       "getErrorByCode",
+                       array(
+                               "SID"                           => $this->_sid,
+                               "errorid"                       => $code,
+                               "language_id"           => 1
+                               )
+               );
+       }
+
+       /**
+        * Creating a room
+        */
+       function addRoom($parameters = array()){
+        return $this->_performAPICall(
+          "addRoom",
+
+          array(
+            "SID"                                              => 
$parameters["SID"],
+                       'name'                                          => 
$parameters["name"],
+                       'roomtypes_id'                          => 
$parameters["roomtypes_id"],
+                       'comment'                                       => 
'Room created by ATutor',
+                       'numberOfPartizipants'          => 
$parameters["numberOfPartizipants"],
+                       'ispublic'                                      => 
$parameters["ispublic"],
+                       'videoPodWidth'                         => 
$parameters["videoPodWidth"],
+                       'videoPodHeight'                        => 
$parameters["videoPodHeight"],
+                       'videoPodXPosition'                     => 2, 
+                       'videoPodYPosition'                     => 2, 
+                       'moderationPanelXPosition'      => 400, 
+                       'showWhiteBoard'                        => 
$parameters["showWhiteBoard"],
+                       'whiteBoardPanelXPosition'      => 276, 
+                       'whiteBoardPanelYPosition'      => 2, 
+                       'whiteBoardPanelHeight'         => 
$parameters["whiteBoardPanelHeight"],
+                       'whiteBoardPanelWidth'          => 
$parameters["whiteBoardPanelWidth"],
+                       'showFilesPanel'                        => 
$parameters["showFilesPanel"], 
+                       'filesPanelXPosition'           => 2, 
+                       'filesPanelYPosition'           => 284, 
+                       'filesPanelHeight'                      => 
$parameters["filesPanelHeight"], 
+                       'filesPanelWidth'                       => 
$parameters["filesPanelWidth"]
+          )
+        );
+       }
+
+
+       /**
+        * Updating a room
+        */
+       function updateRoom($parameters = array()){
+        return $this->_performAPICall(
+          "updateRoom",
+
+          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"],
+                       'videoPodWidth'                         => 
$parameters["videoPodWidth"],
+                       'videoPodHeight'                        => 
$parameters["videoPodHeight"],
+                       'videoPodXPosition'                     => 2, 
+                       'videoPodYPosition'                     => 2, 
+                       'moderationPanelXPosition'      => 400, 
+                       'showWhiteBoard'                        => 
$parameters["showWhiteBoard"],
+                       'whiteBoardPanelXPosition'      => 276, 
+                       'whiteBoardPanelYPosition'      => 2, 
+                       'whiteBoardPanelHeight'         => 
$parameters["whiteBoardPanelHeight"],
+                       'whiteBoardPanelWidth'          => 
$parameters["whiteBoardPanelWidth"],
+                       'showFilesPanel'                        => 
$parameters["showFilesPanel"], 
+                       'filesPanelXPosition'           => 2, 
+                       'filesPanelYPosition'           => 284, 
+                       'filesPanelHeight'                      => 
$parameters["filesPanelHeight"], 
+                       'filesPanelWidth'                       => 
$parameters["filesPanelWidth"]
+          )
+        );
+       }
+
+
+       /**
+        * Delete room
+        */
+       function deleteRoom($parameters = array()){
+               return $this->_performAPICall(
+                       "deleteRoom",
+                       array(
+                               "SID"           => $parameters["SID"],
+                               "rooms_id"      => $parameters["rooms_id"]
+                       )
+               );
+       }
+
+
+       /**
+        * return the session id.
+        */
+       function getSid(){
+               return $this->_sid;
+       }
+
+       /**
+        * Get room by id
+        */
+       function getRoomById($parameters = array()){
+               return $this->_performAPICall(
+                       "getRoomById",
+                       array(
+                               "SID"           => $parameters["SID"],
+                               "rooms_id"      => $parameters["rooms_id"]
+                       )
+               );      
+       }
+        
+
+
+   /**
+    * @param  string
+    * @param  array
+    * @return mixed
+    * @access private
+    */
+    function _performAPICall($apiCall, $parameters) {
+                       $result = $this->_soapClient->call(
+                         $apiCall,
+                         $parameters
+                       );
+
+               if ($this->_soapClient->fault){
+                       return false;
+               } elseif ($this->_soapClient->getError()){
+                       return false;
+               }
+
+               // if (!PEAR::isError($result)) {
+               if (is_array($result)) {
+            return $result;
+        } else {
+                       return false;
+        }
+    }
+
+       function myErrors(){
+               return $this->_soapClient->getError();
+       }
+}
+?>
\ No newline at end of file


Reply via email to