diff --git a/plugin/openmeetings/lang/english.php b/plugin/openmeetings/lang/english.php index 87287ac9b0..930f54e77f 100644 --- a/plugin/openmeetings/lang/english.php +++ b/plugin/openmeetings/lang/english.php @@ -39,7 +39,7 @@ $strings['host'] = 'OpenMeetings host'; $strings['host_help'] = 'This is the full address of your OpenMeeetings server interface. Might be http://localhost:5080/openmeetings, an IP address (e.g. http://192.168.13.54:5080/openmeetings) or a domain name (e.g. http://my.video.com:5080/openmeetings).'; $strings['salt'] = 'OpenMeetings salt'; -$strings['salt_help'] = 'This is the security key of your OpenMeetings server, which will allow your server to authentify the Chamilo installation. Refer to the OpenMeetings documentation to locate it. Try bbb-conf --salt'; +$strings['salt_help'] = 'This is the security key of your OpenMeetings server, which will allow your server to authentify the Chamilo installation. Refer to the OpenMeetings documentation to locate it.'; $strings['tool_enable'] = 'OpenMeetings videoconference tool enabled'; $strings['tool_enable_help'] = 'Choose whether you want to enable the OpenMeetings videoconference tool. Once enabled, it will show as an additional course tool in all courses homepage, and teachers will be able to launch a conference at any time. Students will not be able to launch a conference, only join one. If you don\'t have an OpenMeetings server, please set one up or ask the Chamilo official providers for a quote. OpenMeetings is a free (as in freedom *and* beer), but its installation requires a set of technical skills that might not be immediately available to all. You can install it on your own or seek professional help to assist you or do it for you. This help, however, will generate a certain cost. In the pure logic of the free software, we offer you the tools to make your work easier and recommend professionals (the Chamilo Official Providers) that will be able to help you if this were too difficult.
'; diff --git a/plugin/openmeetings/lang/french.php b/plugin/openmeetings/lang/french.php index 22e7720c83..8d2708dd46 100644 --- a/plugin/openmeetings/lang/french.php +++ b/plugin/openmeetings/lang/french.php @@ -32,7 +32,7 @@ $strings['host'] = 'Hôte de OpenMeetings'; $strings['host_help'] = "C'est le nom du serveur où le serveur de vidéoconférence a été habilité. Cela peut être http://localhost:5080/openmeetings, une adresse IP (du genre http://192.168.13.54:5080/openmeetings) ou un nom de domaine (du genre http://ma.videoconf.com:5080/openmeetings)."; $strings['salt'] = 'Clef OpenMeetings'; -$strings['salt_help'] = "C'est la clef de sécurité de votre serveur OpenMeetings (appelée 'salt' en anglais) qui permet à votre serveur de vérifier l'identité de votre installation de Chamilo et ainsi l'autoriser à se connecter. Veuillez vous référer à la documentation de OpenMeetings pour la localiser, ou utilisez la commande 'bbb-conf --salt' si vous disposez d'un accès en ligne de commande au serveur de vidéoconférence."; +$strings['salt_help'] = "C'est la clef de sécurité de votre serveur OpenMeetings (appelée 'salt' en anglais) qui permet à votre serveur de vérifier l'identité de votre installation de Chamilo et ainsi l'autoriser à se connecter. Veuillez vous référer à la documentation de OpenMeetings pour la localiser."; $strings['tool_enable'] = 'Outil de vidéoconférence OpenMeetings activé'; $strings['tool_enable_help'] = "Choisissez si vous souhaitez activer l'outil de vidéoconférence OpenMeetings. Une fois activé, il apparaîtra comme un outil additionnel sur toutes les pages principales de cours, et les enseignants pourront démarrer une conférence à n'importe quel moment. Les étudiants ne pourront pas lancer de nouvelle session de conférence, seulement se joindre à une session existante. Si vous ne disposez pas d'un serveur de vidéoconférence OpenMeetings, veuillez en installer un avant de poursuivre, ou demander un devis à l'un des fournisseurs officiels de Chamilo. OpenMeetings est un outil de logiciel libre (et gratuit), mais son installation pourrait présenter une certaine complexité et demander des compétences qui ne sont peut-être pas à la portée de tous. Vous pouvez l'installer vous-même à partir de la documentation (disponible publiquement) de OpenMeetings, ou recherchez un soutien professionnel. Ce soutien pourrait générer certains coûts (au moins le temps de la personne qui vous assiste dans l'opération). Dans le plus pur esprit du logiciel libre, nous vous fournissons les outils pour simplifier votre travail dans la mesure de nos possibilités, et nous vous recommandons des professionnels (les fournisseurs officiels de Chamilo) pour vous venir en aide au cas où ceux-ci seraient insuffisants.
"; diff --git a/plugin/openmeetings/lang/spanish.php b/plugin/openmeetings/lang/spanish.php index 1c71967f85..7692aa729f 100644 --- a/plugin/openmeetings/lang/spanish.php +++ b/plugin/openmeetings/lang/spanish.php @@ -35,7 +35,7 @@ $strings['user'] = 'Usuario'; $strings['user_help'] = 'Ingrese el usuario con el cual de conectará al servidor OpenMeetings'; $strings['pass'] = 'Clave OpenMeetings'; -$strings['pass_help'] = 'Esta es la llave de seguridad de su servidor OpenMeetings (llamada "salt" en inglés), que permitirá a su servidor de autentifica la instalación de Chamilo (como autorizada). Refiérese a la documentación de OpenMeetings para ubicarla, o use el comando "bbb-conf --salt" si tiene acceso al servidor en línea de comando.'; +$strings['pass_help'] = 'Esta es la llave de seguridad de su servidor OpenMeetings (llamada "salt" en inglés), que permitirá a su servidor de autentifica la instalación de Chamilo (como autorizada). Refiérese a la documentación de OpenMeetings para ubicarla.'; $strings['tool_enable'] = 'Herramienta de videoconferencia OpenMeetings activada'; $strings['tool_enable_help'] = 'Escoja si desea activar la herramienta de videoconferencia OpenMeetings. Una vez activada, se mostrará como una herramienta adicional en todas las páginas principales de cursos, y los profesores podrán iniciar una conferencia en cualquier momento. Los estudiantes no podrían lanzar una conferencia, solo juntarse a una existente. Si no tiene un servidor de videoconferencia OpenMeetings, por favor configure uno antes de seguir, o pida una cotización a uno de los proveedores oficiales de Chamilo. OpenMeetings es una herramienta de software libre (y gratuita), pero su instalación requiere de competencias que quizás no sean inmediatamente disponibles para todos. Puede instalarla usted mismo o buscar ayuda profesional. Esta ayuda podría no obstante generar algunos costos (por lo menos el tiempo de la persona quien lo ayude). En el puro espíritu del software libre, le ofrecemos las herramientas para hacer su trabajo más simple, en la medida de nuestras posibilidades, y le recomendamos profesionales (los proveedores oficiales de Chamilo) para ayudarlo en caso esto fuera demasiado complicado.
'; diff --git a/plugin/openmeetings/lib/openmeetings.lib.php b/plugin/openmeetings/lib/openmeetings.lib.php index a7cd49b7bb..fba785d5fd 100644 --- a/plugin/openmeetings/lib/openmeetings.lib.php +++ b/plugin/openmeetings/lib/openmeetings.lib.php @@ -17,7 +17,7 @@ include_once 'services/getRoomById/getRoomById.class.php'; /** * Open Meetings-Chamilo connector class */ -class openmeetings +class OpenMeetings { var $url; @@ -37,14 +37,14 @@ class openmeetings function __construct() { // initialize video server settings from global settings - $plugin = openmeetingsPlugin::create(); + $plugin = OpenMeetingsPlugin::create(); $om_plugin = $plugin->get('tool_enable'); $om_host = $plugin->get('host'); $om_user = $plugin->get('user'); $om_pass = $plugin->get('pass'); - $this->table = Database::get_main_table('plugin_om_meeting'); + $this->table = Database::get_main_table('plugin_openmeetings'); if ($om_plugin) { $user_info = api_get_user_info(); @@ -54,11 +54,11 @@ class openmeetings $this->url = $om_host; // Setting OM api - define('CONFIG_OMUSER_SALT', $this->user); - define('CONFIG_OMPASS_SALT', $this->pass); - define('CONFIG_OMSERVER_BASE_URL', $this->url); + define('CONFIG_OPENMEETINGS_USER_SALT', $this->user); + define('CONFIG_OPENMEETINGS_PASS_SALT', $this->pass); + define('CONFIG_OPENMEETINGS_SERVER_BASE_URL', $this->url); - $this->api = new OpenMeetings(); + $this->api = new OpenMeetingsAPI(); $this->plugin_enabled = $om_plugin; } } @@ -79,7 +79,7 @@ class openmeetings try { $objGetSession = new getSession(); $objloginUser = new loginUser(); - $urlWsdl = CONFIG_OMSERVER_BASE_URL . "/services/UserService?wsdl"; + $urlWsdl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/services/UserService?wsdl"; $omServices = new SoapClient( $urlWsdl ); //Verifying if there is already an active session if (empty($_SESSION['sessOpenMeeting'])) { @@ -118,12 +118,12 @@ class openmeetings $roomtypes_id = $isModerated = ( $this->is_teacher() ) ? 1 : 2 ; $params['c_id'] = api_get_course_int_id(); $course_name = 'COURSE_ID_' . $params['c_id'] .'_NAME_' . $params['meeting_name']; - $urlWsdl = CONFIG_OMSERVER_BASE_URL . "/services/RoomService?wsdl"; + $urlWsdl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/services/RoomService?wsdl"; $objAddRoom->SID = $this->sessionId; $objAddRoom->name = $course_name; $objAddRoom->roomtypes_id = $roomtypes_id; - $objAddRoom->comment = 'Curso: ' . $params['meeting_name'] . ' Plugin for Chamilo'; + $objAddRoom->comment = get_lang('Course').': ' . $params['meeting_name'] . ' Plugin for Chamilo'; $objAddRoom->numberOfPartizipants = 40; $objAddRoom->ispublic = true; $objAddRoom->appointment = false; @@ -178,10 +178,10 @@ class openmeetings $params = array( 'room_id' => $meetingid ); $returnVal = $this->setUserObjectAndGenerateRoomHashByURLAndRecFlag( $params ); - //$urlWithoutProtocol = str_replace("http://", CONFIG_OMSERVER_BASE_URL); + //$urlWithoutProtocol = str_replace("http://", CONFIG_OPENMEETINGS_SERVER_BASE_URL); //$imgWithoutProtocol = str_replace("http://", $_SESSION['_user']['avatar'] ); - $iframe = CONFIG_OMSERVER_BASE_URL . "/?" . + $iframe = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/?" . "secureHash=" . $returnVal /*. '&username=FRAGOTE' . '&firstname=DD' . @@ -238,7 +238,7 @@ class openmeetings try { $result = $this->api->getMeetingInfoArray($params); if ($result == null) { - if ($this->debug) error_log("Failed to get any response. Maybe we can't contact the BBB server."); + if ($this->debug) error_log("Failed to get any response. Maybe we can't contact the OpenMeetings server."); } else { return $result; } @@ -256,7 +256,7 @@ class openmeetings $systemType = 'chamilo'; $room_id = $params['room_id']; - $urlWsdl = CONFIG_OMSERVER_BASE_URL . "/services/UserService?wsdl"; + $urlWsdl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/services/UserService?wsdl"; $omServices = new SoapClient( $urlWsdl ); $objRec = new setUserObjectAndGenerateRecordingHashByURL(); @@ -286,7 +286,7 @@ class openmeetings $becomeModerator = ( $this->is_teacher() ? 1 : 0 ); $allowRecording = 1; //Provisional - $urlWsdl = CONFIG_OMSERVER_BASE_URL . "/services/UserService?wsdl"; + $urlWsdl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/services/UserService?wsdl"; $omServices = new SoapClient( $urlWsdl ); $objRec = new setUserObjectAndGenerateRoomHashByURLAndRecFlag(); @@ -309,7 +309,7 @@ class openmeetings } /** - * Gets all the course meetings saved in the plugin_bbb_meeting table + * Gets all the course meetings saved in the plugin_openmeetings table * @return array Array of current open meeting rooms */ function get_course_meetings() @@ -320,22 +320,21 @@ class openmeetings $this->loginUser(); $meeting_list = Database::select('*', $this->table, array('where' => array('c_id = ? ' => api_get_course_int_id()))); - $urlWsdl = CONFIG_OMSERVER_BASE_URL . "/services/RoomService?wsdl"; - + $urlWsdl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/services/RoomService?wsdl"; $omServices = new SoapClient($urlWsdl); $objRoom = new getRoomById(); $objCurrentUsers = new getRoomWithCurrentUsersById(); $objRoom->SID = $objCurrentUsers->SID = $this->sessionId; + foreach ($meeting_list as $meeting_db) { $objRoom->rooms_id = $objCurrentUsers->rooms_id = $meeting_db['id']; try { - $objRoomId = $omServices->getRoomById($objRoom); - - if (empty($objRoomId->return)) { - Database::delete($this->table, "id = {$meeting_db['id']}"); - continue; - } - $objCurUs = $omServices->getRoomWithCurrentUsersById($objCurrentUsers); + $objRoomId = $omServices->getRoomById($objRoom); + if (empty($objRoomId->return)) { + Database::delete($this->table, "id = {$meeting_db['id']}"); + continue; + } + $objCurUs = $omServices->getRoomWithCurrentUsersById($objCurrentUsers); } catch (SoapFault $e) { echo $e->faultstring; exit; @@ -434,7 +433,7 @@ class openmeetings // 'webVoiceConf' => '' // -- OPTIONAL - string // ); // $returnVal = $this->setUserObjectAndGenerateRoomHashByURLAndRecFlag( array('room_id' => $meeting_db['id']) ); -// $joinUrl = CONFIG_OMSERVER_BASE_URL . "?" . +// $joinUrl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "?" . // "secureHash=" . $returnVal; // // $item['go_url'] = $joinUrl; @@ -444,11 +443,17 @@ class openmeetings } return $new_meeting_list; } - function end_meeting($meetingId ) + + /** + * Send a command to the OpenMeetings server to close the meeting + * @param $meetingId + * @return int + */ + function end_meeting($meetingId) { try { $this->loginUser(); - $urlWsdl = CONFIG_OMSERVER_BASE_URL . "/services/RoomService?wsdl"; + $urlWsdl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/services/RoomService?wsdl"; $omServices = new SoapClient( $urlWsdl ); $objClose = new closeRoom(); $objClose->SID = $this->sessionId; diff --git a/plugin/openmeetings/lib/openmeetings_api.php b/plugin/openmeetings/lib/openmeetings_api.php index ce247e0f36..be93688c4d 100644 --- a/plugin/openmeetings/lib/openmeetings_api.php +++ b/plugin/openmeetings/lib/openmeetings_api.php @@ -3,11 +3,11 @@ class OpenMeetingsAPI { private $_securitySalt; - private $_omServerBaseUrl; + private $_serverBaseUrl; function __construct() { $this->_securitySalt = CONFIG_SECURITY_SALT; - $this->_omServerBaseUrl = CONFIG_SERVER_BASE_URL; + $this->_serverBaseUrl = CONFIG_OPENMEETINGS_SERVER_BASE_URL; } function getMeetingInfoArray($infoParams) { diff --git a/plugin/openmeetings/lib/openmeetings_plugin.class.php b/plugin/openmeetings/lib/openmeetings_plugin.class.php index b25710b685..c6eeedebba 100644 --- a/plugin/openmeetings/lib/openmeetings_plugin.class.php +++ b/plugin/openmeetings/lib/openmeetings_plugin.class.php @@ -1,6 +1,6 @@ get_lang('Videoconference'); $tpl = new Template($tool_name); -$om = new om_integration(); +$om = new openmeetings(); $action = isset($_GET['action']) ? $_GET['action'] : null; $teacher = $om->is_teacher(); @@ -71,7 +71,9 @@ if ($teacher) { } $meetings = $om->get_course_meetings(); -if (!empty($meetings)) $meetings = array_reverse($meetings); +if (!empty($meetings)) { + $meetings = array_reverse($meetings); +} $users_online = $meetings->participantCount; $status = !$meetings->isClosed; diff --git a/plugin/openmeetings/listing.tpl b/plugin/openmeetings/listing.tpl index 5d63438af6..8f317e4003 100644 --- a/plugin/openmeetings/listing.tpl +++ b/plugin/openmeetings/listing.tpl @@ -1,6 +1,6 @@
-{% if bbb_status == true %} +{% if openmeetings_status == true %} {% if show_join_button == true %}
diff --git a/plugin/openmeetings/start.php b/plugin/openmeetings/start.php index 5bc75c182a..25bbda58be 100644 --- a/plugin/openmeetings/start.php +++ b/plugin/openmeetings/start.php @@ -11,7 +11,7 @@ $course_plugin = 'openmeetings'; //needed in order to load the plugin lang varia require_once dirname(__FILE__).'/config.php'; $tool_name = get_lang('Videoconference'); $tpl = new Template($tool_name); -$om = new om_integration(); +$om = new openmeetings(); if ($om->plugin_enabled) {