WeBWorK Main Forum

Login log and LTI

Login log and LTI

by Alex Jordan -
Number of replies: 1

We use Desire2Learn, and some instructors use LTI with WeBWorK for single sign-on. We have noticed that in these courses, the login.log does not reflect when a student signs into WW using the external learning tool link from D2L. It does record the first connection that establishes their WW user account. But it does not register their subsequent connections.

Does this sound like a bug? Or is there an intentional or inescapable reason for not logging these?

In reply to Alex Jordan

Re: Login log and LTI

by Nathan Wallach -
I think this is possibly a bug.

I do see log records for LTI logins for students, but apparently not for staff users.

A slightly edited sample is:

[Sat Mar 07 19:08:05 2020] LOGIN OK user_id=username@campus.technion.ac.il login_type=normal credential_source=LTIAdvanced host=ip_address port=60259 UA=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36

The "LOGIN OK" messages are generated by lib/WeBWorK/Authen.pm only when the $self->{initial_login} flag is on. It seems that LTIAdvanced.pm turns it on when "maybe_update_user" (or "create_user") is called, but that only happens if the course/site has "LMSManageUserData" turned on. On my server I do have "$LMSManageUserData=1;" set in webwork2/conf/authen_LTI.conf which explains why I see "LOGIN OK" log records. Can you check if turning that on fixes the issue for your server.

About the lack of records for "staff" account: Since "maybe_update_user" does not attempt to update users of too high a permission, and the line to set the $self->{initial_login} flag is at the end of the block not run for such "power" users - such logins do get the flag turned on, so no log record will be generated.

I suspect that both issues should be fixed: the main issue can be fixed by adding a new block after the "elsif ($ce->{LMSManageUserData})" block to turn on $self->{initial_login} when LMSManageUserData is not on.