Statistical approach to the timeout

    HTTP is a stateless protocol, so you cannot calculate connection time (delay, elapse, duration, ecc...). You can only see requests to an HTTP server. But you can set a timeout, that if you don't request any page for that period, the activity module breaks you your session. In the module timeout is setting at 30 min (REGISTER_SESSION_TIMEOUT), but it's simple to put the same value of Moodle system session timeout.
    Thinking in a stastistical way, the time of each session is a uniform aleatory variable that assumes values from last log - login to last log - login + REGISTER_SESSION_TIMEOUT. Register can work in 2 ways: without error refuse or with error refuse.

    Without error refuse
    This is the default way of work, and there is no error refuse evaluation and each session will be compared to: last log - login + REGISTER_SESSION_TIMEOUT. For example if the first log is at 10.00 and the last die at 11.00, knowing that REGISTER_SESSION_TIMEOUT = 30 minutes we obtain: (11.00 - 10.00) + 30 min = 90 minutes

    With error refuse
    The logout is the average of the aleatory variable. In the previous example, since the last log happens at 11.00 and there were not any other logs until 11.30, the user could be disconnected from 11.00 to 11.30, so that the logout timestamp is at 11.15 with an error refuse (tollerance) of 15 minutes.

    Differences
    The default way of work is more precise and sessions are closer to the reality than the first one. Moreover in the second approach we can carry out statistical calculation and create confidence intervals. The first one, on the contrary, is more practical, even if, for long courses with many sessions, Resgister will declare much more hours of study on Moodle than what they really are.

Índice de todos os ficheiros de ajuda