General developer forum

user_lastaccess all the same

 
Picture of Howard Miller
user_lastaccess all the same
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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: -
C'est moi :-)
Re: user_lastaccess all the same
Documentation writersParticularly helpful MoodlersTestersTranslators

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

 
Average of ratings: -
Picture of Howard Miller
Re: user_lastaccess all the same
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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 |
+---------+--------+----------+------------+
 
Average of ratings: -
Picture of Daniel Thies
Re: user_lastaccess all the same
Core developersParticularly helpful MoodlersPlugin developersTesters

Are you using the Moodle Mobile App on the site?

 
Average of ratings: -
Picture of Howard Miller
Re: user_lastaccess all the same
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Yes

 
Average of ratings: -
Picture of Daniel Thies
Re: user_lastaccess all the same
Core developersParticularly helpful MoodlersPlugin developersTesters

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)
Picture of Andrew Nicols
Re: user_lastaccess all the same
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

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)
Picture of Howard Miller
Re: user_lastaccess all the same
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Aha!  Yes - that's definitely it. 

 
Average of ratings: -