Fix fatal error when anon enters videoconference BT#13803

- Format code
- Remove class already loaded using composer
pull/2487/head
jmontoyaa 7 years ago
parent c4a918c793
commit cbcecfedb7
  1. 4
      plugin/bbb/config.php
  2. 2
      plugin/bbb/install.php
  3. 4
      plugin/bbb/listing.php
  4. 1
      plugin/bbb/plugin.php
  5. 21
      plugin/bbb/start.php
  6. 4
      plugin/bbb/uninstall.php

@ -4,7 +4,3 @@
/* bbb parameters that will be registered in the course settings */
require_once __DIR__.'/../../main/inc/global.inc.php';
require_once 'lib/bbb.lib.php';
require_once 'lib/bbb_api.php';
require_once 'lib/bbb_plugin.class.php';

@ -6,4 +6,4 @@
*/
require_once __DIR__.'/config.php';
BBBPlugin::create()->install();
BBBPlugin::create()->install();

@ -1,4 +1,6 @@
<?php
/* For license terms, see /license.txt */
/**
* This script initiates a video conference session, calling the BigBlueButton API
* @package chamilo.plugin.bigbluebutton
@ -19,9 +21,9 @@ $tpl = new Template($tool_name);
$isGlobal = isset($_GET['global']) ? true : false;
$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false;
$action = isset($_GET['action']) ? $_GET['action'] : null;
$bbb = new bbb('', '', $isGlobal, $isGlobalPerUser);
$action = isset($_GET['action']) ? $_GET['action'] : null;
$conferenceManager = $bbb->isConferenceManager();
if ($bbb->isGlobalConference()) {

@ -1,4 +1,5 @@
<?php
/* For license terms, see /license.txt */
require_once __DIR__.'/config.php';

@ -1,10 +1,12 @@
<?php
/* For license terms, see /license.txt */
/**
* This script initiates a video conference session, calling the BigBlueButton API
* @package chamilo.plugin.bigbluebutton
*/
require __DIR__.'/../../vendor/autoload.php';
require_once __DIR__.'/../../vendor/autoload.php';
$course_plugin = 'bbb'; //needed in order to load the plugin lang variables
require_once __DIR__.'/config.php';
@ -19,6 +21,13 @@ $isGlobal = isset($_GET['global']) ? true : false;
$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false;
$bbb = new bbb('', '', $isGlobal, $isGlobalPerUser);
$conferenceManager = $bbb->isConferenceManager();
if ($bbb->isGlobalConference()) {
api_block_anonymous_users();
} else {
api_protect_course_script(true);
}
if ($bbb->pluginEnabled) {
if ($bbb->isServerRunning()) {
if (isset($_GET['launch']) && $_GET['launch'] == 1) {
@ -55,9 +64,15 @@ if ($bbb->pluginEnabled) {
}
$meetingInfo = $bbb->findMeetingByName($meetingParams['meeting_name']);
if (!empty($meetingInfo)) {
$bbb->saveParticipant($meetingInfo['id'], api_get_user_id());
$bbb->redirectToBBB($url);
} else {
$url = $bbb->getListingUrl();
header('Location: '.$url);
exit;
}
$bbb->saveParticipant($meetingInfo['id'], api_get_user_id());
$bbb->redirectToBBB($url);
} else {
$url = $bbb->getListingUrl();
header('Location: '.$url);

@ -1,4 +1,6 @@
<?php
/* For license terms, see /license.txt */
/**
* This script is included by main/admin/settings.lib.php when unselecting a plugin
* and is meant to remove things installed by the install.php script in both
@ -7,4 +9,4 @@
*/
require_once __DIR__.'/config.php';
BBBPlugin::create()->uninstall();
BBBPlugin::create()->uninstall();

Loading…
Cancel
Save