Index: openacs-4/packages/assessment/tcl/as-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/assessment/tcl/as-item-procs.tcl 13 Apr 2005 10:48:29 -0000 1.11 +++ openacs-4/packages/assessment/tcl/as-item-procs.tcl 13 Apr 2005 18:51:54 -0000 1.12 @@ -204,42 +204,29 @@ db_dml copy_types {} } -ad_proc -private as::item::mc_type { +ad_proc -public as::item::item_data { -as_item_id:required } { - Return the type to determine if this is a multiple choice question - - Allow caching of the choice_orientation as it is unlikely to change. -} { - return [util_memoize [list as::item::mc_type_not_cached -as_item_id $as_item_id]] -} + @author Timo Hentschel (timo@timohentschel.de) + @creation-date 2005-04-13 -ad_proc -private as::item::mc_type_not_cached { - -as_item_id:required + Return cached item data } { - Return the type to determine if this is a multiple choice question - -} { - return [db_string item_type_id {} -default "nmc"] + return [util_memoize [list as::item::item_data_not_cached -as_item_id $as_item_id]] } -ad_proc -private as::item::get_choice_orientation { +ad_proc -private as::item::item_data_not_cached { -as_item_id:required - -presentation_type:required } { - Return the orientation for choices. - - Allow caching of the choice_orientation as it is unlikely to change. -} { - return [util_memoize [list as::item::get_choice_orientation_not_cached -as_item_id $as_item_id -presentation_type $presentation_type]] -} + @author Timo Hentschel (timo@timohentschel.de) + @creation-date 2005-04-08 -ad_proc -private as::item::get_choice_orientation_not_cached { - -as_item_id:required - -presentation_type:required + Gets the item type and display } { - Return the orientation for choices - -} { - return [db_string get_choice_orientation ""] -} \ No newline at end of file + db_1row item_properties {} -column_array item + + set item(item_type) [string range $item(item_type) end-1 end] + set item(display_type) [string range $item(display_type) end-1 end] + + return [array get item] +}