bbb plugin add option to close all meetings on cron cron_close_meeting.php process

pull/3976/head
juan-cortizas-ponte 4 years ago
parent e07f106124
commit ea84ece2d1
  1. 3
      main/install/configuration.dist.php
  2. 4
      plugin/bbb/cron_close_meeting.php
  3. 14
      plugin/bbb/lib/bbb.lib.php

@ -1992,6 +1992,9 @@ VALUES (21, 13, 'send_notification_at_a_specific_date', 'Send notification at a
// Ckeditor settings.
//$_configuration['editor_settings'] = ['config' => ['youtube_responsive' => true]];
// Configuration setting to force a cron process on all campus on a multisite enviroment
//$_configuration['multiple_urls_cron_apply_to_all'] = false;
// KEEP THIS AT THE END
// -------- Custom DB changes
// Add user activation by confirmation email

@ -10,9 +10,11 @@ $plugin = BBBPlugin::create();
$meetingTable = Database::get_main_table('plugin_bbb_meeting');
$roomTable = Database::get_main_table('plugin_bbb_room');
$applyAllUrls = api_get_configuration_value('multiple_urls_cron_apply_to_all');
$bbb = new bbb();
if ($bbb->pluginEnabled) {
$activeSessions = $bbb->getActiveSessions();
$activeSessions = $bbb->getActiveSessions($applyAllUrls);
if (!empty($activeSessions)) {
foreach ($activeSessions as $value) {

@ -1844,13 +1844,23 @@ class bbb
/**
* Get active session in the all platform
*
* @param boolean $allSites Parameter to indicate whether to get the result from all sites
*
* @return array
*/
public function getActiveSessions()
public function getActiveSessions($allSites = false)
{
$where = ['where' => ['status = ?' => 1]];
if (!$allSites) {
$where['where'][' AND access_url = ?'] = $this->accessUrl;
}
$meetingList = Database::select(
'*',
$this->table,
array('where' => array('status = ? AND access_url = ?' => array(1, $this->accessUrl)))
$where
);
return $meetingList;

Loading…
Cancel
Save