Moodle Mobile App Idle/ Non usage log out functionality

Moodle Mobile App Idle/ Non usage log out functionality

napisao/la Showemimo Adebare -
Broj odgovora: 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.

Odgovor na Showemimo Adebare

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

napisao/la Dani Palou -
Slika Core developers Slika Moodle HQ Slika Particularly helpful Moodlers Slika Peer reviewers Slika 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