version 1.85, 2002/10/24 18:38:26
|
version 1.87, 2002/10/28 13:58:58
|
Line 876 sub new_handle {
|
Line 876 sub new_handle {
|
$res->NOTHING_SET => '' ); |
$res->NOTHING_SET => '' ); |
# And a special case in the nav map; what to do when the assignment |
# And a special case in the nav map; what to do when the assignment |
# is not yet done and due in less then 24 hours |
# is not yet done and due in less then 24 hours |
my $hurryUpColor = "#FFCCCC"; |
my $hurryUpColor = "#FF0000"; |
|
|
my %statusIconMap = |
my %statusIconMap = |
( $res->NETWORK_FAILURE => '', |
( $res->NETWORK_FAILURE => '', |
Line 1153 sub new_handle {
|
Line 1153 sub new_handle {
|
} |
} |
|
|
my $colorizer = ""; |
my $colorizer = ""; |
|
my $color; |
if ($curRes->is_problem()) { |
if ($curRes->is_problem()) { |
my $status = $curRes->status($part); |
my $status = $curRes->status($part); |
my $color = $colormap{$status}; |
$color = $colormap{$status}; |
|
|
# Special case in the navmaps: If in less then |
# Special case in the navmaps: If in less then |
# 24 hours, give it a bit of urgency |
# 24 hours, give it a bit of urgency |
if ($status == $curRes->OPEN() && $curRes->duedate() && |
if (($status == $curRes->OPEN() || $status == $curRes->ATTEMPTED() || |
|
$status == $curRes->TRIES_LEFT()) |
|
&& $curRes->duedate() && |
$curRes->duedate() < time()+(24*60*60) && |
$curRes->duedate() < time()+(24*60*60) && |
$curRes->duedate() > time()) { |
$curRes->duedate() > time()) { |
$color = $hurryUpColor; |
$color = $hurryUpColor; |
Line 1259 sub new_handle {
|
Line 1262 sub new_handle {
|
} |
} |
|
|
# FOURTH COL: Text description |
# FOURTH COL: Text description |
$r->print("<td $colorizer align=\"right\" valign=\"center\">\n"); |
#$r->print("<td $colorizer align=\"right\" valign=\"center\">\n"); |
|
$r->print("<td align=\"right\" valign=\"center\">\n"); |
|
|
if ($curRes->kind() eq "res" && |
if ($curRes->kind() eq "res" && |
$curRes->is_problem() && |
$curRes->is_problem() && |
!$firstDisplayed) { |
!$firstDisplayed) { |
|
$r->print ("<font color=\"$color\"><b>") if ($color); |
$r->print (getDescription($curRes, $part)); |
$r->print (getDescription($curRes, $part)); |
|
$r->print ("</b></font>") if ($color); |
} |
} |
if ($curRes->is_map() && advancedUser() && $curRes->randompick()) { |
if ($curRes->is_map() && advancedUser() && $curRes->randompick()) { |
$r->print('(randomly select ' . $curRes->randompick() .')'); |
$r->print('(randomly select ' . $curRes->randompick() .')'); |
Line 2916 sub getNext {
|
Line 2922 sub getNext {
|
|
|
sub getPrevious { |
sub getPrevious { |
my $self = shift; |
my $self = shift; |
my @alreadySeen = shift; |
my $alreadySeenHash = shift; |
my @branches; |
my @branches; |
my $from = $self->from(); |
my $from = $self->from(); |
foreach my $branch ( split /,/, $from) { |
foreach my $branch ( split /,/, $from) { |
Line 2928 sub getPrevious {
|
Line 2934 sub getPrevious {
|
# browse privs |
# browse privs |
my $browsePriv = &Apache::lonnet::allowed('bre', $self->src); |
my $browsePriv = &Apache::lonnet::allowed('bre', $self->src); |
if (!defined($alreadySeenHash) || |
if (!defined($alreadySeenHash) || |
!defined($alreadySeenHash->{$next->{ID}}) || |
!defined($alreadySeenHash->{$prev->{ID}}) || |
($browsePriv ne '2' && $browsePriv ne 'F')) { |
($browsePriv ne '2' && $browsePriv ne 'F')) { |
push @branches, $next; |
push @branches, $prev; |
} |
} |
} |
} |
return \@branches; |
return \@branches; |