--- loncom/interface/loncommon.pm 2007/04/05 21:36:15 1.519
+++ loncom/interface/loncommon.pm 2007/05/02 01:33:48 1.532
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.519 2007/04/05 21:36:15 raeburn Exp $
+# $Id: loncommon.pm,v 1.532 2007/05/02 01:33:48 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -240,7 +240,7 @@ Inputs: formname, elementname
formname and elementname specify the name of the html form and the name
of the element the selection from the search results will be placed in.
-
+=back
=cut
sub browser_and_searcher_javascript {
@@ -3165,7 +3165,7 @@ Returns: Determines which domain should
###############################################
sub determinedomain {
my $domain=shift;
- if (! $domain) {
+ if (! $domain) {
# Determine domain if we have not been given one
$domain = $Apache::lonnet::perlvar{'lonDefDomain'};
if ($env{'user.domain'}) { $domain=$env{'user.domain'}; }
@@ -3248,7 +3248,7 @@ sub domainlogo {
# See if there is a logo
if ($designhash{$domain.'.login.domlogo'} ne '') {
my $imgsrc = $designhash{$domain.'.login.domlogo'};
- if ($imgsrc =~ /^\/adm/) {
+ if ($imgsrc =~ /^\/(adm|res)/) {
$imgsrc = &lonhttpdurl($imgsrc);
}
return '';
@@ -3290,11 +3290,19 @@ sub designparm {
}
$domain=&determinedomain($domain);
my %domdesign = &get_domainconf($domain);
+ my $output;
if ($domdesign{$domain.'.'.$which} ne '') {
- return $domdesign{$domain.'.'.$which};
+ $output = $domdesign{$domain.'.'.$which};
} else {
- return $defaultdesign{$which};
+ $output = $defaultdesign{$which};
}
+ if (($which =~ /^(student|coordinator|author|admin)\.img$/) ||
+ ($which =~ /login\.(img|logo|domlogo)/)) {
+ if ($output =~ /^\/(adm|res)\//) {
+ $output = &lonhttpdurl($output);
+ }
+ }
+ return $output;
}
###############################################
@@ -3367,7 +3375,7 @@ sub bodytag {
my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain);
my %design = ( 'style' => 'margin-top: 0px',
- 'bgcolor' => $pgbg,
+ 'bgcolor' => '#ffffff',
'text' => $font,
'alink' => &designparm($function.'.alink',$domain),
'vlink' => &designparm($function.'.vlink',$domain),
@@ -3403,9 +3411,7 @@ sub bodytag {
my $bodytag = "