コード例 #1
0
ファイル: bbb.lib.php プロジェクト: omaoibrahim/chamilo-lms
 /**
  *
  * Constructor (generates a connection to the API and the Chamilo settings
  * required for the connection to the video conference server)
  * @param string $host
  * @param string $salt
  */
 public function __construct($host = null, $salt = null)
 {
     // Initialize video server settings from global settings
     $plugin = BBBPlugin::create();
     $bbb_plugin = $plugin->get('tool_enable');
     if (empty($host)) {
         $bbb_host = $plugin->get('host');
     } else {
         $bbb_host = $host;
     }
     if (empty($salt)) {
         $bbb_salt = $plugin->get('salt');
     } else {
         $bbb_salt = $salt;
     }
     $this->logout_url = api_get_path(WEB_PLUGIN_PATH) . 'bbb/listing.php?' . api_get_cidreq();
     $this->table = Database::get_main_table('plugin_bbb_meeting');
     if ($bbb_plugin == true) {
         $userInfo = api_get_user_info();
         $this->user_complete_name = $userInfo['complete_name'];
         $this->salt = $bbb_salt;
         $info = parse_url($bbb_host);
         $this->url = $bbb_host . '/bigbluebutton/';
         if (isset($info['scheme'])) {
             $this->protocol = $info['scheme'] . '://';
             $this->url = str_replace($this->protocol, '', $this->url);
         }
         // Setting BBB api
         define('CONFIG_SECURITY_SALT', $this->salt);
         define('CONFIG_SERVER_BASE_URL', $this->url);
         $this->api = new BigBlueButtonBN();
         $this->plugin_enabled = true;
     }
 }
コード例 #2
0
ファイル: listing.php プロジェクト: annickvdp/Chamilo1.9.10
<?php
/**
 * This script initiates a videoconference session, calling the BigBlueButton API
 * @package chamilo.plugin.bigbluebutton
 */
/**
 * Initialization
 */

$course_plugin = 'bbb'; //needed in order to load the plugin lang variables
require_once dirname(__FILE__).'/config.php';
$plugin = BBBPlugin::create();
$tool_name = $plugin->get_lang('Videoconference');
$tpl = new Template($tool_name);

$bbb = new bbb();
$action = isset($_GET['action']) ? $_GET['action'] : null;

$teacher = $bbb->isTeacher();

api_protect_course_script(true);
$message = null;

if ($teacher) {
    switch ($action) {
        case 'add_to_calendar':
            $course_info = api_get_course_info();
            $agenda = new Agenda();
            $agenda->type = 'course';

            $id = intval($_GET['id']);
コード例 #3
0
ファイル: plugin.php プロジェクト: omaoibrahim/chamilo-lms
<?php

require_once dirname(__FILE__) . '/config.php';
$plugin_info = BBBPlugin::create()->get_info();
コード例 #4
0
ファイル: install.php プロジェクト: omaoibrahim/chamilo-lms
<?php

/**
 * This script is included by main/admin/settings.lib.php and generally
 * includes things to execute in the main database (settings_current table)
 * @package chamilo.plugin.bigbluebutton
 */
/**
 * Initialization
 */
require_once dirname(__FILE__) . '/config.php';
BBBPlugin::create()->install();