different navigation in header based on role

Re: different navigation in header based on role

by nick latronica -
Number of replies: 0
Thanks Matt & Tim - I'm archiving both of those suggestions for the future (we're really just getting started with Moodle, so I know the customizations will be coming even heavier within the next year).

The way I actually handled it was to use a combination of department & institution roles. We have our department as either the department (staff memebers) or grade (students). Using this I can have staff related info on the Front Page and put a redirect in the portion of the Header.php file of the theme that we are using (i put it in the top section specific to the HOME page so the redirect doesn't happen on every page

I then am using a similar check to show which navmenu to use:

<?php
$building = filter_text($USER->institution);

if ($building == "Administration") {
include("adminmenu.php");}
else {include("studentmenu.php") ;
} ?>

I was stuck in figuring out how to see what information is stored in the global object for user, and then how to take it out & put it into a varialbe that I could use for validation. I found such great information in this thread:

http://moodle.org/mod/forum/discuss.php?d=112303

Thanks to all the helpful people on the site!

Nick LaTronica