Index: openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl 7 Jan 2005 16:10:44 -0000 1.6 +++ openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl 9 Apr 2005 22:39:27 -0000 1.7 @@ -89,6 +89,7 @@ {-title ""} {-subtext ""} {-required_p ""} + {-random_p ""} {-default_value ""} {-data ""} } { @@ -97,7 +98,7 @@ Render an Item Display ShortAnswer Type } { - db_1row display_item_data {} + array set type [util_memoize [list as::item_display_sa::data -type_id $type_id]] if {[empty_string_p $required_p]} { set required_p f } @@ -109,11 +110,23 @@ if {$required_p != "t"} { set optional ",optional" } - set param_list [list [list label $title] [list help_text $subtext] [list value $default_value] [list html $html_display_options]] - if {![empty_string_p $abs_size]} { - lappend param_list [list maxlength $abs_size] + set param_list [list [list label $title] [list help_text $subtext] [list value $default_value] [list html $type(html_display_options)]] + if {![empty_string_p $type(abs_size)]} { + lappend param_list [list maxlength $type(abs_size)] } set element_params [concat [list "$element\:$datatype\(text)$optional"] $param_list] ad_form -extend -name $form -form [list $element_params] } + +ad_proc -public as::item_display_sa::data { + -type_id:required +} { + @author Timo Hentschel (timo@timohentschel.de) + @creation-date 2005-04-08 + + Get the Display Data of ShortAnswer Type +} { + db_1row display_item_data {} -column_array type + return [array get type] +}