[SAK-36506] Events from timer thread should have a session that matches the user who submitted Created: 16-Jun-2017  Updated: 31-Oct-2018  Resolved: 21-Jun-2017

Status: Verified
Project: Sakai
Component/s: Tests & Quizzes (Samigo)
Affects Version/s: 11.4
Fix Version/s: 11.5 [Tentative], 12.0

Type: Bug Priority: Critical
Reporter: Matthew Jones Assignee: Matthew Jones
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 3224.png    
Issue Links:
is depended on by SAK-40867 Timed Assessment thread should perfor... CLOSED
depends on SAK-37058 Removing a timed assessment during ta... Verified
incorporates SAK-36648 Timed out user has incorrect event lo... RESOLVED
relates to SAK-35736 Timer thread submission events can be... CLOSED
relates to SAK-32407 Add additional samigo submit events t... Verified
11 status: Resolved
Previous Issue Keys: SAM-3224
Test Plan:

As instructor add Statistics and Tests and Quizzes to a course with multiple students.
To test this you'll also need database access.

Create a new assessment

  • One multiple choice question is fine


  • Unlimited submissions
  • Available now
  • Due (Sometime out in the future)
  • Time limit (short, like 1 minute)
  • Last submissions accepted (No, not after due date)


Login as a student.
Take the assessment, mark an answer to the question
Save (not submit) and leave the assessment by closing the browser or clicking on another tool.

Now you'll need to look at the events in the database.
SELECT EVENT,SESSION_ID FROM sakai_trunk.SAKAI_EVENT where EVENT like 'sam%' order by EVENT_ID DESC;

If this is working the session_id of the timer thread events should match the session id of the taken events.

For instance this does not match
'sam.assessment.submit.timer.thre', '~matt-VirtualBox~9d85638b-5ada-4fcd-8c3b-752560d32eb1'
'sam.assessment.submit.thread', '~matt-VirtualBox~9d85638b-5ada-4fcd-8c3b-752560d32eb1'
'sam.assessment.take', 'a0da0ec8-ea48-4bb7-a9f4-9e53d6ca9d2f'


If an event is posted from the timer thread (and possibly auto-submit job) it isn't able to be linked back to the user that actually submitted the assessment. It is a "dummy" session matching the server. Ideally a session should be created for that user to the event is correct. See test plan

Comment by Matthew Jones [ 16-Jun-2017 ]

This looks to also fix SAM-2788 need to test that one too. This one actually might be testable via the UI just by looking at the event log (or maybe sitestats?)

Comment by Derek Ramsey [ 23-Jun-2017 ]

Verified on 12x nightly that the events for context and session ID have proper values after timer submit.


see screenshot

Generated at Tue Feb 18 23:08:06 CST 2020 using Jira 8.0.3#800011-sha1:073e8b433c2c0e389c609c14a045ffa7abaca10d.