--- loncom/interface/loncommon.pm 2003/11/10 01:58:29 1.146 +++ loncom/interface/loncommon.pm 2003/11/10 23:25:52 1.152 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.146 2003/11/10 01:58:29 www Exp $ +# $Id: loncommon.pm,v 1.152 2003/11/10 23:25:52 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2007,7 +2007,7 @@ sub domainlogo { my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } return ''; + '/adm/lonDomLogos/'.$domain.'.gif" alt="'.$domain.'" />'; } elsif(exists($Apache::lonnet::domaindescription{$domain})) { return $Apache::lonnet::domaindescription{$domain}; } else { @@ -2139,15 +2139,15 @@ sub bodytag { # construct main body tag my $bodytag = < -h1, h2, h3, th, a { font-family: Arial, Helvetica, sans-serif } +h1, h2, h3, th { font-family: Arial, Helvetica, sans-serif } a:hover { color: black; background: yellow } a:focus { color: red; background: yellow } +style="margin-top: 0px;$addstyle" $addentries> END my $upperleft=''; + $lonhttpdPort.$img.'" alt="'.$function.'" />'; if ($bodyonly) { return $bodytag; } elsif ($ENV{'browser.interface'} eq 'textual') { @@ -2159,7 +2159,7 @@ END # No Remote return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web', $forcereg). - '$role  - +
'.$title. + '
'.$title. '
'; } @@ -2189,7 +2189,7 @@ $upperleft
$realm 
$realm 

ENDBODY } @@ -2366,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 @@ -2719,9 +2745,10 @@ the routine &Apache::lonnet::transfer_pr ############################################################ ############################################################ - +my $uniq=0; sub get_cgi_id { - return (time.'_'.int(rand(1000))); + $uniq=($uniq++)%100000; + return (time.'_'.$uniq); } ############################################################