--- loncom/interface/lonwhatsnew.pm 2005/12/15 13:38:58 1.38 +++ loncom/interface/lonwhatsnew.pm 2005/12/22 22:39:49 1.38.2.2 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.38 2005/12/15 13:38:58 raeburn Exp $ +# $Id: lonwhatsnew.pm,v 1.38.2.2 2005/12/22 22:39:49 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -109,7 +109,9 @@ sub handler { sub display_main_box { my ($r,$command,$checkallowed) = @_; my $domain=&Apache::loncommon::determinedomain(); - my $tabbg=&Apache::loncommon::designparm('coordinator.tabbg',$domain); + my $function = &Apache::loncommon::get_users_function(); + my $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain); + $r->print('
');
my %threshold_titles = (
@@ -136,8 +138,8 @@ sub display_main_box {
(&Apache::lonnet::allowed('opa',$env{'request.course.id'}))) {
&display_interval_config($r,\%interval_titles);
} else {
- &display_actions_box($r,$command,\%threshold_titles,\%interval_titles,
- $cdom,$crs,$checkallowed);
+ &display_actions_box($r,$tabbg,$command,\%threshold_titles,
+ \%interval_titles,$cdom,$crs,$checkallowed);
}
$r->print(< '); return; @@ -794,9 +788,8 @@ sub get_curr_interval { my $interval; my %settings = &Apache::lonnet::dump('nohist_whatsnew',$uname,$udom,$cid,':interval'); my ($tmp) = %settings; - if ($tmp =~ /^Error/) { - &logthis(); - } else { + + unless ($tmp =~ /^(con_lost|error|no_such_host)/i) { $interval = $settings{$cid.':interval'}; } return $interval; @@ -937,11 +930,8 @@ sub checkversions { my ($cdom,$crs,$navmap,$changed,$starttime) = @_; my %changes=&Apache::lonnet::dump('versionupdate',$cdom,$crs); my ($tmp) = keys(%changes); - if ($tmp =~/^error\:/) { - &Apache::lonnet::logthis('Error retrieving version update information: '. - $tmp.' for '.$cdom.'_'.$crs.' in whatsnew'); - } else { - if (keys(%changes) > 0) { + unless ($tmp =~ /^(con_lost|error|no_such_host)/i) { + if (keys(%changes) > 0) { foreach my $key (sort(keys(%changes))) { if ($changes{$key} > $starttime) { my $version; @@ -1223,12 +1213,14 @@ sub get_display_settings { my ($uname,$udom,$cid) = @_; my %settings = &Apache::lonnet::dump('nohist_whatsnew',$udom,$uname,$cid); my ($tmp) = keys(%settings); - if ($tmp=~/^error:/) { + if ($tmp=~/^(con_lost|error|no_such_host)/i) { %settings = (); - unless ($tmp eq 'error: 2 tie(GDBM) Failed while attempting dump') { - &logthis('Error retrieving whatsnew settings: '.$tmp.' for '. - $uname.':'.$udom.' for course: '.$cid); - } + unless ($tmp =~ /^error: 2 /) { + &Apache::lonnet::logthis('Error retrieving whatsnew settings: '. + $tmp.' for '.$uname.':'.$udom. + ' for course: '.$cid); + + } } return %settings; } |