diff --git a/CHANGES.md b/CHANGES.md index 8661b4beba531367b71f617b9e00bcc4ac562a9f..5f6f55660594540043344e97984252ce46a943c5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ moodle-theme_boost_campus Changes ------- +### Unreleased + +* 2019-06-11 - Added hide_if function to suitable admin setting incoursesettingsswitchtoroleposition and corrected README.md. + ### Release v3.7-r1 * 2019-06-04 - Further formal changes to the course_renderer to be constistent with Moodle core. diff --git a/README.md b/README.md index 69dda3cf62fefce080b20a5fb8875835696aa114..5bf7c83982277740fe7035704bef6c3594c3b4f4 100644 --- a/README.md +++ b/README.md @@ -147,10 +147,9 @@ With this setting you can change the displaying of the context menus. In Boost, Please note that this change does not affect users who have switched off javascript in their browsers - they will still get the behaviour from Moodle core with a popup course context menu. -##### Move "Switch role to..." to the course settings +##### Switch role to..." location(s) -With this setting you can move the "Switch role to..." link as a new tab from the user menu to the in-course course menu. The role switching is a feature which is used in course context and thus it is better to place it in the course settings menu than in the user menu. -Please note that this setting won't have any effect if you do not activate the "In course settings menu" above. +With this setting you can choose the place where the information to which role a user has switched is being displayed. If set to 'Just in the user menu' (default value), the role information will be displayed right beneath the user's name in the user menu (like in theme Boost). If set to 'Just in the course settings', this information - together with a link to switch back - will be displayed beneath the course, as this functionality is course related. If set to 'Both in the user menu and in the course settings' it will be shown in both places. ### 4. Tab "Footer Layout Settings" diff --git a/lang/en/theme_boost_campus.php b/lang/en/theme_boost_campus.php index 24e2f4d13239c71f5ee6a8d63f5505283c730cb3..18abc4c6acaaecf65205727d01ef8dcf6b378cbf 100644 --- a/lang/en/theme_boost_campus.php +++ b/lang/en/theme_boost_campus.php @@ -100,8 +100,7 @@ $string['incoursesettingsswitchtorolepositionsetting'] = '"Switch role to..." lo $string['incoursesettingsswitchtorolesettingjustmenu'] = 'Just in the user menu'; $string['incoursesettingsswitchtorolesettingjustcourse'] = 'Just in the course settings'; $string['incoursesettingsswitchtorolesettingboth'] = 'In both places: in the user menu and in the course settings'; -$string['incoursesettingsswitchtorolepositionsetting_desc'] = 'With this setting you can choose the place where the information to which role a user has switched is being displayed. If set to \'Just in the user menu\' (default value), the role information will be displayed right beneath the user\'s name in the user menu(like in theme Boost). If set to \'Just in the course settings\', this information - together with a link to switch back - will be displayed beneath the course, as this functionality is course related. If set to \'Both in the user menu and in the course settings\' it will be shown in both places. <br/> -Please note that this setting won\'t have any effect if you do not activate the "In course settings menu" above.'; +$string['incoursesettingsswitchtorolepositionsetting_desc'] = 'With this setting you can choose the place where the information to which role a user has switched is being displayed. If set to \'Just in the user menu\' (default value), the role information will be displayed right beneath the user\'s name in the user menu (like in theme Boost). If set to \'Just in the course settings\', this information - together with a link to switch back - will be displayed beneath the course, as this functionality is course related. If set to \'Both in the user menu and in the course settings\' it will be shown in both places.'; // Footer layout settings. diff --git a/settings.php b/settings.php index f3a44d756be0d4599eb1512654f6c8e2a7158a44..e17aab86ee849c7ed665b90e0a4041bea83ab74b 100644 --- a/settings.php +++ b/settings.php @@ -326,6 +326,8 @@ if ($ADMIN->fulltree) { $incoursesettingsswitchtorolesetting); $setting->set_updatedcallback('theme_reset_all_caches'); $page->add($setting); + $settings->hide_if('theme_boost_campus/incoursesettingsswitchtoroleposition', + 'theme_boost_campus/showsettingsincourse', 'notchecked'); // Add tab to settings page. $settings->add($page);