how to add last access and login fields in users list ?

how to add last access and login fields in users list ?

by REMI PICARD (substitute) -
Number of replies: 4

hi,


i use moodle 3.2 as administrator account.

i need a little help to customize a web page.


if there a way to display the login anf the last access  field in the tab (array)  of the users list ?

i wish i could add columns in that page !

www.mysite.com/admin/user.php


i notice i can tweak the url parameter to sort by firstaccess instead of lastaccess

admin/user.php?sort=firstaccess&dir=DESC

but i need to see the data in the array !


I need that because, 99% of my time, i search/sort accounts by their login or first access time.


Thanks for help !

Average of ratings: -
In reply to REMI PICARD (substitute)

Re: how to add last access and login fields in users list ?

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers

I’m not sure I’ve understood your question properly - because Last Access is already a column in the Browse User List and clicking on the column header will toggle the sort order of that column (last access / first access).

In addition, you can choose extra information to be included in the user list at Site Admin > Users > Permissions > User Policies and selecting options for showuseridentity.

In reply to Jon Bolton

Re: how to add last access and login fields in users list ?

by REMI PICARD (substitute) -

sorry for my expression.


ok, so, how can i have a list of users  ordered by created account date DESC ?

In reply to REMI PICARD (substitute)

Re: how to add last access and login fields in users list ?

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

This should work:

Select lastname, firstname, timecreated

from mdl_user

order by timecreated desc

In reply to Rick Jerz

Re: how to add last access and login fields in users list ?

by REMI PICARD (substitute) -

is it not possible in the front part of moodle to get access to that information ?


i discovered we can "query" the frontpage like this :

/admin/user.php?sort=firstaccess&dir=DESC

even now i tried :

/admin/user.php?sort=timecreated&dir=DESC   which is quite running too approve


but the webfront does not display the firstaccess column and it is exactly what i need.


each morning, i need to know if there is new created accounts on the moodle.


Best regards