From abc07c2664e9953e1fa5cc88abbeb865b5950b3d Mon Sep 17 00:00:00 2001 From: Julio Date: Fri, 2 Nov 2018 11:57:24 +0100 Subject: [PATCH] BBB plugin: Add "disable_download_conference_link" see BT#14976 --- plugin/bbb/lang/english.php | 2 ++ plugin/bbb/lib/bbb.lib.php | 36 ++++++++++++++++------------- plugin/bbb/lib/bbb_plugin.class.php | 3 +++ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/plugin/bbb/lang/english.php b/plugin/bbb/lang/english.php index 4bd2924650..a2be29e9a7 100755 --- a/plugin/bbb/lang/english.php +++ b/plugin/bbb/lang/english.php @@ -45,6 +45,8 @@ $strings['enable_global_conference_per_user'] = 'Enable global conference per us $strings['enable_conference_in_course_groups'] = 'Enable conference in course groups'; $strings['enable_global_conference_link'] = 'Enable the link to the global conference in the homepage'; +$strings['disable_download_conference_link'] = 'Disable download conference'; + $strings['big_blue_button_record_and_store'] = 'Record and store sessions'; $strings['bbb_enable_conference_in_groups'] = 'Allow conference in groups'; $strings['plugin_tool_bbb'] = 'Video'; diff --git a/plugin/bbb/lib/bbb.lib.php b/plugin/bbb/lib/bbb.lib.php index b40e1f016d..f4b5d58cd7 100755 --- a/plugin/bbb/lib/bbb.lib.php +++ b/plugin/bbb/lib/bbb.lib.php @@ -1544,22 +1544,26 @@ class bbb ); } - if ($meetingInfo['has_video_m4v']) { - $links[] = Display::url( - Display::return_icon('save.png', get_lang('DownloadFile')), - $recordInfo['playbackFormatUrl'].'/capture.m4v', - ['target' => '_blank'] - ); - } else { - $links[] = Display::url( - Display::return_icon('save.png', get_lang('DownloadFile')), - '#', - [ - 'id' => "btn-check-meeting-video-{$meetingInfo['id']}", - 'class' => 'check-meeting-video', - 'data-id' => $meetingInfo['id'] - ] - ); + $hide = $this->plugin->get('disable_download_conference_link') === 'true' ? true : false; + + if ($hide == false) { + if ($meetingInfo['has_video_m4v']) { + $links[] = Display::url( + Display::return_icon('save.png', get_lang('DownloadFile')), + $recordInfo['playbackFormatUrl'].'/capture.m4v', + ['target' => '_blank'] + ); + } else { + $links[] = Display::url( + Display::return_icon('save.png', get_lang('DownloadFile')), + '#', + [ + 'id' => "btn-check-meeting-video-{$meetingInfo['id']}", + 'class' => 'check-meeting-video', + 'data-id' => $meetingInfo['id'] + ] + ); + } } if (!$isAdminReport) { diff --git a/plugin/bbb/lib/bbb_plugin.class.php b/plugin/bbb/lib/bbb_plugin.class.php index 4547976ff8..187f7954f6 100755 --- a/plugin/bbb/lib/bbb_plugin.class.php +++ b/plugin/bbb/lib/bbb_plugin.class.php @@ -52,6 +52,7 @@ class BBBPlugin extends Plugin 'enable_global_conference_per_user' => 'boolean', 'enable_conference_in_course_groups' => 'boolean', 'enable_global_conference_link' => 'boolean', + 'disable_download_conference_link' => 'boolean', 'max_users_limit' => 'text', 'global_conference_allow_roles' => [ 'type' => 'select', @@ -209,7 +210,9 @@ class BBBPlugin extends Plugin 'bbb_host', 'bbb_tool_enable', 'enable_global_conference', + 'enable_global_conference_per_user', 'enable_global_conference_link', + 'disable_download_conference_link', 'enable_conference_in_course_groups', 'bbb_plugin', 'bbb_plugin_host',