BBB plugin settings are now managed by the plugin class. Click "configure" in order to setup the BBB plugin see BT#3123

skala
Julio Montoya 13 years ago
parent 3414a8aa8b
commit 1255905b5a
  1. 6
      plugin/bbb/config.php
  2. 8
      plugin/bbb/lang/english.php
  3. 34
      plugin/bbb/lib/bbb.lib.php
  4. 2
      plugin/bbb/start.php

@ -4,9 +4,5 @@
/* bbb parameters that will be registered in the course settings */
require_once '../../main/inc/global.inc.php';
require_once 'lib/bbb_plugin.class.php';
require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
require_once 'lib/bbb.lib.php';
require_once 'lib/bbb_api.php';
require_once 'lib/bbb_plugin.class.php';
require_once 'lib/bbb_api.php';

@ -34,11 +34,11 @@ $strings['ServerIsNotConfigured'] = "Videoconference server is not configured";
$strings['XUsersOnLine'] = "%s user(s) online";
$strings['host'] = 'BigBlueButton server host';
$strings['host_help'] = 'This is the name of the server where your BigBlueButton server is running. Might be localhost, an IP address (e.g. 192.168.13.54) or a domain name (e.g. my.video.com)';
$strings['host'] = 'BigBlueButton host';
$strings['host_help'] = 'This is the name of the server where your BigBlueButton server is running. Might be localhost, an IP address (e.g. 192.168.13.54) or a domain name (e.g. my.video.com).';
$strings['salt'] = 'Security key of the BigBlueButton server';
$strings['salt_help'] = 'This is the security key of your BigBlueButton server, which will allow your server to authentify the Chamilo installation. Refer to the BigBlueButton documentation to locate it.';
$strings['salt'] = 'BigBlueButton salt';
$strings['salt_help'] = 'This is the security key of your BigBlueButton server, which will allow your server to authentify the Chamilo installation. Refer to the BigBlueButton documentation to locate it. Try bbb-conf --salt';
$strings['tool_enable'] = 'BigBlueButton videoconference tool enabled';
$strings['tool_enable_help'] = "Choose whether you want to enable the BigBlueButton videoconference tool.

@ -1,10 +1,12 @@
<?php
/**
* This script initiates a videoconference session, calling the BigBlueButton API
* @package chamilo.plugin.bigbluebutton
*/
require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
require_once 'bbb_plugin.class.php';
class bbb {
var $url;
@ -14,34 +16,29 @@ class bbb {
var $protocol = 'http://';
var $debug = true;
var $logout_url = null;
var $plugin_enabled = false;
function __construct() {
// initialize video server settings from global settings
$settings = api_get_settings('Extra','list',api_get_current_access_url_id());
$bbb_settings = array();
foreach ($settings as $setting) {
if (substr($setting['variable'],0,4)==='bbb_') {
$bbb_settings[$setting['variable']] = $setting['selected_value'];
}
}
$bbb_plugin = $bbb_settings['bbb_tool_enable'] === 'true';
$bbb_host = $bbb_settings['bbb_host'];
$bbb_salt = $bbb_settings['bbb_salt'];
// initialize video server settings from global settings
$plugin = BBBPlugin::create();
$bbb_plugin = $plugin->get('tool_enable');
$bbb_host = $plugin->get('host');
$bbb_salt = $plugin->get('salt');
$course_code = api_get_course_id();
$this->logout_url = api_get_path(WEB_COURSE_PATH).$course_code;
if ($bbb_plugin) {
if ($bbb_plugin == true) {
$user_info = api_get_user_info();
$this->user_complete_name = $user_info['complete_name'];
$this->salt = $bbb_salt;
$this->url = $bbb_host.'/bigbluebutton/';
$this->table = Database::get_main_table('plugin_bbb_meeting');
return true;
}
return false;
$this->table = Database::get_main_table('plugin_bbb_meeting');
$this->plugin_enabled = true;
}
}
function is_teacher() {
@ -270,7 +267,4 @@ class bbb {
function is_server_running() {
return BigBlueButtonBN::isServerRunning($this->url);
}
}

@ -13,7 +13,7 @@ $tool_name = get_lang('Videoconference');
$tpl = new Template($tool_name);
$bbb = new bbb();
if ($bbb) {
if ($bbb->plugin_enabled) {
if ($bbb->is_server_running()) {
if (isset($_GET['launch']) && $_GET['launch'] == 1) {

Loading…
Cancel
Save