--- loncom/interface/loncommon.pm 2004/04/30 23:04:53 1.190 +++ loncom/interface/loncommon.pm 2004/05/03 16:07:18 1.191 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.190 2004/04/30 23:04:53 albertel Exp $ +# $Id: loncommon.pm,v 1.191 2004/05/03 16:07:18 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -907,21 +907,27 @@ sub domain_select { } &get_domains; if ($multiple) { $domains{''}=&mt('Any domain'); - return &multiple_select_form($name,$value,%domains); + return &multiple_select_form($name,$value,4,%domains); } else { return &select_form($name,$value,%domains); } } sub multiple_select_form { - my ($name,$value,%hash)=@_; + my ($name,$value,$size,%hash)=@_; my %selected = map { $_ => 1 } ref($value)?@{$value}:($value); my $output=''; - my $size =(scalar keys %hash<4?scalar keys %hash:4); + if (! defined($size)) { + $size = 4; + if (scalar(keys(%hash))<4) { + $size = scalar(keys(%hash)); + } + } $output.="\n\n"; return $output;