Various small improvements in OpenMeetings plugin table - refs BT#7046 refs #5491

1.9.x
Yannick Warnier 11 years ago
parent 124c26feef
commit 3c1560656e
  1. 28
      plugin/openmeetings/lib/openmeetings.lib.php
  2. 3
      plugin/openmeetings/lib/services/addRoomWithModerationAndExternalType/addRoomWithModerationAndExternalType.class.php
  3. 8
      plugin/openmeetings/listing.php
  4. 4
      plugin/openmeetings/start.php

@ -85,8 +85,8 @@ class OpenMeetings
if (empty($_SESSION['sessOpenMeeting'])) {
$gsFun = $omServices->getSession($objGetSession);
$_SESSION['sessOpenMeeting'] = $objloginUser->SID = $this->sessionId = $gsFun->return->session_id;
$objloginUser->username = CONFIG_OMUSER_SALT;
$objloginUser->userpass = CONFIG_OMPASS_SALT;
$objloginUser->username = CONFIG_OPENMEETINGS_USER_SALT;
$objloginUser->userpass = CONFIG_OPENMEETINGS_PASS_SALT;
$luFn = $omServices->loginUser($objloginUser);
@ -117,7 +117,7 @@ class OpenMeetings
$objAddRoom = new addRoomWithModerationAndExternalType();
$roomTypeId = $isModerated = ( $this->isTeacher() ) ? 1 : 2 ;
$params['c_id'] = api_get_course_int_id();
$course_name = 'COURSE_ID_' . $params['c_id'] .'_NAME_' . $params['meeting_name'];
$course_name = 'C'.$params['c_id'].'-'.api_get_session_id();
$urlWsdl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/services/RoomService?wsdl";
$objAddRoom->SID = $this->sessionId;
@ -130,13 +130,23 @@ class OpenMeetings
$objAddRoom->isDemoRoom = false;
$objAddRoom->demoTime = false;
$objAddRoom->isModeratedRoom = $isModerated;
$objAddRoom->externalRoomType = true;
$objAddRoom->externalRoomType = 'chamilo';
$omServices = new SoapClient( $urlWsdl );
$adFun = $omServices->addRoomWithModerationAndExternalType( $objAddRoom );
$omServices = new SoapClient($urlWsdl, array("trace" => 1, "exceptions" => true, "cache_wsdl" => WSDL_CACHE_NONE));
try {
$s = $omServices->addRoomWithModerationAndExternalType($objAddRoom);
//error_log($omServices->__getLastRequest());
//error_log($omServices->__getLastResponse());
} catch (SoapFault $e) {
echo "<h1>Warning</h1>
<p>We have detected some problems </br>
Fault: {$e->faultstring}</p>";
return -1;
}
if ($adFun->return > -1) {
$meetingId = $params['id'] = $adFun->return;
if ($s->return > -1) {
$meetingId = $params['id'] = $s->return;
$params['status'] = '1';
$params['meeting_name'] = $course_name;
$params['created_at'] = date('l jS \of F Y h:i:s A');
@ -327,7 +337,7 @@ class OpenMeetings
$item = array();
$pass = $this->getMeetingUserPassword();
$this->loginUser();
$meeting_list = Database::select('*', $this->table, array('where' => array('c_id = ? ' => api_get_course_int_id())));
$meeting_list = Database::select('*', $this->table, array('where' => array('c_id = ? ' => api_get_course_int_id(), 'session_id = ? ' => api_get_session_id())));
$urlWsdl = CONFIG_OPENMEETINGS_SERVER_BASE_URL . "/services/RoomService?wsdl";
$omServices = new SoapClient($urlWsdl);

@ -1,10 +1,11 @@
<?php
class addRoomWithModerationAndExternalType{
// params as defined in WSDL
public $SID;
public $name;
public $roomtypes_id;
public $comment;
public $numberOfPartizapants;
public $numberOfPartizipants;
public $ispublic;
public $appointment;
public $isDemoRoom;

@ -13,7 +13,7 @@ $plugin = openmeetingsPlugin::create();
$tool_name = $plugin->get_lang('Videoconference');
$tpl = new Template($tool_name);
$om = new openmeetings();
$om = new OpenMeetings();
$action = isset($_GET['action']) ? $_GET['action'] : null;
$teacher = $om->isTeacher();
@ -76,7 +76,8 @@ if (!empty($meetings)) {
}
$users_online = $meetings->participantCount;
$status = !$meetings->isClosed;
//$status = !$meetings->isClosed;
$status = $om->isServerRunning();
$meeting_exists = !$meetings->isClosed;//$om->meeting_exists(api_get_course_id());
$show_join_button = false;
if ($meeting_exists || $teacher) {
@ -95,4 +96,5 @@ $tpl->assign('show_join_button', $show_join_button);
$tpl->assign('message', $message);
$listing_tpl = 'openmeetings/listing.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);$tpl->display_one_col_template();
$tpl->assign('content', $content);
$tpl->display_one_col_template();

@ -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 openmeetings();
$om = new OpenMeetings();
if ($om->plugin_enabled) {
@ -20,7 +20,7 @@ if ($om->plugin_enabled) {
if (isset($_GET['launch']) && $_GET['launch'] == 1) {
$meeting_params = array();
$meeting_params['meeting_name'] = api_get_course_id();
$meeting_params['meeting_name'] = api_get_course_id().'-'.api_get_session_id();
$meetings = $om->getCourseMeetings();
// Select the meeting with more participantCount.

Loading…
Cancel
Save