Index: openacs-4/packages/workflow/tcl/role-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/role-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/workflow/tcl/role-procs.tcl 13 Jan 2004 12:36:47 -0000 1.16 +++ openacs-4/packages/workflow/tcl/role-procs.tcl 22 Jan 2004 09:53:20 -0000 1.17 @@ -274,17 +274,26 @@ ad_proc -public workflow::role::get_options { {-workflow_id:required} + {-id_values:boolean} } { Get a list of roles in a workflow for use in the 'options' property of a form builder form element. + @param id_values Provide this switch if you want the values in the options list to be role id:s instead + of short names. + + @author Lars Pind (lars@collaboraid.biz) } { set result [list] # workflow::get_roles returns the roles in sort_order foreach role_id [workflow::get_roles -workflow_id $workflow_id] { workflow::role::get -role_id $role_id -array row - lappend result [list $row(pretty_name) $row(short_name)] + if { $id_values_p } { + lappend result [list $row(pretty_name) $role_id] + } else { + lappend result [list $row(pretty_name) $row(short_name)] + } } return $result }