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.2.2.1 --- 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 16 Feb 2007 02:07:11 -0000 1.2.2.1 @@ -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 + + + +