mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-05-06 04:27:21 -04:00
a
This commit is contained in:
@@ -28,3 +28,6 @@ $string['mymediaposition_desc'] = 'Select where the "My Media" link should appea
|
|||||||
$string['pos_topbar'] = 'Top Navigation Bar';
|
$string['pos_topbar'] = 'Top Navigation Bar';
|
||||||
$string['pos_userdrop'] = 'User Profile Dropdown';
|
$string['pos_userdrop'] = 'User Profile Dropdown';
|
||||||
$string['pos_none'] = 'None (Do not display)';
|
$string['pos_none'] = 'None (Do not display)';
|
||||||
|
|
||||||
|
$string['shareembeddedmedia'] = 'Share Embedded Media';
|
||||||
|
$string['shareembeddedmedia_desc'] = 'When enabled, a student viewing embedded media is automatically granted viewer permission on that media (it appears under "Shared with me"). Disable this to allow viewing without creating a sharing record.';
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ $show_media_page = optional_param('show_media_page', '', PARAM_TEXT);
|
|||||||
// Get configuration
|
// Get configuration
|
||||||
$mediacmsurl = get_config('filter_mediacms', 'mediacmsurl');
|
$mediacmsurl = get_config('filter_mediacms', 'mediacmsurl');
|
||||||
$ltitoolid = get_config('filter_mediacms', 'ltitoolid');
|
$ltitoolid = get_config('filter_mediacms', 'ltitoolid');
|
||||||
|
$share_embedded_media = (int)(bool)get_config('filter_mediacms', 'share_embedded_media');
|
||||||
|
|
||||||
if (empty($mediacmsurl)) {
|
if (empty($mediacmsurl)) {
|
||||||
die('MediaCMS URL not configured');
|
die('MediaCMS URL not configured');
|
||||||
@@ -74,6 +75,7 @@ if ($startTime !== '') {
|
|||||||
if ($show_media_page === 'true') {
|
if ($show_media_page === 'true') {
|
||||||
$custom_params[] = "show_media_page=true";
|
$custom_params[] = "show_media_page=true";
|
||||||
}
|
}
|
||||||
|
$custom_params[] = "embed_share_media=" . $share_embedded_media;
|
||||||
|
|
||||||
// Set up page
|
// Set up page
|
||||||
$page_params = [
|
$page_params = [
|
||||||
|
|||||||
@@ -49,4 +49,11 @@ if ($ADMIN->fulltree) {
|
|||||||
0,
|
0,
|
||||||
$ltioptions
|
$ltioptions
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$settings->add(new admin_setting_configcheckbox(
|
||||||
|
'filter_mediacms/share_embedded_media',
|
||||||
|
get_string('shareembeddedmedia', 'filter_mediacms'),
|
||||||
|
get_string('shareembeddedmedia_desc', 'filter_mediacms'),
|
||||||
|
1
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user