[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Thu, 24 Oct 2002 19:10:07 -0000
bowersj2 Thu Oct 24 15:10:07 2002 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
Use font colors instead of cell background changes to indicate urgency
and unusual conditions. Show correct 24 urgency under a few more
problem statuses.
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.85 loncom/interface/lonnavmaps.pm:1.86
--- loncom/interface/lonnavmaps.pm:1.85 Thu Oct 24 14:38:26 2002
+++ loncom/interface/lonnavmaps.pm Thu Oct 24 15:10:07 2002
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.85 2002/10/24 18:38:26 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.86 2002/10/24 19:10:07 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -876,7 +876,7 @@
$res->NOTHING_SET => '' );
# 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
- my $hurryUpColor = "#FFCCCC";
+ my $hurryUpColor = "#FF0000";
my %statusIconMap =
( $res->NETWORK_FAILURE => '',
@@ -1153,13 +1153,16 @@
}
my $colorizer = "";
+ my $color;
if ($curRes->is_problem()) {
my $status = $curRes->status($part);
- my $color = $colormap{$status};
+ $color = $colormap{$status};
# Special case in the navmaps: If in less then
# 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()) {
$color = $hurryUpColor;
@@ -1259,12 +1262,15 @@
}
# 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" &&
$curRes->is_problem() &&
!$firstDisplayed) {
+ $r->print ("<font color=\"$color\"><b>") if ($color);
$r->print (getDescription($curRes, $part));
+ $r->print ("</b></font>") if ($color);
}
if ($curRes->is_map() && advancedUser() && $curRes->randompick()) {
$r->print('(randomly select ' . $curRes->randompick() .')');