Moodle Mobile App Idle/ Non usage log out functionality

Moodle Mobile App Idle/ Non usage log out functionality

by Showemimo Adebare -
Number of replies: 1

 I need help on how to implement ng-idle on moodle mobile app. I need to logout user when the app is not in used within a specific time like 5minutes.

Average of ratings: -
In reply to Showemimo Adebare

Re: Moodle Mobile App Idle/ Non usage log out functionality

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi,

you should create a custom app or a remote addon to achieve this, but it can be quite hard to detect the inactivity.

You could listen for the event $stateChangeStart to detect if the user is navigating through the app and logout him if he doesn't in X minutes. However, the user could be reading a long text in a page, or answering a quiz, or watching a video... So you should think in all the possible cases and try to use events to detect if the user is doing something (like clicks in the app).

Kind regards,

Dani