user_lastaccess all the same

user_lastaccess all the same

by Howard Miller -
Number of replies: 7
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I'm wondering if there's a bug of some sort. 

We are seeing students with their user_lastaccess times set to a particular timestamp. All courses the same. 

As far as I can see, the user_lastaccess stamp is put in the database as the very last thing that require_login() does. This implies (to me anyway) that require_login is being called from somewhere it shouldn't be. 

Any thoughts?  (3.5 btw)

Average of ratings: -
In reply to Howard Miller

Re: user_lastaccess all the same

by Séverin TERRIER -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi Howard,

You should specify your exact Moodle version, and more details on your problems : does it concern everybody on your Moodle ? Or only students in (some) courses (using a particular plugin)?

Does this particular timestamp mean something special in your case? Is this timestamp something in the past (long away)?

HTH,
Séverin

In reply to Séverin TERRIER

Re: user_lastaccess all the same

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

3.5.1

There are loads of users that appear to have had the lastaccess time for all their courses set to the same value. It's clearly intermittent - some did this today. Some did it a month ago and seem to have been recording sensible values since. 

Yeh - I know it's not the best report but I was posting on the off chance somebody had seen this before. 

My initial thought was some plugin calling require_login() when it shouldn't but I haven't spotted anything. 

I'm struggling to see anything that connects the users but I'm still looking. 

Here's a random example (timestamp found from searching for multiple examples of same stamp). This stamp applies to lots of courses for only two users. 

select * from mdl_user_lastaccess where timeaccess=1543612400 order by userid;
+---------+--------+----------+------------+
| id      | userid | courseid | timeaccess |
+---------+--------+----------+------------+
| 1837612 | 102053 |     1319 | 1543612400 |
| 1506024 | 102053 |    11795 | 1543612400 |
| 1506026 | 102053 |     1244 | 1543612400 |
| 1506027 | 102053 |     1242 | 1543612400 |
| 1506028 | 102053 |     1260 | 1543612400 |
| 1506029 | 102053 |     1239 | 1543612400 |
| 1506030 | 102053 |     1257 | 1543612400 |
| 1506031 | 102053 |     1235 | 1543612400 |
| 1859274 | 102053 |    15308 | 1543612400 |
| 1506025 | 102053 |    11797 | 1543612400 |
| 1837611 | 102053 |    14422 | 1543612400 |
| 1837610 | 102053 |    14656 | 1543612400 |
| 1813951 | 102053 |    14445 | 1543612400 |
| 1775727 | 102053 |    14412 | 1543612400 |
| 1775742 | 102053 |    14416 | 1543612400 |
| 1813949 | 102053 |    14411 | 1543612400 |
| 1798526 | 102053 |    14414 | 1543612400 |
| 1800800 | 102053 |    14413 | 1543612400 |
| 1465955 | 102053 |    11782 | 1543612400 |
| 1380032 | 102053 |    11790 | 1543612400 |
| 1389793 | 102053 |    11794 | 1543612400 |
| 1883804 | 102053 |    13038 | 1543612400 |
| 1375617 | 102053 |     5289 | 1543612400 |
| 1375584 | 102053 |    11783 | 1543612400 |
| 1367238 | 102053 |    11799 | 1543612400 |
| 1360600 | 102053 |    11798 | 1543612400 |
| 1873536 | 102053 |    13080 | 1543612400 |
| 1465958 | 102053 |     1237 | 1543612400 |
| 1465964 | 102053 |     1231 | 1543612400 |
| 1506019 | 102053 |    11774 | 1543612400 |
| 1506020 | 102053 |    11775 | 1543612400 |
| 1506021 | 102053 |    11784 | 1543612400 |
| 1506023 | 102053 |    11788 | 1543612400 |
| 1506022 | 102053 |    11785 | 1543612400 |
| 1889898 | 102188 |    11500 | 1543612400 |
| 1883795 | 102188 |    13038 | 1543612400 |
| 1842649 | 102188 |     5728 | 1543612400 |
| 1858479 | 102188 |    13080 | 1543612400 |
| 1858481 | 102188 |    15308 | 1543612400 |
| 1659000 | 102188 |     1944 | 1543612400 |
| 1806576 | 102188 |     4326 | 1543612400 |
| 1782718 | 102188 |     4608 | 1543612400 |
| 1666640 | 102188 |     4313 | 1543612400 |
| 1666639 | 102188 |     4324 | 1543612400 |
| 1666638 | 102188 |     4592 | 1543612400 |
| 1666637 | 102188 |     4593 | 1543612400 |
| 1666635 | 102188 |     2860 | 1543612400 |
| 1666634 | 102188 |     2858 | 1543612400 |
| 1666633 | 102188 |    11501 | 1543612400 |
| 1333989 | 102188 |     3043 | 1543612400 |
| 1443260 | 102188 |     6150 | 1543612400 |
| 1394243 | 102188 |     2883 | 1543612400 |
| 1394242 | 102188 |     3322 | 1543612400 |
| 1340092 | 102188 |    10102 | 1543612400 |
+---------+--------+----------+------------+
In reply to Howard Miller

Re: user_lastaccess all the same

by Daniel Thies -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Are you using the Moodle Mobile App on the site?

In reply to Daniel Thies

Re: user_lastaccess all the same

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes

In reply to Howard Miller

Re: user_lastaccess all the same

by Daniel Thies -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

When a student launches the app it downloads some basic information for every course that the student can access to be used offline. The phone has accessed all the courses even though the student may not have done anything.

Average of ratings: Useful (3)
In reply to Howard Miller

Re: user_lastaccess all the same

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Howard,

I suspect that you are seeing the same issue as MDL-63716 resolved a few weeks back.

The  way that web services validate access had a side-effect of bumping the last access time for the course that was checked.

Andrew

Average of ratings: Useful (3)