Index: openacs-4/packages/assessment/www/assessment.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/assessment.tcl,v
diff -u -r1.18 -r1.19
--- openacs-4/packages/assessment/www/assessment.tcl 8 Jan 2005 14:51:19 -0000 1.18
+++ openacs-4/packages/assessment/www/assessment.tcl 8 Jan 2005 17:27:22 -0000 1.19
@@ -31,11 +31,13 @@
db_transaction {
if {[empty_string_p $session_id]} {
- # todo: check if there's an old session that could be continued
- set session_id [as::session::new -assessment_id $assessment_rev_id -subject_id $user_id]
+ if {![db_0or1row unfinished_session_id {}]} {
+ # todo: check if there's an old session that could be continued
+ set session_id [as::session::new -assessment_id $assessment_rev_id -subject_id $user_id]
- # update the creation_datetime col of as_sessions table to set the time when the subject initiated the Assessment
- db_dml session_start {}
+ # update the creation_datetime col of as_sessions table to set the time when the subject initiated the Assessment
+ db_dml session_start {}
+ }
}
# get all sections of assessment in correct order
@@ -86,7 +88,7 @@
set new_section_order [expr $section_order + 1]
}
- if {$section_order == [llength $section_list]} {
+ if {$new_section_order == [llength $section_list]} {
set new_section_order ""
}
}
Index: openacs-4/packages/assessment/www/assessment.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/assessment.xql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/assessment/www/assessment.xql 7 Jan 2005 16:10:44 -0000 1.6
+++ openacs-4/packages/assessment/www/assessment.xql 8 Jan 2005 17:27:22 -0000 1.7
@@ -25,6 +25,15 @@
+
+
+
+ select max(session_id) as session_id
+ from as_sessions
+ where completed_datetime is null
+ and assessment_id = :assessment_rev_id
+
+
Index: openacs-4/packages/assessment/www/session.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/session.adp,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/assessment/www/session.adp 25 Dec 2004 13:11:55 -0000 1.16
+++ openacs-4/packages/assessment/www/session.adp 8 Jan 2005 17:27:22 -0000 1.17
@@ -6,7 +6,7 @@