Event not posted for assessments that are submitted by timer thread

Description

If a user starts a timed assessment then closes the browser without submitting, when the assessment is auto-submitted on the server, no event is posted.

An event should be posted for this, similar to sam.assessment.submit, but with some difference to identify it as an auto submission, e.g. sam.assessment.autosubmit

The site context (site id) should also be explicitly passed to newEvent() using the 2-6-x expanded form which includes a context parameter.

is related to

Activity

Jasmine Thapa January 16, 2009 at 12:26 PM
Edited

Verified on local instance- when the assessment is auto-submitted on the server, events are posted.

Scenarios,

  • timed assessment with Linear option released to sites.

  • timed assessment with Linear option released to anonymous users.

  • timed assessment with Random option released to sites.

  • timed assessment with Random option released to anonymous users.

Hui Tsao December 4, 2008 at 10:47 AM

commit -m "SAK-14968, SAK-14966, SAK-14965" C:/sakai_trunk/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/delivery/DeliveryBean.java C:/sakai_trunk/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/delivery/DeliveryActionListener.java C:/sakai_trunk/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/delivery/LinearAccessDeliveryActionListener.java C:/sakai_trunk/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/queue/delivery/SubmitTimedAssessmentThread.java
Sending sakai_trunk/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/delivery/DeliveryBean.java
Sending sakai_trunk/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/delivery/DeliveryActionListener.java
Sending sakai_trunk/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/delivery/LinearAccessDeliveryActionListener.java
Sending sakai_trunk/sam/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/queue/delivery/SubmitTimedAssessmentThread.java
Transmitting file data ...
Committed revision 54816.

Hui Tsao December 3, 2008 at 10:07 PM

The event is logged as sam.assessment.thread_submit instead of sam.assessment.autosubmit because automatic submission is another feature ().

Stephen Marquard December 2, 2008 at 10:58 PM

The method to call to construct an event with an explicit context (=siteid) is:

EventTrackingService.newEvent:

Event newEvent(String event,
String resource,
String context,
boolean modify,
int priority)

Construct a Event object.

Parameters:
event - The Event id.
resource - The resource reference.
context - The Event's context (may be null).
modify - Set to true if this event caused a resource modification, false if it was just an access.
priority - The Event's notification priority. Use NotificationService.NOTI_OPTIONAL as default.
Returns:
A new Event object that can be used with this service.

You'd get the site id from the assessment information. Normally posting an event from a tool automatically includes the context because the event service can find it out from the tool placement information, but if a thread which isn't executing in a tool placement (e.g. timer thread or another servlet) posts an event, then it should explicitly set the context so it can be recorded in the event for applications like SiteStats.

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created November 25, 2008 at 5:17 AM
Updated April 27, 2018 at 4:47 PM
Resolved December 4, 2008 at 10:47 AM