Issue with log in / log out

Issue with log in / log out

by Ricardo Abreu -
Number of replies: 2

Well, 

Hi to all, at first smile, and sorry if my english is not accurate, but let's see if I can put it clear to all.

I want a little help from you guys, I'm the programmer hired by my company to work with moodle, my boss wants me to create a report: average time spent on moodle, and I'm having a really bad time to create that.

The problem:

  • When we do manual log in or log out, it's fine, the database receive the values "loggedin" and "loggedout". But when the timeout setting is active, the user is redirected to "log in" page but, for some reason I don't know why, the system doesn't input that timeout as "loggedout". So, when I check my database to get the values for report, I see something like that:

                       

Example:
id action crud userid
1 loggedin r 2
4 loggedin r 2
5 loggedout r 2
6 loggedin r 2
9 loggedin r 2
10 loggedin r 2
11 loggedout r 2

It looks like that, where the bold ones are the first log in attempt, and the following "loggedin" registers are the log ins did after the timeout.

So, if I didn't click on "log out" button that will repeat until I press that. 

I really want to "force" the log out, in any way possible or when the session expires. But I don't have any idea to where change.


Thanks in advance.



Average of ratings: -
In reply to Ricardo Abreu

Re: Issue with log in / log out

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Ricardo,

Not an answer I'm afraid; just another question!

I was wondering exactly what your boss was hoping to get from this report?

I mean I can see what he might think the report will show him, but measuring the time logged in to Moodle is really no indication of involvement with the learning materials on there. I could log in then go and make a cup of coffee; come back 10 minutes later click one resource then walk away again having not read it. To all intents and purposes your report would show me having been in Moodle for what ever your session time-out is set to plus 10 minutes. On the other hand I could sit down and spend 30 minutes reading and participating in the learning activities on your Moodle... This would likely show me as being in Moodle for a lot less time than the first one. Which would have had the better learning experience?


Hope this question helps and doesn't hinder!

Jon