Index: openacs-4/packages/assessment/tcl/as-checks-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/assessment/tcl/as-checks-procs.tcl 25 Jan 2005 17:10:24 -0000 1.3 +++ openacs-4/packages/assessment/tcl/as-checks-procs.tcl 25 Jan 2005 20:43:05 -0000 1.4 @@ -255,21 +255,38 @@ } { } { - db_foreach get_check_params {} { + db_foreach get_check_params { } { set parameter_name [db_1row select_name {}] set $varname "" - if {$value == " "} { - set $varname [db_string get_item_choice {}] - + if {$value == ""} { + set choice [db_0or1row get_item_choice {}] + set answer [db_0or1row get_answer {}] + if {[exists_and_not_null choice_id]} { + set $varname "$choice_id" + } else { + append $varname $boolean_answer + append $varname $numeric_answer + append $varname $integer_answer + append $varname $text_answer + append $varname $clob_answer + append $varname $content_answer + } } else { set $varname $value } + ns_log notice "--------------------------parameter $varname [set $varname]" + } - set tcl_code [db_1row select_tcl {}] - set failed_p [catch {eval $tcl_code}] + set tcl_code_p [db_1row select_tcl {}] + set failed_p "t" + set failed [catch $tcl_code] + ns_log notice "--------------------------TCL $tcl_code" + if { $failed > 0 } { + set failed_p "f" + } set user_id [ad_conn user_id] db_dml update_actions_log {} Index: openacs-4/packages/assessment/tcl/as-checks-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-checks-procs.xql 24 Jan 2005 17:59:52 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-checks-procs.xql 25 Jan 2005 20:43:05 -0000 1.2 @@ -182,6 +182,16 @@ and as_item_id = :item_id + + + select item_data_id, boolean_answer, clob_answer, numeric_answer, + integer_answer, text_answer, timestamp_answer, content_answer + from as_item_data + where session_id = :session_id + and as_item_id = :item_id + + + select idc.choice_id from as_item_data_choices idc,as_item_data id where id.as_item_id=:item_id and id.item_data_id=idc.item_data_id and id.session_id=:session_id