Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.class.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.class.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.class.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.class.php Tue May 22 18:29:01 2012 @@ -0,0 +1,243 @@ +<?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: openmeetings.class.php 7575 2008-06-04 18:17:14Z hwong $ +if (!defined('AT_INCLUDE_PATH')) { exit; } +require('SOAP_openmeetings.php'); + +class Openmeetings { + var $_sid = ''; //Openmeetings session id + var $_course_id = ''; + var $_member_id = ''; + var $_group_id = ''; + + //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); + + } + + /** + * Login to openmeetings + * Login process is, login, saveuserinstance + */ + function om_login() { + global $_config; + $om = new SOAP_openmeetings($_config['openmeetings_location'].'/services/UserService?wsdl'); + $param = array ( 'username' => $_config['openmeetings_username'], + 'userpass' => $_config['openmeetings_userpass']); + + /** + * Login to the openmeetings + * ref: http://code.google.com/p/openmeetings/wiki/DirectLoginSoapGeneralFlow + */ + $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'] + ); + $om->saveUserInstance($params); + } + + + + /** + * 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; + } + + //Add this room + $om = new SOAP_openmeetings($_config['openmeetings_location'].'/services/RoomService?wsdl'); + $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'], + 'videoPodWidth' => $om_param['openmeetings_vid_w'], + 'videoPodHeight' => $om_param['openmeetings_vid_h'], + 'showWhiteBoard' => $om_param['openmeetings_show_wb'], + 'whiteBoardPanelWidth' => $om_param['openmeetings_wb_w'], + 'whiteBoardPanelHeight' => $om_param['openmeetings_wb_h'], + 'showFilesPanel' => $om_param['openmeetings_show_fp'], + 'filesPanelHeight' => $om_param['openmeetings_fp_h'], + 'filesPanelWidth' => $om_param['openmeetings_fp_w'] + ); + $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; + + //update this room + $om = new SOAP_openmeetings($_config['openmeetings_location'].'/services/RoomService?wsdl'); + $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'], + 'videoPodWidth' => $om_param['openmeetings_vid_w'], + 'videoPodHeight' => $om_param['openmeetings_vid_h'], + 'showWhiteBoard' => $om_param['openmeetings_show_wb'], + 'whiteBoardPanelWidth' => $om_param['openmeetings_wb_w'], + 'whiteBoardPanelHeight' => $om_param['openmeetings_wb_h'], + 'showFilesPanel' => $om_param['openmeetings_show_fp'], + 'filesPanelHeight' => $om_param['openmeetings_fp_h'], + 'filesPanelWidth' => $om_param['openmeetings_fp_w'] + ); + $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 INNER JOIN '.TABLE_PREFIX."openmeetings_groups WHERE +// course_id = $this->_course_id AND owner_id = $this->_member_id AND group_id = $this->_group_id"; + $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 = new SOAP_openmeetings($_config['openmeetings_location'].'/services/RoomService?wsdl'); + $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 = new SOAP_openmeetings($_config['openmeetings_location'].'/services/RoomService?wsdl'); + $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; + } +} +?> \ No newline at end of file
Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.inc.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.inc.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.inc.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/lib/openmeetings.inc.php Tue May 22 18:29:01 2012 @@ -0,0 +1,61 @@ +<?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: openmeetings.inc.php 7575 2008-06-04 18:17:14Z hwong $ +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; + } +} +?> \ No newline at end of file Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.css URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.css?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.css (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.css Tue May 22 18:29:01 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; +} + Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.php Tue May 22 18:29:01 2012 @@ -0,0 +1,59 @@ +<?php +/******* + * 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; +} +?> \ No newline at end of file Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.sql URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.sql?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.sql (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.sql Tue May 22 18:29:01 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://code.google.com/p/openmeetings/wiki/SoapMethods#addRoom" 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(),''); Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.xml URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.xml?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.xml (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module.xml Tue May 22 18:29:01 2012 @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<module version="0.3"> + <name lang="en">Openmeetings</name> + <description lang="en">Openmeetings is a Multi-Language Cross-Platform Customizable Video-Conferencing and Collaboration Flash based web application.</description> + <maintainers> + <maintainer> + <name>ATutor Team</name> + <email>[email protected]</email> + </maintainer> + </maintainers> + <url>http://atutor.ca</url> + <license>GNU</license> + <release> + <version>0.4</version> + <date>2010-10-25</date> + <state>stable</state> + <notes>Requires Openmeetings server(Red5) be installed on the user's system. Details can be found at http://code.google.com/p/openmeetings/</notes> + </release> +</module> \ No newline at end of file Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_install.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_install.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_install.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_install.php Tue May 22 18:29:01 2012 @@ -0,0 +1,46 @@ +<?php +/******* + * 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); +} + +?> \ No newline at end of file Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_uninstall.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_uninstall.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_uninstall.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/module_uninstall.php Tue May 22 18:29:01 2012 @@ -0,0 +1,26 @@ +<?php +/******* + * 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); +} + +?> \ No newline at end of file Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings.php Tue May 22 18:29:01 2012 @@ -0,0 +1,82 @@ +<?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: openmeetings.php 7575 2008-06-02 18:17:14Z hwong $ + +/** + * 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'); ?> \ No newline at end of file Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_delete.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_delete.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_delete.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_delete.php Tue May 22 18:29:01 2012 @@ -0,0 +1,65 @@ +<?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: openmeetings_delete.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'); + +//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'); ?> Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_group.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_group.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_group.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_group.php Tue May 22 18:29:01 2012 @@ -0,0 +1,60 @@ +<?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: openmeetings_group.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'); +//$_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'); +} +?> \ No newline at end of file Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_instructor.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_instructor.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_instructor.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_instructor.php Tue May 22 18:29:01 2012 @@ -0,0 +1,122 @@ +<?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: openmeetings_instructor.php 7575 2008-06-02 18:17:14Z hwong $ + +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'); +} elseif (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'); +} elseif (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['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; +} elseif (isset($_POST['cancel'])){ + $msg->addFeedback('OPENMEETINGS_CANCELLED'); + header('Location: index.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; +} + +//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'); +?> \ No newline at end of file Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_logo.png URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_logo.png?rev=1341587&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/openmeetings_logo.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/readme URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/readme?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/readme (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/readme Tue May 22 18:29:01 2012 @@ -0,0 +1,61 @@ +#Openmeetings module for ATutor readme + +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://code.google.com/p/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 Openmeetings installion you will be using. The user account must have Admin-rights. + +This module has been tested on the following specifications: +Openmeetings 0.7 (RC1) +Red5 0.7+ [http://osflash.org/red5] + + +License: +GNU Lesser General Public License + + + +Changelog: +============ +Feb 5, 09 +------------ +- Added the ability to delete conference rooms. +- Now compatible with Openmeetings 0.7RC1 (Red5 7.0+) + +June 26, 08 +------------ +- Added the ability to create diff type of rooms: conference/audience + +June 25, 08 +------------ +- Admin can now delete or create group meetings + +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 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 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 + + Added: incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/view_meetings.php URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/view_meetings.php?rev=1341587&view=auto ============================================================================== --- incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/view_meetings.php (added) +++ incubator/openmeetings/trunk/plugins/atutor_plugin/openmeetings/view_meetings.php Tue May 22 18:29:01 2012 @@ -0,0 +1,60 @@ +<?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: view_meetings.php 7575 2008-06-02 18:17:14Z hwong $ + +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']; ?>/main.lzx.lzr=swf8.swf?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']; ?>/main.lzx.lzr=swf8.swf?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'); ?> \ No newline at end of file
