Skip to content
Snippets Groups Projects
Commit 6940d556 authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Added hide_if function to suitable admin setting...

Added hide_if function to suitable admin setting incoursesettingsswitchtoroleposition and corrected README.md.
parent 43c1ace3
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,10 @@ moodle-theme_boost_campus ...@@ -4,6 +4,10 @@ moodle-theme_boost_campus
Changes Changes
------- -------
### Unreleased
* 2019-06-11 - Added hide_if function to suitable admin setting incoursesettingsswitchtoroleposition and corrected README.md.
### Release v3.7-r1 ### Release v3.7-r1
* 2019-06-04 - Further formal changes to the course_renderer to be constistent with Moodle core. * 2019-06-04 - Further formal changes to the course_renderer to be constistent with Moodle core.
......
...@@ -147,10 +147,9 @@ With this setting you can change the displaying of the context menus. In Boost, ...@@ -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. 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. 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.
Please note that this setting won't have any effect if you do not activate the "In course settings menu" above.
### 4. Tab "Footer Layout Settings" ### 4. Tab "Footer Layout Settings"
......
...@@ -100,8 +100,7 @@ $string['incoursesettingsswitchtorolepositionsetting'] = '"Switch role to..." lo ...@@ -100,8 +100,7 @@ $string['incoursesettingsswitchtorolepositionsetting'] = '"Switch role to..." lo
$string['incoursesettingsswitchtorolesettingjustmenu'] = 'Just in the user menu'; $string['incoursesettingsswitchtorolesettingjustmenu'] = 'Just in the user menu';
$string['incoursesettingsswitchtorolesettingjustcourse'] = 'Just in the course settings'; $string['incoursesettingsswitchtorolesettingjustcourse'] = 'Just in the course settings';
$string['incoursesettingsswitchtorolesettingboth'] = 'In both places: in the user menu and 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/> $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.';
Please note that this setting won\'t have any effect if you do not activate the "In course settings menu" above.';
// Footer layout settings. // Footer layout settings.
......
...@@ -326,6 +326,8 @@ if ($ADMIN->fulltree) { ...@@ -326,6 +326,8 @@ if ($ADMIN->fulltree) {
$incoursesettingsswitchtorolesetting); $incoursesettingsswitchtorolesetting);
$setting->set_updatedcallback('theme_reset_all_caches'); $setting->set_updatedcallback('theme_reset_all_caches');
$page->add($setting); $page->add($setting);
$settings->hide_if('theme_boost_campus/incoursesettingsswitchtoroleposition',
'theme_boost_campus/showsettingsincourse', 'notchecked');
// Add tab to settings page. // Add tab to settings page.
$settings->add($page); $settings->add($page);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment