Format code, check course info #3235

pull/3254/head
Julio Montoya 6 years ago
parent e288d0803a
commit f7d83cadc6
  1. 9
      plugin/bbb/cron_close_meeting.php
  2. 24
      plugin/bbb/listing.php

@ -1,9 +1,8 @@
<?php
/**
* This script initiates a video conference session, calling the BigBlueButton API.
* @package chamilo.plugin.bigbluebutton
*/
$course_plugin = 'bbb'; //needed in order to load the plugin lang variables
require_once __DIR__.'/config.php';
@ -18,9 +17,11 @@ if ($bbb->pluginEnabled) {
if (!empty($activeSessions)) {
foreach ($activeSessions as $value) {
$meetingId = $value['id'];
$courseCode = null;
$courseInfo = api_get_course_info_by_id($value['c_id']);
$courseCode = $courseInfo['code'];
if (!empty($courseInfo)) {
$courseCode = $courseInfo['code'];
}
$meetingBBB = $bbb->getMeetingInfo(
[

@ -162,8 +162,6 @@ if ($conferenceManager) {
// If creator -> update
if ($meetingData['creator_id'] == api_get_user_id()) {
$courseInfo = api_get_course_info();
$courseCode = $courseInfo['code'];
$pass = $bbb->getModMeetingPassword($courseCode);
$meetingBBB = $bbb->getMeetingInfo(
@ -219,13 +217,15 @@ if ($conferenceManager) {
$conditions
);
foreach ($roomList as $roomDB) {
$roomId = $roomDB['id'];
Database::update(
$roomTable,
['out_at' => api_get_utc_datetime()],
['id = ? ' => $roomId]
);
if (!empty($roomList)) {
foreach ($roomList as $roomDB) {
$roomId = $roomDB['id'];
Database::update(
$roomTable,
['out_at' => api_get_utc_datetime()],
['id = ? ' => $roomId]
);
}
}
}
@ -359,7 +359,11 @@ if ($bbb->isGlobalConference() === false &&
if ($conferenceManager) {
$groups = GroupManager::get_groups();
} else {
$groups = GroupManager::getAllGroupPerUserSubscription(api_get_user_id(), api_get_course_int_id(), api_get_session_id());
$groups = GroupManager::getAllGroupPerUserSubscription(
api_get_user_id(),
api_get_course_int_id(),
api_get_session_id()
);
}
if ($groups) {

Loading…
Cancel
Save