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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Fri, 04 Oct 2002 15:38:22 -0000


bowersj2		Fri Oct  4 11:38:22 2002 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  If the user has never been in the course, don't try to display
  the 
  "New Discussions Since *date the user last logged on*"
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.64 loncom/interface/lonnavmaps.pm:1.65
--- loncom/interface/lonnavmaps.pm:1.64	Fri Oct  4 11:35:26 2002
+++ loncom/interface/lonnavmaps.pm	Fri Oct  4 11:38:22 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.64 2002/10/04 15:35:26 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.65 2002/10/04 15:38:22 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -840,9 +840,14 @@
     my $date=localtime;
     $r->print("<h3>$date</h3>\n");
     $r->rflush();
-    $r->print('<img src="/adm/lonMisc/chat.gif"> New discussion since '.
-	      timeToHumanString($navmap->{LAST_CHECK}).
-	      '<br><img src="/adm/lonMisc/feedback.gif"> New message (click to open)<p>'); 
+    if ($navmap->{LAST_CHECK}) {
+	$r->print('<img src="/adm/lonMisc/chat.gif"> New discussion since '.
+		  timeToHumanString($navmap->{LAST_CHECK}).
+		  '<br><img src="/adm/lonMisc/feedback.gif"> New message (click to open)<p>'); 
+    } else {
+	$r->print('<img src="/adm/lonMisc/chat.gif"> Discussions'.
+		  '<br><img src="/adm/lonMisc/feedback.gif"> New message (click to open)<p>'); 
+    }
     #if (($currenturl=~/^\/res/) &&
     #    ($currenturl!~/^\/res\/adm/)) {
     #    $r->print('<a href="#curloc">Current Location</a><p>');