version 1.144, 2003/11/07 21:04:37
|
version 1.152, 2003/11/10 23:25:52
|
Line 1499 sub languagedescription {
|
Line 1499 sub languagedescription {
|
($supported_language{$code}?' ('.&mt('interface available').')':''); |
($supported_language{$code}?' ('.&mt('interface available').')':''); |
} |
} |
|
|
|
sub plainlanguagedescription { |
|
my $code=shift; |
|
return $language{$code}; |
|
} |
|
|
|
sub supportedlanguagecode { |
|
my $code=shift; |
|
return $supported_language{$code}; |
|
} |
|
|
=pod |
=pod |
|
|
=item * copyrightids() |
=item * copyrightids() |
Line 1997 sub domainlogo {
|
Line 2007 sub domainlogo {
|
my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; |
my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; |
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } |
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } |
return '<img src="http://'.$ENV{'HTTP_HOST'}.':'.$lonhttpdPort. |
return '<img src="http://'.$ENV{'HTTP_HOST'}.':'.$lonhttpdPort. |
'/adm/lonDomLogos/'.$domain.'.gif" />'; |
'/adm/lonDomLogos/'.$domain.'.gif" alt="'.$domain.'" />'; |
} elsif(exists($Apache::lonnet::domaindescription{$domain})) { |
} elsif(exists($Apache::lonnet::domaindescription{$domain})) { |
return $Apache::lonnet::domaindescription{$domain}; |
return $Apache::lonnet::domaindescription{$domain}; |
} else { |
} else { |
Line 2108 sub bodytag {
|
Line 2118 sub bodytag {
|
my $sidebg=&designparm($function.'.sidebg',$domain); |
my $sidebg=&designparm($function.'.sidebg',$domain); |
# Accessibility font enhance |
# Accessibility font enhance |
unless ($addentries) { $addentries=''; } |
unless ($addentries) { $addentries=''; } |
|
my $addstyle=''; |
if ($ENV{'browser.fontenhance'} eq 'on') { |
if ($ENV{'browser.fontenhance'} eq 'on') { |
$addentries.=' style="font-size: x-large"'; |
$addstyle=' font-size: x-large;'; |
} |
} |
# role and realm |
# role and realm |
my ($role,$realm) |
my ($role,$realm) |
Line 2127 sub bodytag {
|
Line 2138 sub bodytag {
|
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } |
if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } |
# construct main body tag |
# construct main body tag |
my $bodytag = <<END; |
my $bodytag = <<END; |
|
<style> |
|
h1, h2, h3, th { font-family: Arial, Helvetica, sans-serif } |
|
a:hover { color: black; background: yellow } |
|
a:focus { color: red; background: yellow } |
|
</style> |
<body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link" |
<body bgcolor="$pgbg" text="$font" alink="$alink" vlink="$vlink" link="$link" |
$addentries> |
style="margin-top: 0px;$addstyle" $addentries> |
END |
END |
my $upperleft='<img src="http://'.$ENV{'HTTP_HOST'}.':'. |
my $upperleft='<img src="http://'.$ENV{'HTTP_HOST'}.':'. |
$lonhttpdPort.$img.'" />'; |
$lonhttpdPort.$img.'" alt="'.$function.'" />'; |
if ($bodyonly) { |
if ($bodyonly) { |
return $bodytag; |
return $bodytag; |
} elsif ($ENV{'browser.interface'} eq 'textual') { |
} elsif ($ENV{'browser.interface'} eq 'textual') { |
Line 2143 END
|
Line 2159 END
|
# No Remote |
# No Remote |
return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web', |
return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web', |
$forcereg). |
$forcereg). |
'<table bgcolor="'.$pgbg.'" width="100%" border="0" cellspacing="3" cellpadding="3"><tr><td bgcolor="'.$tabbg.'"><font size="+3" color="'.$font.'"><b>'.$title. |
'<table bgcolor="'.$pgbg.'" width="100%" border="0" cellspacing="3" cellpadding="3"><tr><td bgcolor="'.$tabbg.'"><font face="Arial, Helvetica, sans-serif" size="+3" color="'.$font.'"><b>'.$title. |
'</b></font></td></tr></table>'; |
'</b></font></td></tr></table>'; |
} |
} |
|
|
Line 2159 $upperleft</td>
|
Line 2175 $upperleft</td>
|
</tr> |
</tr> |
<tr> |
<tr> |
<td rowspan="3" bgcolor="$tabbg"> |
<td rowspan="3" bgcolor="$tabbg"> |
<font size="5"><b>$title</b></font> |
<font size="5" face="Arial, Helvetica, sans-serif"><b>$title</b></font> |
<td bgcolor="$tabbg" align="right"> |
<td bgcolor="$tabbg" align="right"> |
<font size="2"> |
<font size="2" face="Arial, Helvetica, sans-serif"> |
$ENV{'environment.firstname'} |
$ENV{'environment.firstname'} |
$ENV{'environment.middlename'} |
$ENV{'environment.middlename'} |
$ENV{'environment.lastname'} |
$ENV{'environment.lastname'} |
Line 2170 $upperleft</td>
|
Line 2186 $upperleft</td>
|
</td> |
</td> |
</tr> |
</tr> |
<tr><td bgcolor="$tabbg" align="right"> |
<tr><td bgcolor="$tabbg" align="right"> |
<font size="2">$role</font> |
<font size="2" face="Arial, Helvetica, sans-serif">$role</font> |
</td></tr> |
</td></tr> |
<tr> |
<tr> |
<td bgcolor="$tabbg" align="right"><font size="2">$realm</font> </td></tr> |
<td bgcolor="$tabbg" align="right"><font size="2" face="Arial, Helvetica, sans-serif">$realm</font> </td></tr> |
</table><br> |
</table><br> |
ENDBODY |
ENDBODY |
} |
} |
Line 2350 sub add_to_env {
|
Line 2366 sub add_to_env {
|
|
|
=pod |
=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 |
=back |
|
|
=head1 CSV Upload/Handling functions |
=head1 CSV Upload/Handling functions |
Line 2703 the routine &Apache::lonnet::transfer_pr
|
Line 2745 the routine &Apache::lonnet::transfer_pr
|
|
|
############################################################ |
############################################################ |
############################################################ |
############################################################ |
|
my $uniq=0; |
sub get_cgi_id { |
sub get_cgi_id { |
return (time.'_'.int(rand(1000))); |
$uniq=($uniq++)%100000; |
|
return (time.'_'.$uniq); |
} |
} |
|
|
############################################################ |
############################################################ |