--- loncom/interface/loncommon.pm 2003/11/08 01:45:26 1.145 +++ loncom/interface/loncommon.pm 2003/11/10 16:33:57 1.149 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.145 2003/11/08 01:45:26 www Exp $ +# $Id: loncommon.pm,v 1.149 2003/11/10 16:33:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2118,8 +2118,9 @@ sub bodytag { my $sidebg=&designparm($function.'.sidebg',$domain); # Accessibility font enhance unless ($addentries) { $addentries=''; } + my $addstyle=''; if ($ENV{'browser.fontenhance'} eq 'on') { - $addentries.=' style="font-size: x-large"'; + $addstyle=' font-size: x-large;'; } # role and realm my ($role,$realm) @@ -2137,8 +2138,13 @@ sub bodytag { if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } # construct main body tag my $bodytag = < +h1, h2, h3, th { font-family: Arial, Helvetica, sans-serif } +a:hover { color: black; background: yellow } +a:focus { color: red; background: yellow } + +style="border-color: $tabbg; border-width: 4px; border-style: solid; padding: 4px;$addstyle" $addentries> END my $upperleft=''; @@ -2169,9 +2175,9 @@ $upperleft - $title - -$title + + $ENV{'environment.firstname'} $ENV{'environment.middlename'} $ENV{'environment.lastname'} @@ -2180,10 +2186,10 @@ $upperleft -$role  +$role  -$realm  +$realm 
ENDBODY } @@ -2360,6 +2366,32 @@ sub add_to_env { =pod +=item * get_env_multiple($name) + +gets $name from the %ENV hash, it seemlessly handles the cases where multiple +values may be defined and end up as an array ref. + +returns an array of values + +=cut + +sub get_env_multiple { + my ($name) = @_; + my @values; + if (defined($ENV{$name})) { + # exists is it an array + if (ref($ENV{$name})) { + @values=@{ $ENV{$name} }; + } else { + $values[0]=$ENV{$name}; + } + } + return(@values); +} + + +=pod + =back =head1 CSV Upload/Handling functions