Index: openacs-4/packages/assessment/www/asm-admin/action-params.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/action-params.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/assessment/www/asm-admin/action-params.tcl 12 Jun 2006 02:49:51 -0000 1.7 +++ openacs-4/packages/assessment/www/asm-admin/action-params.tcl 27 Oct 2014 16:40:59 -0000 1.8 @@ -5,13 +5,13 @@ This page allows to add branches or actions to the question and its choices. } { - assessment_id:integer - inter_item_check_id:integer - section_id:integer - action_id:integer - check_id:optional + assessment_id:naturalnum,notnull + inter_item_check_id:naturalnum,notnull + section_id:naturalnum,notnull + action_id:naturalnum,notnull + check_id:naturalnum,optional edit_check:optional - item_id:optional + item_id:naturalnum,optional by_item_p:optional } -properties { context:onevalue @@ -36,7 +36,7 @@ set new_assessment_revision $assessment_data(assessment_rev_id) -if {[exists_and_not_null by_item_p]} { +if {([info exists by_item_p] && $by_item_p ne "")} { set return_url "checks-admin?assessment_id=$assessment_id§ion_id=$section_id" if {$by_item_p == 1} { @@ -68,8 +68,8 @@ } db_foreach get_params {} { set choices [list] - if { $type == "n" } { - if { $action_perform == "aa" || $action_perform == "m" || $action_perform == "or" || $action_perform == "sa"} { + if { $type eq "n" } { + if { $action_perform eq "aa" || $action_perform eq "m" || $action_perform eq "or" || $action_perform eq "sa"} { set choices [db_list_of_lists choices {}] } else { set choices [db_list_of_lists prev_choices {}] @@ -84,7 +84,7 @@ ad_form -extend -name get_params -new_data { db_foreach get_params {} { - if { $type == "n"} { + if { $type eq "n"} { set item_id [set param_$parameter_id] db_dml param_values_n {} } else { @@ -99,8 +99,8 @@ set action_id $action_id db_foreach get_params {} { set param_$parameter_id [as::assessment::check::get_parameter_value -parameter_id $parameter_id -type $type -check_id $inter_item_check_id] - if { [set param_$parameter_id] == ""} { - set param_$parameter_id [lindex [lindex $choices 0] 1] + if { [set param_$parameter_id] eq ""} { + set param_$parameter_id [lindex $choices 0 1] } }