Fix translation on BBB plugin - refs #8365

pull/2487/head
Angel Fernando Quiroz Campos 10 years ago
parent 6b29f9c9ff
commit 05994edbfb
  1. 41
      plugin/bbb/lib/bbb.lib.php
  2. 10
      plugin/bbb/listing.php

@ -32,6 +32,7 @@ class bbb
public $userSupport = false;
public $accessUrl = 1;
public $userId = 0;
public $plugin;
/**
* 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)
{
// 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->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;
$columns = Database::listTableColumns($this->table);
@ -62,7 +63,7 @@ class bbb
$this->accessUrl = api_get_current_access_url_id();
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;
} else {
$this->enableGlobalConferencePerUser = false;
@ -70,7 +71,7 @@ class bbb
if ($this->groupSupport) {
// 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) {
// Platform check
@ -600,12 +601,12 @@ class bbb
$count = 1;
if (isset($records['message']) && !empty($records['message'])) {
if ($records['messageKey'] == 'noRecordings') {
$recordArray[] = get_lang('NoRecording');
$recordArray[] = $this->plugin->get_lang('NoRecording');
if ($meetingDB['visibility'] == 0) {
$actionLinksArray[] = Display::url(
Display::return_icon(
'invisible.png',
get_lang('MakeVisible'),
$this->plugin->get_lang('MakeVisible'),
array(),
ICON_SIZE_MEDIUM
),
@ -615,7 +616,7 @@ class bbb
$actionLinksArray[] = Display::url(
Display::return_icon(
'visible.png',
get_lang('MakeInvisible'),
$this->plugin->get_lang('MakeInvisible'),
array(),
ICON_SIZE_MEDIUM
),
@ -631,7 +632,7 @@ class bbb
// (see show_links after the end of this loop)
if (is_array($record) && isset($record['recordId'])) {
$url = Display::url(
get_lang('ViewRecord')." [~".$record['playbackFormatLength']."']",
$this->plugin->get_lang('ViewRecord')." [~".$record['playbackFormatLength']."']",
$record['playbackFormatUrl'],
array('target' => '_blank')
);
@ -641,14 +642,14 @@ class bbb
$actionLinks .= Display::url(
Display::return_icon(
'link.gif',
get_lang('CopyToLinkTool')
$this->plugin->get_lang('CopyToLinkTool')
),
$this->copyToRecordToLinkTool($meetingDB)
);
$actionLinks .= Display::url(
Display::return_icon(
'agenda.png',
get_lang('AddToCalendar')
$this->plugin->get_lang('AddToCalendar')
),
$this->addToCalendarUrl($meetingDB, $record)
);
@ -656,7 +657,7 @@ class bbb
$actionLinks .= Display::url(
Display::return_icon(
'delete.png',
get_lang('Delete')
$this->plugin->get_lang('Delete')
),
$this->deleteRecordUrl($meetingDB)
);
@ -665,7 +666,7 @@ class bbb
$actionLinks .= Display::url(
Display::return_icon(
'invisible.png',
get_lang('MakeVisible'),
$this->plugin->get_lang('MakeVisible'),
array(),
ICON_SIZE_MEDIUM
),
@ -675,7 +676,7 @@ class bbb
$actionLinks .= Display::url(
Display::return_icon(
'visible.png',
get_lang('MakeInvisible'),
$this->plugin->get_lang('MakeInvisible'),
array(),
ICON_SIZE_MEDIUM
),
@ -716,7 +717,7 @@ class bbb
$actionLinks .= Display::url(
Display::return_icon(
'invisible.png',
get_lang('MakeVisible'),
$this->plugin->get_lang('MakeVisible'),
array(),
ICON_SIZE_MEDIUM
),
@ -726,7 +727,7 @@ class bbb
$actionLinks .= Display::url(
Display::return_icon(
'visible.png',
get_lang('MakeInvisible'),
$this->plugin->get_lang('MakeInvisible'),
array(),
ICON_SIZE_MEDIUM
),
@ -1013,7 +1014,7 @@ class bbb
if (!empty($records)) {
if (isset($records['message']) && !empty($records['message'])) {
if ($records['messageKey'] == 'noRecordings') {
$recordArray[] = get_lang('NoRecording');
$recordArray[] = $this->plugin->get_lang('NoRecording');
} else {
//$recordArray[] = $records['message'];
}
@ -1069,7 +1070,7 @@ class bbb
{
if (file_exists(__DIR__ . '/../config.vm.php')) {
// Using VM
echo Display::url(get_lang('ClickToContinue'), $url);
echo Display::url($this->plugin->get_lang('ClickToContinue'), $url);
exit;
} else {
// Classic

@ -37,8 +37,8 @@ if ($conferenceManager) {
$agenda->type = 'course';
$id = intval($_GET['id']);
$title = sprintf(get_lang('VideoConferenceXCourseX'), $id, $courseInfo['name']);
$content = Display::url(get_lang('GoToTheVideoConference'), $_GET['url']);
$title = sprintf($plugin->get_lang('VideoConferenceXCourseX'), $id, $courseInfo['name']);
$content = Display::url($plugin->get_lang('GoToTheVideoConference'), $_GET['url']);
$eventId = $agenda->addEvent(
$_REQUEST['start'],
@ -49,7 +49,7 @@ if ($conferenceManager) {
array('everyone')
);
if (!empty($eventId)) {
$message = Display::return_message(get_lang('VideoConferenceAddedToTheCalendar'), 'success');
$message = Display::return_message($plugin->get_lang('VideoConferenceAddedToTheCalendar'), 'success');
} else {
$message = Display::return_message(get_lang('Error'), 'error');
}
@ -57,7 +57,7 @@ if ($conferenceManager) {
case 'copy_record_to_link_tool':
$result = $bbb->copyRecordToLinkTool($_GET['id']);
if ($result) {
$message = Display::return_message(get_lang('VideoConferenceAddedToTheLinkTool'), 'success');
$message = Display::return_message($plugin->get_lang('VideoConferenceAddedToTheLinkTool'), 'success');
} else {
$message = Display::return_message(get_lang('Error'), 'error');
}
@ -73,7 +73,7 @@ if ($conferenceManager) {
case 'end':
$bbb->endMeeting($_GET['id']);
$message = Display::return_message(
get_lang('MeetingClosed') . '<br />' . get_lang(
$plugin->get_lang('MeetingClosed') . '<br />' . $plugin->get_lang(
'MeetingClosedComment'
),
'success',

Loading…
Cancel
Save