Is there a way to default to Site Home instead of the dashboard?

Is there a way to default to Site Home instead of the dashboard?

by Grayson Bartlet -
Number of replies: 2

Hi,

We would like a way for our app to load the "Site Home" page by default instead of the dashboard. But we DON'T want our website to behave this way. Is there a way to do this only for the mobile app? I've looked through the codebase but am a bit lost.

Edit: to clarify, I know about the "defaulthomepage" setting under Appearance -> Navigation. Unfortunately that changes the behavior for both the app and the web site. In the app code I see references to a "userhomepage" variable which I can't set through the admin backend, is that just for the user's specific preference?

Average of ratings: -
In reply to Grayson Bartlet

Re: Is there a way to default to Site Home instead of the dashboard?

by Isabel Renedo -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
Hi Grayson,

You can disabled the dashboard (among others). Site administration >> Mobile app >> Mobile features and then select Dashboard in the 'Disabled features' list.

Regards,

Isabel
In reply to Isabel Renedo

Re: Is there a way to default to Site Home instead of the dashboard?

by Grayson Bartlet -
Hi Isabel,

Thanks, but we didn't want to actually DISABLE the dashboard, just make it so it wasn't the one shown by default.

For anyone else interested, you can do this by modifying src/core/courses/pages/dashboard/dashboard.ts. Find the line that says:
this.firstSelectedTab = displaySiteHome ? 0 : 1;
and change it to
this.firstSelectedTab = 0;
Average of ratings: Useful (2)