Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37679

Re: Different breadcrumb trail for teacher and other user

$
0
0
by Darko Miletić.  

The only wy to do this is override homepage logic builtin into <moodle>/index.php

Look at this part of code:

if (get_home_page() != HOMEPAGE_SITE) {
// Redirect logged-in users to My Moodle overview if required
if (optional_param('setdefaulthome', false, PARAM_BOOL)) {
set_user_preference('user_home_page_preference', HOMEPAGE_SITE);
} else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MY) && optional_param('redirect', 1, PARAM_BOOL) === 1) {
redirect($CFG->wwwroot .'/my/');
} else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_USER)) {
$PAGE->settingsnav->get('usercurrentsettings')->add(get_string('makethismyhome'), new moodle_url('/', array('setdefaulthome'=>true)), navigation_node::TYPE_SETTING);
}
}
 

Viewing all articles
Browse latest Browse all 37679

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>