--- loncom/interface/loncommon.pm 2007/04/05 21:36:15 1.519 +++ loncom/interface/loncommon.pm 2007/05/13 06:34:42 1.534 @@ -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.534 2007/05/13 06:34:42 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 { @@ -1467,6 +1467,8 @@ sub home_server_option_list { =pod +=back + =cut ############################################################### @@ -2912,7 +2914,7 @@ sub blockcheck { } my $no_ownblock = 0; my $no_userblock = 0; - if ($otheruser) { + if ($otheruser && $activity ne 'com') { # Check if current user has 'evb' priv for this if (defined($own_courses{$course})) { foreach my $sec (keys(%{$own_courses{$course}})) { @@ -3165,7 +3167,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 +3250,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 ''.$domain.''; @@ -3290,11 +3292,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 +3377,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 +3413,7 @@ sub bodytag { my $bodytag = "". &Apache::lontexconvert::init_math_support(); - if ($bodyonly - || ($env{'request.state'} eq 'construct' - && $env{'environment.remote'} ne 'off' )) { + if ($bodyonly) { return $bodytag; } elsif ($env{'browser.interface'} eq 'textual') { # Accessibility @@ -3682,20 +3690,18 @@ sub standard_css { my $border = ($env{'browser.type'} eq 'explorer') ? '0px 2px 0px 2px' : '0px 3px 0px 4px'; + return <