[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm

raeburn raeburn at source.lon-capa.org
Fri Sep 26 13:56:02 EDT 2014


raeburn		Fri Sep 26 17:56:02 2014 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - Omit use of hurryupColor (and bold face) if user has only one try left
    when correctness feedback is suppressed. (change from rev 1.79)
  - Title where hurryupColor used when there is only one try left is now:
    'One try remaining!'.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.501 loncom/interface/lonnavmaps.pm:1.502
--- loncom/interface/lonnavmaps.pm:1.501	Fri May 30 13:48:39 2014
+++ loncom/interface/lonnavmaps.pm	Fri Sep 26 17:56:02 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.501 2014/05/30 13:48:39 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.502 2014/09/26 17:56:02 raeburn Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1140,12 +1140,17 @@
     my $info = '';
     if ($resource->is_problem() || $resource->is_practice()) {
         $color = $colormap{$resource->status};
-        
-        if (dueInLessThan24Hours($resource, $part) ||
-            lastTry($resource, $part)) {
+
+        if (dueInLessThan24Hours($resource, $part)) {
             $color = $hurryUpColor;
             $info = ' title="'.&mt('Due in less than 24 hours!').'"';
-        }
+        } elsif (lastTry($resource, $part)) {
+            unless (($resource->problemstatus($part) eq 'no') ||
+                    ($resource->problemstatus($part) eq 'no_feedback_ever')) {
+                $color = $hurryUpColor;
+                $info = ' title="'.&mt('One try remaining!').'"';
+            }
+         }
     }
     
     if ($resource->kind() eq "res" &&




More information about the LON-CAPA-cvs mailing list