Restricting access to front page for enrolled users

Restricting access to front page for enrolled users

by Em Vee -
Number of replies: 4

New to Moodle and hoping to get some help.

Is there a way to restrict all front page access for enrolled course users?  We've developed a SSO from our CMS using Drupal to Moodle (version 2.7) so that students are automatically routed to their enrolled course page. We would like the ability to have users contained in their courses and not have the ability to navigate anywhere else, namely the front page. 

Would this entail just turning off all navigation items so that students don't have a way to get to back to the front page?


Thanks,

Em


 

Average of ratings: -
In reply to Em Vee

Re: Restricting access to front page for enrolled users

by Colin Fraser -
Picture of Documentation writers Picture of Testers

You can edit the Front Page to have a different appearance between pre- and post- login. That is done through the Admin 》Front Page 》Front Page Settings. Look at  https://docs.moodle.org/28/en/Front_page_settings, page. 

If you want to change the Front Page between Authenticated Users and Enrolled Users... I don't think  that can be done.

In reply to Colin Fraser

Re: Restricting access to front page for enrolled users

by Em Vee -

Thanks for the reply Colin. Your suggestion is one that we hope will be the last resort solution.

Do you think it's possible to perhaps create custom menu tabs and have the Home tab link to the course page? We'd likely have to have dynamic link since we have different cohorts of the same course running at the same time.

 

In reply to Em Vee

Re: Restricting access to front page for enrolled users

by Randy Thornton -
Picture of Documentation writers

As Colin mentioned, you can't restrict the Front page to enrolled users because you can't really enroll anyone there. But I think you are on the right track with your original idea of changing the navigation.

Try setting Appearance > Navigation > Default home page, to My home. This will accomplish the redirection from Front page to the user home page for everyone, where the Course overview block will take them to their courses.  (By default: check Appearance > Default my home page.)  Also, uncheck the Show front page activities in navigation box on that screen too.

Next, as you are thinking, you can then hide the Navigation block's Site home link in CSS, or you could also hack it so that the URL parameter "?redirect=0" is taken off, since any use of the bare site url (moodle.domain.com etc.) will redirect users to their My home page. There may be some other loose navigation ends to shore up, but the My home does the heavy lifting of redirecting the site to the user home page.

A useful thing to know is that adding that no redirect=0 parameter will bypass this forced redirect to My home, which is a trick you can use as an admin to still reach the Frontpage if you need to for some reason just by adding it in the browser address bar.

(Incidentally, as you are on 2.7, know that in 2.9 the My home page is built out more as a user Dashboard, and there will be more future work along these lines.)

Not a %100 solution but about %98 with much less effort than custom coding.

If you actually need different landing pages based on cohort membership, that's going to take some more complex coding, but the idea would be the same: redirect the Frontpage or even My home to a course used as a landing pad based on cohort membership.


Randy

In reply to Randy Thornton

Re: Restricting access to front page for enrolled users

by shourav rahman -
Hello Randy,


Great writing and amazing analysis ! Thank yo so much for the in-depth information on the front page restriction topic !