--- loncom/interface/loncommon.pm 2005/11/01 20:47:15 1.281 +++ loncom/interface/loncommon.pm 2005/11/08 02:12:24 1.282 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.281 2005/11/01 20:47:15 albertel Exp $ +# $Id: loncommon.pm,v 1.282 2005/11/08 02:12:24 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1155,6 +1155,24 @@ sub domain_select { } } +#------------------------------------------- + +=pod + +=item * multiple_select_form($name,$value,$size,%hash) + +Returns a string containing a element + $value - sclara or array ref of values that should already be selected + $size - number of rows long the select element is + %hash - the elements should be 'option' => 'shown text' + (shown text should already have been &mt()) +=cut + +#------------------------------------------- sub multiple_select_form { my ($name,$value,$size,%hash)=@_; my %selected = map { $_ => 1 } ref($value)?@{$value}:($value);