You can filter by the User 'Guest'.
Guest is both a special pre-defined Role and a predefined User at the same time. So filtering by user will get you the same results as filtering by role would (if you could).
You can filter by the User 'Guest'.
Guest is both a special pre-defined Role and a predefined User at the same time. So filtering by user will get you the same results as filtering by role would (if you could).
but if I access a course as a guest, that event is logged with the user name I accessed it with, not with "guest".
thus, filtering by "guest" always gives me an empty list, even if i previously generated activity with a user that uses guest access.
Ah, indeed, you are quite right.
In this particular case, if I understand properly, the user is not in the site as guest, but is already logged in as a real user. Then accessing a course using the Guest role, the log just shows them accessing it normally as that user.
it makes sense to me that it would use the real user name here. But what is missing is what role you are using to access the course. Student and Guest are lumped together as 'Participating' as opposed to 'Teaching' just as you noted originally.
I don't see in the log table in the database that it tracks the exact role. There is a column for "edulevel" which reflects the constants in the code to log for Teaching (1) versus Participating (2). It seems to lump in Guest as Participating the same as a Student. (See attachment from base.php constants.)
I think the only way around this is to fix it in the code. It should really not lump the Guest user in as Participating but at least use Other (0) or better have its own level. Right now, the log data that this is a Guest use just doesn't exist as far as I can tell.
Randy