Index: openacs-4/packages/assessment/tcl/as-session-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-session-procs.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/tcl/as-session-procs.xql 8 Dec 2006 14:37:31 -0000 1.2 +++ openacs-4/packages/assessment/tcl/as-session-procs.xql 15 May 2007 20:14:17 -0000 1.3 @@ -42,6 +42,21 @@ where object_id=:session_id + + + + + + select max(s.session_id) as session_id + from as_sessions s, cr_revisions cr + where s.completed_datetime is null + and cr.item_id = :assessment_id + and s.assessment_id = cr.revision_id + and s.subject_id = :subject_id and s.subject_id <> 0 + + + +