Index: openacs-4/packages/assessment/www/asm-admin/item-edit-general.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-edit-general.tcl,v diff -u -r1.15.2.7 -r1.15.2.8 --- openacs-4/packages/assessment/www/asm-admin/item-edit-general.tcl 27 Mar 2007 16:56:25 -0000 1.15.2.7 +++ openacs-4/packages/assessment/www/asm-admin/item-edit-general.tcl 21 Jun 2007 01:50:39 -0000 1.15.2.8 @@ -85,10 +85,9 @@ {num_choices:text(hidden)} {add_another_choice:text(submit) {label "[_ assessment.Add_another_choice]"}} } -ns_log notice "Add Another = '[template::element::get_value item_edit_general add_another_choice]'" +ns_log notice "Add Another = '[template::element::get_value item_edit_general add_another_choice]' == '[_ assessment.Add_another_choice]'" if {[template::form::is_submission item_edit_general] \ - && [template::element::get_value item_edit_general add_another_choice] \ - eq [_ assessment.Add_another_choice]} { + && [template::element::get_value item_edit_general add_another_choice] eq [_ assessment.Add_another_choice]} { set num_choices [element::get_value item_edit_general num_choices] incr num_choices element::set_value item_edit_general num_choices $num_choices @@ -150,7 +149,10 @@ set existing_choices [as::item_type_mc::existing_choices $as_item_id] - + if {[llength $existing_choices] && ![info exists num_choices]} { + set num_choices [llength $existing_choices] + template::element::set_value item_edit_general num_choices $num_choices + } if {![template::form::is_submission item_edit_general] \ && ![info exists num_choices]} { set num_choices 5