version 1.251, 2004/03/08 17:31:37
|
version 1.254, 2004/03/17 16:28:23
|
Line 381 sub getDescription {
|
Line 381 sub getDescription {
|
# Convenience function, so others can use it: Is the problem due in less then |
# Convenience function, so others can use it: Is the problem due in less then |
# 24 hours, and still can be done? |
# 24 hours, and still can be done? |
|
|
sub dueInLessThen24Hours { |
sub dueInLessThan24Hours { |
my $res = shift; |
my $res = shift; |
my $part = shift; |
my $part = shift; |
my $status = $res->status($part); |
my $status = $res->status($part); |
Line 1011 sub render_communication_status {
|
Line 1011 sub render_communication_status {
|
|
|
if ($resource->getErrors()) { |
if ($resource->getErrors()) { |
my $errors = $resource->getErrors(); |
my $errors = $resource->getErrors(); |
|
my $errorcount = 0; |
foreach (split(/,/, $errors)) { |
foreach (split(/,/, $errors)) { |
|
last if ($errorcount>=10); # Only output 10 bombs maximum |
if ($_) { |
if ($_) { |
|
$errorcount++; |
$errorHTML .= ' <a href="/adm/email?display=' |
$errorHTML .= ' <a href="/adm/email?display=' |
. &Apache::lonnet::escape($_) . '">' |
. &Apache::lonnet::escape($_) . '">' |
. '<img src="/adm/lonMisc/bomb.gif" ' |
. '<img src="/adm/lonMisc/bomb.gif" ' |
Line 1064 sub render_long_status {
|
Line 1067 sub render_long_status {
|
if ($resource->is_problem()) { |
if ($resource->is_problem()) { |
$color = $colormap{$resource->status}; |
$color = $colormap{$resource->status}; |
|
|
if (dueInLessThen24Hours($resource, $part) || |
if (dueInLessThan24Hours($resource, $part) || |
lastTry($resource, $part)) { |
lastTry($resource, $part)) { |
$color = $hurryUpColor; |
$color = $hurryUpColor; |
} |
} |
Line 1126 sub render_parts_summary_status {
|
Line 1129 sub render_parts_summary_status {
|
|
|
# If there is a single part, just show the simple status |
# If there is a single part, just show the simple status |
if ($resource->singlepart()) { |
if ($resource->singlepart()) { |
my $status = $resource->simpleStatus('0'); |
my $status = $resource->simpleStatus(${$resource->parts}[0]); |
return $td . "<font color='" . $statusColors{$status} . "'>" |
return $td . "<font color='" . $statusColors{$status} . "'>" |
. $statusStrings{$status} . "</font>" . $endtd; |
. $statusStrings{$status} . "</font>" . $endtd; |
} |
} |