BBB plugin: Add share blocks for html or flash see BT#14664

pull/2606/head
Julio Montoya 8 years ago
parent 90d7800377
commit 4918896b0c
  1. 10
      plugin/bbb/lib/bbb_plugin.class.php
  2. 18
      plugin/bbb/listing.php
  3. 70
      plugin/bbb/listing.tpl

@ -253,16 +253,18 @@ class BBBPlugin extends Plugin
}
/**
* Return an array with URL
*
* @param string $conferenceUrl
*
* @return string
* @return array
*/
public function getUrlInterfaceLinks($conferenceUrl)
{
$url = $this->getFlashUrl($conferenceUrl);
$url .= ' '.$this->getHtmlUrl($conferenceUrl);
$urlList[] = $this->getFlashUrl($conferenceUrl);
$urlList[] = $this->getHtmlUrl($conferenceUrl);
return $url;
return $urlList;
}
/**

@ -193,7 +193,7 @@ $tpl->assign('message', $message);
$tpl->assign('form', $formToString);
// Default URL
$url = Display::url(
$urlList[] = Display::url(
$plugin->get_lang('EnterConference'),
$conferenceUrl,
['target' => '_blank', 'class' => 'btn btn-primary btn-large']
@ -201,10 +201,12 @@ $url = Display::url(
$type = $plugin->get('launch_type');
$warningIntefaceMessage = '';
$showClientOptions = false;
switch ($type) {
case BBBPlugin::LAUNCH_TYPE_DEFAULT:
$url = Display::url(
$urlList = [];
$urlList[] = Display::url(
$plugin->get_lang('EnterConference'),
$conferenceUrl.'&interface='.$plugin->get('interface'),
['target' => '_blank', 'class' => 'btn btn-primary btn-large']
@ -212,8 +214,9 @@ switch ($type) {
break;
case BBBPlugin::LAUNCH_TYPE_SET_BY_TEACHER:
if ($conferenceManager) {
$url = $plugin->getUrlInterfaceLinks($conferenceUrl);
$urlList = $plugin->getUrlInterfaceLinks($conferenceUrl);
$warningIntefaceMessage = Display::return_message($plugin->get_lang('ParticipantsWillUseSameInterface'));
$showClientOptions = true;
} else {
$meetingInfo = $bbb->getMeetingByName($videoConferenceName);
switch ($meetingInfo['interface']) {
@ -228,12 +231,14 @@ switch ($type) {
break;
case BBBPlugin::LAUNCH_TYPE_SET_BY_STUDENT:
if ($conferenceManager) {
$url = $plugin->getUrlInterfaceLinks($conferenceUrl);
$urlList = $plugin->getUrlInterfaceLinks($conferenceUrl);
$showClientOptions = true;
} else {
if ($meetingExists) {
$meetingInfo = $bbb->getMeetingByName($videoConferenceName);
$meetinUserInfo = $bbb->getMeetingParticipantInfo($meetingInfo['id'], api_get_user_id());
$url = $plugin->getUrlInterfaceLinks($conferenceUrl);
$urlList = $plugin->getUrlInterfaceLinks($conferenceUrl);
$showClientOptions = true;
/*if (empty($meetinUserInfo)) {
$url = $plugin->getUrlInterfaceLinks($conferenceUrl);
@ -253,8 +258,9 @@ switch ($type) {
break;
}
$tpl->assign('enter_conference_links', $url);
$tpl->assign('enter_conference_links', $urlList);
$tpl->assign('warning_inteface_msg', $warningIntefaceMessage);
$tpl->assign('show_client_options', $showClientOptions);
$listing_tpl = 'bbb/listing.tpl';
$content = $tpl->fetch($listing_tpl);

@ -3,8 +3,64 @@
<div class ="col-md-12" style="text-align:center">
{{ form }}
{% if show_join_button == true %}
{% if show_client_options %}
<div class="row">
<div class="col-md-6">
<div class="well">
{{ enter_conference_links.0 }}
<br />
<strong>{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}</strong>
<div class="form-inline">
<div class="form-group">
<input id="share_button_flash" type="text"
style="width:300px"
class="form-control" readonly value="{{ conference_url }}&inteface=0">
<button onclick="copyTextToClipBoard('share_button_flash');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="well">
{{ enter_conference_links.1 }}
<br />
<strong>{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}</strong>
<div class="form-inline">
<div class="form-group">
<input id="share_button_html" type="text"
style="width:300px"
class="form-control" readonly value="{{ conference_url }}&inteface=1">
<button onclick="copyTextToClipBoard('share_button_html');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
</div>
</div>
{% else %}
{{ enter_conference_links.0 }}
<br />
<strong>{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}</strong>
<div class="well">
<div class="form-inline">
<div class="form-group">
<input id="share_button"
type="text"
style="width:600px"
class="form-control" readonly value="{{ conference_url }}">
<button onclick="copyTextToClipBoard('share_button');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
{% endif %}
<p>
{{ enter_conference_links }}
<span id="users_online" class="label label-warning">
{{ 'XUsersOnLine'| get_plugin_lang('BBBPlugin') | format(users_online) }}
</span>
@ -17,17 +73,7 @@
<p>{{ 'MaxXUsersWarning' | get_plugin_lang('BBBPlugin') | format(max_users_limit) }}</p>
{% endif %}
{% endif %}
<div class="well">
<strong>{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}</strong>
<div class="form-inline">
<div class="form-group">
<input id="share_button" type="text" style="width:600px" class="form-control" readonly value="{{ conference_url }}">
<button onclick="copyTextToClipBoard('share_button');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
</div>
{% elseif max_users_limit > 0 %}
{% if conference_manager == true %}
<p>{{ 'MaxXUsersReachedManager' | get_plugin_lang('BBBPlugin') | format(max_users_limit) }}</p>

Loading…
Cancel
Save