|
@@ -32,6 +32,7 @@ class bbb
|
|
public $userSupport = false;
|
|
public $userSupport = false;
|
|
public $accessUrl = 1;
|
|
public $accessUrl = 1;
|
|
public $userId = 0;
|
|
public $userId = 0;
|
|
|
|
+ public $plugin;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Constructor (generates a connection to the API and the Chamilo settings
|
|
* Constructor (generates a connection to the API and the Chamilo settings
|
|
@@ -44,16 +45,16 @@ class bbb
|
|
public function __construct($host = '', $salt = '', $isGlobalConference = false, $isGlobalPerUser = 0)
|
|
public function __construct($host = '', $salt = '', $isGlobalConference = false, $isGlobalPerUser = 0)
|
|
{
|
|
{
|
|
// Initialize video server settings from global settings
|
|
// Initialize video server settings from global settings
|
|
- $plugin = BBBPlugin::create();
|
|
|
|
|
|
+ $this->plugin = BBBPlugin::create();
|
|
|
|
|
|
- $bbbPluginEnabled = $plugin->get('tool_enable');
|
|
|
|
|
|
+ $bbbPluginEnabled = $this->plugin->get('tool_enable');
|
|
|
|
|
|
- $bbb_host = !empty($host) ? $host : $plugin->get('host');
|
|
|
|
- $bbb_salt = !empty($salt) ? $salt : $plugin->get('salt');
|
|
|
|
|
|
+ $bbb_host = !empty($host) ? $host : $this->plugin->get('host');
|
|
|
|
+ $bbb_salt = !empty($salt) ? $salt : $this->plugin->get('salt');
|
|
|
|
|
|
$this->logoutUrl = $this->getListingUrl();
|
|
$this->logoutUrl = $this->getListingUrl();
|
|
$this->table = Database::get_main_table('plugin_bbb_meeting');
|
|
$this->table = Database::get_main_table('plugin_bbb_meeting');
|
|
- $this->enableGlobalConference = (bool) $plugin->get('enable_global_conference');
|
|
|
|
|
|
+ $this->enableGlobalConference = (bool) $this->plugin->get('enable_global_conference');
|
|
$this->isGlobalConference = (bool) $isGlobalConference;
|
|
$this->isGlobalConference = (bool) $isGlobalConference;
|
|
|
|
|
|
$columns = Database::listTableColumns($this->table);
|
|
$columns = Database::listTableColumns($this->table);
|
|
@@ -62,7 +63,7 @@ class bbb
|
|
$this->accessUrl = api_get_current_access_url_id();
|
|
$this->accessUrl = api_get_current_access_url_id();
|
|
|
|
|
|
if ($this->userSupport && !empty($isGlobalPerUser)) {
|
|
if ($this->userSupport && !empty($isGlobalPerUser)) {
|
|
- $this->enableGlobalConferencePerUser = (bool) $plugin->get('enable_global_conference_per_user');
|
|
|
|
|
|
+ $this->enableGlobalConferencePerUser = (bool) $this->plugin->get('enable_global_conference_per_user');
|
|
$this->userId = $isGlobalPerUser;
|
|
$this->userId = $isGlobalPerUser;
|
|
} else {
|
|
} else {
|
|
$this->enableGlobalConferencePerUser = false;
|
|
$this->enableGlobalConferencePerUser = false;
|
|
@@ -70,7 +71,7 @@ class bbb
|
|
|
|
|
|
if ($this->groupSupport) {
|
|
if ($this->groupSupport) {
|
|
// Plugin check
|
|
// Plugin check
|
|
- $this->groupSupport = (bool) $plugin->get('enable_conference_in_course_groups');
|
|
|
|
|
|
+ $this->groupSupport = (bool) $this->plugin->get('enable_conference_in_course_groups');
|
|
if ($this->groupSupport) {
|
|
if ($this->groupSupport) {
|
|
|
|
|
|
// Platform check
|
|
// Platform check
|
|
@@ -600,12 +601,12 @@ class bbb
|
|
$count = 1;
|
|
$count = 1;
|
|
if (isset($records['message']) && !empty($records['message'])) {
|
|
if (isset($records['message']) && !empty($records['message'])) {
|
|
if ($records['messageKey'] == 'noRecordings') {
|
|
if ($records['messageKey'] == 'noRecordings') {
|
|
- $recordArray[] = get_lang('NoRecording');
|
|
|
|
|
|
+ $recordArray[] = $this->plugin->get_lang('NoRecording');
|
|
if ($meetingDB['visibility'] == 0) {
|
|
if ($meetingDB['visibility'] == 0) {
|
|
$actionLinksArray[] = Display::url(
|
|
$actionLinksArray[] = Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'invisible.png',
|
|
'invisible.png',
|
|
- get_lang('MakeVisible'),
|
|
|
|
|
|
+ $this->plugin->get_lang('MakeVisible'),
|
|
array(),
|
|
array(),
|
|
ICON_SIZE_MEDIUM
|
|
ICON_SIZE_MEDIUM
|
|
),
|
|
),
|
|
@@ -615,7 +616,7 @@ class bbb
|
|
$actionLinksArray[] = Display::url(
|
|
$actionLinksArray[] = Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'visible.png',
|
|
'visible.png',
|
|
- get_lang('MakeInvisible'),
|
|
|
|
|
|
+ $this->plugin->get_lang('MakeInvisible'),
|
|
array(),
|
|
array(),
|
|
ICON_SIZE_MEDIUM
|
|
ICON_SIZE_MEDIUM
|
|
),
|
|
),
|
|
@@ -631,7 +632,7 @@ class bbb
|
|
// (see show_links after the end of this loop)
|
|
// (see show_links after the end of this loop)
|
|
if (is_array($record) && isset($record['recordId'])) {
|
|
if (is_array($record) && isset($record['recordId'])) {
|
|
$url = Display::url(
|
|
$url = Display::url(
|
|
- get_lang('ViewRecord')." [~".$record['playbackFormatLength']."']",
|
|
|
|
|
|
+ $this->plugin->get_lang('ViewRecord')." [~".$record['playbackFormatLength']."']",
|
|
$record['playbackFormatUrl'],
|
|
$record['playbackFormatUrl'],
|
|
array('target' => '_blank')
|
|
array('target' => '_blank')
|
|
);
|
|
);
|
|
@@ -641,14 +642,14 @@ class bbb
|
|
$actionLinks .= Display::url(
|
|
$actionLinks .= Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'link.gif',
|
|
'link.gif',
|
|
- get_lang('CopyToLinkTool')
|
|
|
|
|
|
+ $this->plugin->get_lang('CopyToLinkTool')
|
|
),
|
|
),
|
|
$this->copyToRecordToLinkTool($meetingDB)
|
|
$this->copyToRecordToLinkTool($meetingDB)
|
|
);
|
|
);
|
|
$actionLinks .= Display::url(
|
|
$actionLinks .= Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'agenda.png',
|
|
'agenda.png',
|
|
- get_lang('AddToCalendar')
|
|
|
|
|
|
+ $this->plugin->get_lang('AddToCalendar')
|
|
),
|
|
),
|
|
$this->addToCalendarUrl($meetingDB, $record)
|
|
$this->addToCalendarUrl($meetingDB, $record)
|
|
);
|
|
);
|
|
@@ -656,7 +657,7 @@ class bbb
|
|
$actionLinks .= Display::url(
|
|
$actionLinks .= Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'delete.png',
|
|
'delete.png',
|
|
- get_lang('Delete')
|
|
|
|
|
|
+ $this->plugin->get_lang('Delete')
|
|
),
|
|
),
|
|
$this->deleteRecordUrl($meetingDB)
|
|
$this->deleteRecordUrl($meetingDB)
|
|
);
|
|
);
|
|
@@ -665,7 +666,7 @@ class bbb
|
|
$actionLinks .= Display::url(
|
|
$actionLinks .= Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'invisible.png',
|
|
'invisible.png',
|
|
- get_lang('MakeVisible'),
|
|
|
|
|
|
+ $this->plugin->get_lang('MakeVisible'),
|
|
array(),
|
|
array(),
|
|
ICON_SIZE_MEDIUM
|
|
ICON_SIZE_MEDIUM
|
|
),
|
|
),
|
|
@@ -675,7 +676,7 @@ class bbb
|
|
$actionLinks .= Display::url(
|
|
$actionLinks .= Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'visible.png',
|
|
'visible.png',
|
|
- get_lang('MakeInvisible'),
|
|
|
|
|
|
+ $this->plugin->get_lang('MakeInvisible'),
|
|
array(),
|
|
array(),
|
|
ICON_SIZE_MEDIUM
|
|
ICON_SIZE_MEDIUM
|
|
),
|
|
),
|
|
@@ -716,7 +717,7 @@ class bbb
|
|
$actionLinks .= Display::url(
|
|
$actionLinks .= Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'invisible.png',
|
|
'invisible.png',
|
|
- get_lang('MakeVisible'),
|
|
|
|
|
|
+ $this->plugin->get_lang('MakeVisible'),
|
|
array(),
|
|
array(),
|
|
ICON_SIZE_MEDIUM
|
|
ICON_SIZE_MEDIUM
|
|
),
|
|
),
|
|
@@ -726,7 +727,7 @@ class bbb
|
|
$actionLinks .= Display::url(
|
|
$actionLinks .= Display::url(
|
|
Display::return_icon(
|
|
Display::return_icon(
|
|
'visible.png',
|
|
'visible.png',
|
|
- get_lang('MakeInvisible'),
|
|
|
|
|
|
+ $this->plugin->get_lang('MakeInvisible'),
|
|
array(),
|
|
array(),
|
|
ICON_SIZE_MEDIUM
|
|
ICON_SIZE_MEDIUM
|
|
),
|
|
),
|
|
@@ -1013,7 +1014,7 @@ class bbb
|
|
if (!empty($records)) {
|
|
if (!empty($records)) {
|
|
if (isset($records['message']) && !empty($records['message'])) {
|
|
if (isset($records['message']) && !empty($records['message'])) {
|
|
if ($records['messageKey'] == 'noRecordings') {
|
|
if ($records['messageKey'] == 'noRecordings') {
|
|
- $recordArray[] = get_lang('NoRecording');
|
|
|
|
|
|
+ $recordArray[] = $this->plugin->get_lang('NoRecording');
|
|
} else {
|
|
} else {
|
|
//$recordArray[] = $records['message'];
|
|
//$recordArray[] = $records['message'];
|
|
}
|
|
}
|
|
@@ -1069,7 +1070,7 @@ class bbb
|
|
{
|
|
{
|
|
if (file_exists(__DIR__ . '/../config.vm.php')) {
|
|
if (file_exists(__DIR__ . '/../config.vm.php')) {
|
|
// Using VM
|
|
// Using VM
|
|
- echo Display::url(get_lang('ClickToContinue'), $url);
|
|
|
|
|
|
+ echo Display::url($this->plugin->get_lang('ClickToContinue'), $url);
|
|
exit;
|
|
exit;
|
|
} else {
|
|
} else {
|
|
// Classic
|
|
// Classic
|