示例#1
0
<?php

require __DIR__ . '/../../vendor/autoload.php';
if (file_exists(__DIR__ . '/config.vm.php')) {
    require_once dirname(__FILE__) . '/config.php';
    require __DIR__ . '/lib/vm/AbstractVM.php';
    require __DIR__ . '/lib/vm/VMInterface.php';
    require __DIR__ . '/lib/vm/DigitalOceanVM.php';
    require __DIR__ . '/lib/VM.php';
    $config = (require __DIR__ . '/config.vm.php');
    $vm = new VM($config);
    if ($vm->IsEnabled()) {
        $bbb = new bbb();
        if ($bbb->plugin_enabled) {
            $activeSessions = $bbb->getActiveSessionsCount();
            if (empty($activeSessions)) {
                $vm->runCron();
            } else {
                echo "Can't run cron active sessions found: " . $activeSessions;
            }
        }
    }
}
示例#2
0
<?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
<?php

/**
 * This script initiates a video conference session, calling the BigBlueButton API
 * @package chamilo.plugin.bigbluebutton
 */
require __DIR__ . '/../../vendor/autoload.php';
$course_plugin = 'bbb';
//needed in order to load the plugin lang variables
require_once dirname(__FILE__) . '/config.php';
$tool_name = get_lang('Videoconference');
$tpl = new Template($tool_name);
$vmIsEnabled = false;
$host = null;
$salt = null;
$bbb = new bbb();
if ($bbb->plugin_enabled) {
    if ($bbb->isServerRunning()) {
        if (isset($_GET['launch']) && $_GET['launch'] == 1) {
            if (file_exists(__DIR__ . '/config.vm.php')) {
                $config = (require __DIR__ . '/config.vm.php');
                $vmIsEnabled = true;
                $host = null;
                $salt = null;
                require __DIR__ . '/lib/vm/AbstractVM.php';
                require __DIR__ . '/lib/vm/VMInterface.php';
                require __DIR__ . '/lib/vm/DigitalOceanVM.php';
                require __DIR__ . '/lib/VM.php';
                $vm = new VM($config);
                if ($vm->IsEnabled()) {
                    try {
示例#4
0
<?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';
$tool_name = get_lang('Videoconference');
$app['title'] = $tool_name;
$tpl = $app['template'];
$bbb = new bbb();
if ($bbb->plugin_enabled) {
    if ($bbb->is_server_running()) {
        if (isset($_GET['launch']) && $_GET['launch'] == 1) {
            $meeting_params = array();
            $meeting_params['meeting_name'] = api_get_course_id();
            if ($bbb->meeting_exists($meeting_params['meeting_name'])) {
                $url = $bbb->join_meeting($meeting_params['meeting_name']);
                if ($url) {
                    header('location: ' . $url);
                    exit;
                } else {
                    $url = $bbb->create_meeting($meeting_params);
                    header('location: ' . $url);
                    exit;
                }
示例#5
0
<?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 = $app['template'];
$bbb = new bbb();
$action = isset($_GET['action']) ? $_GET['action'] : null;
$teacher = $bbb->is_teacher();
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']);
            $title = sprintf(get_lang('VideoConferenceXCourseX'), $id, $course_info['name']);
            $content = Display::url(get_lang('GoToTheVideoConference'), $_GET['url']);
            $event_id = $agenda->add_event($_REQUEST['start'], null, 'true', null, $title, $content, array('everyone'));
            if (!empty($event_id)) {