diff --git a/lang/en/block_opencast.php b/lang/en/block_opencast.php index 6ff6247f..1ed07fca 100644 --- a/lang/en/block_opencast.php +++ b/lang/en/block_opencast.php @@ -770,6 +770,8 @@ $string['setdefaultseriessucceeded'] = 'The default series has been successfully changed.'; $string['setting_permanent'] = 'Is permanent'; $string['settings'] = 'Opencast Videos'; +$string['settings_page'] = 'Settings'; +$string['settings_page_url'] = '{$a} Settings'; $string['shared_settings'] = 'Shared settings'; $string['showvideos'] = 'Show videos'; $string['source'] = 'Source'; diff --git a/settings.php b/settings.php index 1e730221..758b3f13 100644 --- a/settings.php +++ b/settings.php @@ -1143,3 +1143,16 @@ } } $settings = null; + +// In order to be able to offer "Settings" links in Plugins overview and Manage blocks, +// we need to use a specific setting category (admin_category) that has to be "blocksettingopencast", +// therefore we provide it as a hidden subcategory to block_opencast to minimize the changes. +$blocksettingscategory = new admin_category('blocksettingopencast', new lang_string('settings_page', 'block_opencast'), true); +$mainsettingurl = new moodle_url('/admin/category.php', ['category' => 'block_opencast']); +$settingexternalpage = new admin_externalpage( + 'blocksettingopencast_externalpage', + get_string('settings_page_url', 'block_opencast', get_string('settings', 'block_opencast')), + $mainsettingurl +); +$blocksettingscategory->add('blocksettingopencast', $settingexternalpage); +$ADMIN->add('block_opencast', $blocksettingscategory);