Index: openacs-4/packages/assessment/www/assessment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/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 "" } }