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

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


bowersj2		Fri Oct  4 11:35:26 2002 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Return header to top of the screen.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.63 loncom/interface/lonnavmaps.pm:1.64
--- loncom/interface/lonnavmaps.pm:1.63	Thu Oct  3 15:40:33 2002
+++ loncom/interface/lonnavmaps.pm	Fri Oct  4 11:35:26 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.63 2002/10/03 19:40:33 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.64 2002/10/04 15:35:26 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -819,9 +819,6 @@
     &Apache::loncommon::no_cache($r);
     $r->send_http_header;
 
-    # Header
-    $r->print(&Apache::loncommon::bodytag('Navigate Course Map','',
-                                          ''));
     # Initialize the nav map
     my $navmap = Apache::lonnavmaps::navmap->new(
                         $ENV{"request.course.fn"}.".db",
@@ -833,6 +830,23 @@
         $ENV{'user.error.msg'} = "$requrl:bre:0:0:Course not initialized";
         return HTTP_NOT_ACCEPTABLE;
     }
+
+    # Header
+    $r->print(&Apache::loncommon::bodytag('Navigate Course Map','',
+                                          ''));
+    $r->print('<script>window.focus();</script>');
+    my $desc=$ENV{'course.'.$ENV{'request.course.id'}.'.description'};
+    if (defined($desc)) { $r->print("<h2>$desc</h2>\n"); }
+    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 (($currenturl=~/^\/res/) &&
+    #    ($currenturl!~/^\/res\/adm/)) {
+    #    $r->print('<a href="#curloc">Current Location</a><p>');
+    #}
 
     # Check that it's defined
     if (!($navmap->courseMapDefined())) {