In my development team we're gotten a question from our stakeholders to make a navigation based on user roles (Students, Teachers, Course Administrators). I feel that is quite complicated of a task, and you never know which role the anonymous user has. If a user is logged in, it's easy - but for an anonymous user what's the best suggestion?
Well, what's the not-logged-in user most likely to be? For your specific use case it seems the obvious answer would be students.
Any activity that requires logging in or any form of authentication of course shouldn't be part of the logged-out view (alternately, attempting to initiate such an action would force a log in prompt). Depending on the system it's quite likely that Teachers have a special and more complicated UI, and some features teachers get shouldn't be allowed for students or anonymous users.
Anonymous users should be given whatever role has the least permissions and is the most common. This might be it's own role or it might be a read-only version of the lowest-permission logged-in account.
Giving them a way to chose whatever role sounds great in theory, but in reality a lot of those Administrator functions probably aren't/shouldn't be accessible from anonymous users. Important, high-privileged roles almost exclusively require logins, so why would anonymous users be able to see those navigation options?
With anonymous users there is nothing you can do, except provide a way for them to chose whatever role the want to assume. So split the content of the site in three distinct sections and tailor it to each role's needs.
I am looking at a similar problem currently. It's always dangerous to assume so I would agree with others here that it is important to provide an easy way for this anonymous user to personalise or chose whatever is important to them. I found http://www.visitcornwall.com/ (customise your visit) to be a good example. Very different in audience but the principle could work for you. Visit cornwall is a tourist board website when all sorts of people can find info on where to go/things to do/where to stay etc and so users could be everything from single dog walkers to full families looking for a day out or a place to stay.
When the user is on the the website at the very top right of the webpage is a pink box titled 'Customize your visit' and once clicked the user is served the following options in a simple and pleasing visual style:
Using these selections the most appropriate content is then served to the user once they click through to their desired subject (whats on/things to do/where to stay etc).
So in this instance you could look at using a similar selection tool so the user could indicate they are a 'Student' who is a 'First year' looking for 'Exam' information for example which could then influence your navigation and what content you serve.
The downside in this is that it needs the user to be willing to interact.