Minor - Plugins: Zoom - Fix links

BT#17288
pull/3433/head
Julio Montoya 5 years ago
parent 8c4a907a6b
commit 9feff2d04b
  1. 87
      plugin/zoom/lib/ZoomPlugin.php
  2. 6
      plugin/zoom/meeting.php
  3. 1
      plugin/zoom/meetings.php
  4. 61
      plugin/zoom/view/meeting.tpl

@ -139,15 +139,18 @@ class ZoomPlugin extends Plugin
public function getProfileBlockItems()
{
$elements = $this->meetingsToWhichCurrentUserIsRegisteredComingSoon();
/*if (self::currentUserCanJoinGlobalMeeting()) {
$elements[$this->get_lang('CreateGlobalVideoConference')] = api_get_path(WEB_PLUGIN_PATH).'zoom/global.php';
$addMeetingLink = false;
if (self::currentUserCanJoinGlobalMeeting()) {
$addMeetingLink = true;
}
if (self::currentUserCanCreateUserMeeting()) {
$elements[$this->get_lang('CreateUserVideoConference')] = api_get_path(WEB_PLUGIN_PATH).'zoom/user.php';
}*/
$addMeetingLink = true;
}
$elements[$this->get_lang('Meetings')] = api_get_path(WEB_PLUGIN_PATH).'zoom/meetings.php';
if ($addMeetingLink) {
$elements[$this->get_lang('Meetings')] = api_get_path(WEB_PLUGIN_PATH).'zoom/meetings.php';
}
$items = [];
foreach ($elements as $title => $link) {
@ -892,7 +895,7 @@ class ZoomPlugin extends Plugin
$durationNumeric = $form->addNumeric('duration', $this->get_lang('DurationInMinutes'));
$form->setRequired($durationNumeric);
/*if (null === $course) {
if (null === $course) {
$options = [];
if ('true' === $this->get('enableGlobalConference')) {
$options['everyone'] = $this->get_lang('ForEveryone');
@ -914,41 +917,42 @@ class ZoomPlugin extends Plugin
$form->addHidden('type', 'course');
}
// $passwordText = $form->addText('password', get_lang('Password'), false, ['maxlength' => '10']);
if (null !== $course) {
$registrationOptions = [
'RegisterAllCourseUsers' => $this->get_lang('RegisterAllCourseUsers'),
];
$groups = GroupManager::get_groups();
if (!empty($groups)) {
$registrationOptions['RegisterTheseGroupMembers'] = get_lang('RegisterTheseGroupMembers');
}
$registrationOptions['RegisterNoUser'] = $this->get_lang('RegisterNoUser');
$userRegistrationRadio = $form->addRadio(
'userRegistration',
$this->get_lang('UserRegistration'),
$registrationOptions
);
$groupOptions = [];
foreach ($groups as $group) {
$groupOptions[$group['id']] = $group['name'];
}
$groupIdsSelect = $form->addSelect(
'groupIds',
$this->get_lang('RegisterTheseGroupMembers'),
$groupOptions
);
$groupIdsSelect->setMultiple(true);
if (!empty($groups)) {
$jsCode = sprintf(
"getElementById('%s').parentNode.parentNode.parentNode.style.display = getElementById('%s').checked ? 'block' : 'none'",
$groupIdsSelect->getAttribute('id'),
$userRegistrationRadio->getelements()[1]->getAttribute('id')
);
$form->setAttribute('onchange', $jsCode);
}
}*/
/*
// $passwordText = $form->addText('password', get_lang('Password'), false, ['maxlength' => '10']);
if (null !== $course) {
$registrationOptions = [
'RegisterAllCourseUsers' => $this->get_lang('RegisterAllCourseUsers'),
];
$groups = GroupManager::get_groups();
if (!empty($groups)) {
$registrationOptions['RegisterTheseGroupMembers'] = get_lang('RegisterTheseGroupMembers');
}
$registrationOptions['RegisterNoUser'] = $this->get_lang('RegisterNoUser');
$userRegistrationRadio = $form->addRadio(
'userRegistration',
$this->get_lang('UserRegistration'),
$registrationOptions
);
$groupOptions = [];
foreach ($groups as $group) {
$groupOptions[$group['id']] = $group['name'];
}
$groupIdsSelect = $form->addSelect(
'groupIds',
$this->get_lang('RegisterTheseGroupMembers'),
$groupOptions
);
$groupIdsSelect->setMultiple(true);
if (!empty($groups)) {
$jsCode = sprintf(
"getElementById('%s').parentNode.parentNode.parentNode.style.display = getElementById('%s').checked ? 'block' : 'none'",
$groupIdsSelect->getAttribute('id'),
$userRegistrationRadio->getelements()[1]->getAttribute('id')
);
$form->setAttribute('onchange', $jsCode);
}
}*/
$form->addButtonCreate(get_lang('Save'));
@ -1329,7 +1333,6 @@ class ZoomPlugin extends Plugin
$actionsLeft = '';
$back = '';
$courseId = api_get_course_id();
if (empty($courseId)) {
$actionsLeft .=
Display::url(

@ -21,11 +21,12 @@ if (null === $meeting) {
$course_plugin = 'zoom'; // needed in order to load the plugin lang variables
$returnURL = 'meetings.php';
$urlExtra = '';
if ($meeting->isCourseMeeting()) {
api_protect_course_script(true);
$this_section = SECTION_COURSES;
$returnURL = 'start.php?cId='.api_get_course_id().'&sessionId='.api_get_session_id();
$returnURL = 'start.php?'.api_get_cidreq();
$urlExtra = api_get_cidreq();
}
$logInfo = [
@ -75,5 +76,6 @@ if ($plugin->userIsConferenceManager($meeting)) {
$tpl->assign('actions', $plugin->getToolbar());
$tpl->assign('meeting', $meeting);
$tpl->assign('url_extra', $urlExtra);
$tpl->assign('content', $tpl->fetch('zoom/view/meeting.tpl'));
$tpl->display_one_col_template();

@ -4,6 +4,7 @@
$course_plugin = 'zoom'; // needed in order to load the plugin lang variables
$cidReset = true;
require_once __DIR__.'/config.php';
if (!ZoomPlugin::currentUserCanCreateUserMeeting()) {

@ -5,7 +5,7 @@
<div class="btn-group" role="group">
{% if meeting.meetingInfoGet.status != 'finished' %}
<a class="btn btn-primary" href="join_meeting.php?meetingId={{ meeting.meetingId }}">
<a class="btn btn-primary" href="join_meeting.php?meetingId={{ meeting.meetingId }}&{{ url_extra }}">
{{ 'ViewMeeting'|get_plugin_lang('ZoomPlugin') }}
</a>
{% endif %}
@ -17,12 +17,36 @@
</a>
{% endif %}
<a class="btn btn-default" href="activity.php?meetingId={{ meeting.meetingId }}">
<a class="btn btn-default" href="activity.php?meetingId={{ meeting.meetingId }}&{{ url_extra }}">
{{ 'Activity'|get_plugin_lang('ZoomPlugin') }}
</a>
{% endif %}
</div>
{% if isConferenceManager %}
<br />
<br />
<div class="panel panel-default conference">
<div class="panel-body">
<div class="share">
{{ 'JoinURLToSendToParticipants'| get_plugin_lang('ZoomPlugin') }}
</div>
<div class="form-inline">
<div class="form-group">
<input id="share_button_flash" type="text"
style="width:460px"
class="form-control" readonly
value="{{ _p.web_main }}plugin/zoom/join_meeting.php?meetingId={{ meeting.meetingId }}&{{ url_extra }}"
>
<button onclick="copyTextToClipBoard('share_button_flash');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
</div>
{% endif %}
{% if currentUserJoinURL %}
{#<p>#}
{# <a href="{{ currentUserJoinURL }}" target="_blank">#}
@ -31,19 +55,6 @@
{#</p>#}
{% endif %}
{% if meeting.meetingInfoGet.settings.approval_type == 2 %}
<label>
{{ 'JoinURLToSendToParticipants'|get_plugin_lang('ZoomPlugin') }}
</label>
<div class="form-inline">
<div class="form-group">
<input
class="form-control" type="text" style="width:300px" readonly
value="{{ meeting.meetingInfoGet.join_url }}" />
</div>
</div>
{% endif %}
{% if isConferenceManager %}
{{ editMeetingForm }}
{{ deleteMeetingForm }}
@ -73,15 +84,15 @@
{{ registrant.fullName }}
</td>
<td>
{% if registrant.joinUrl %}
<a class="btn btn-primary" onclick="copyJoinURL(event, '{{ registrant.joinUrl }}')">
{{ 'CopyJoinAsURL'|get_plugin_lang('ZoomPlugin') }}
</a>
{% else %}
<a class="btn btn-primary disabled" >
{{ 'JoinURLNotAvailable'|get_plugin_lang('ZoomPlugin') }}
</a>
{% endif %}
{# {% if registrant.joinUrl %}#}
{# <a class="btn btn-primary" onclick="copyJoinURL(event, '{{ registrant.joinUrl }}')">#}
{# {{ 'CopyJoinAsURL'|get_plugin_lang('ZoomPlugin') }}#}
{# </a>#}
{# {% else %}#}
{# <a class="btn btn-primary disabled" >#}
{# {{ 'JoinURLNotAvailable'|get_plugin_lang('ZoomPlugin') }}#}
{# </a>#}
{# {% endif %}#}
</td>
</tr>
{% endfor %}

Loading…
Cancel
Save