[LON-CAPA-cvs] cvs: loncom /interface lonaboutme.pm lonbulletin.pm loncommon.pm lonmenu.pm lonnavmaps.pm lonsimplepage.pm lonsyllabus.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 03 Mar 2003 13:03:58 -0000


This is a MIME encoded message

--www1046696638
Content-Type: text/plain

www		Mon Mar  3 08:03:58 2003 EDT

  Modified files:              
    /loncom/interface	lonaboutme.pm lonbulletin.pm loncommon.pm 
                     	lonmenu.pm lonnavmaps.pm lonsimplepage.pm 
                     	lonsyllabus.pm 
  Log:
  Work on textbased menus: "forward", "back", etc, on Syllabus, NavMaps, ...
  
  
--www1046696638
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030303080358.txt"

Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.13 loncom/interface/lonaboutme.pm:1.14
--- loncom/interface/lonaboutme.pm:1.13	Fri Feb 28 11:16:59 2003
+++ loncom/interface/lonaboutme.pm	Mon Mar  3 08:03:58 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "About Me" Personal Information
 #
-# $Id: lonaboutme.pm,v 1.13 2003/02/28 16:16:59 www Exp $
+# $Id: lonaboutme.pm,v 1.14 2003/03/03 13:03:58 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -50,7 +50,7 @@
     my (undef,undef,$cdom,$cnum)=split(/\//,$r->uri);
 # Is this even a user?
     if (&Apache::lonnet::homeserver($cnum,$cdom) eq 'no_host') {
-	$r->print('<body>No user information available</body>');
+	$r->print('</head><body>No user information available</body></html>');
         return OK;
     }
 # --------------------------------------------------------- The syllabus fields
@@ -76,7 +76,8 @@
 # --------------------------------------- There is such a user, get environment
     my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
     $r->print('</head>'.&Apache::loncommon::bodytag
-                  ("Personal Information",$forcestudent,$addentries,'',$cdom));
+                  ("Personal Information",$forcestudent,$addentries,'',$cdom,
+                   $ENV{'form.register'}));
     $r->print('<h1>'.&Apache::loncommon::plainname($cnum,$cdom).'</h1>');
     if ($courseenv{'nickname'}) {
        $r->print(
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.7 loncom/interface/lonbulletin.pm:1.8
--- loncom/interface/lonbulletin.pm:1.7	Fri Feb 28 11:16:59 2003
+++ loncom/interface/lonbulletin.pm	Mon Mar  3 08:03:58 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Bulletin Board Handler
 #
-# $Id: lonbulletin.pm,v 1.7 2003/02/28 16:16:59 www Exp $
+# $Id: lonbulletin.pm,v 1.8 2003/03/03 13:03:58 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -51,7 +51,7 @@
     my (undef,undef,undef,undef,$marker)=split(/\//,$r->uri);
 # Is this even in a course?
     unless ($ENV{'request.course.id'}) {
-	$r->print('<body>Not in a course</body>');
+	$r->print('</head><body>Not in a course</body></html>');
         return OK;
     }
 
@@ -90,7 +90,8 @@
 # --------------------------------------- There is such a user, get environment
 
     $r->print('</head>'.&Apache::loncommon::bodytag
-            ("Bulletin Board/Discussion",$forcestudent,$addentries,'',$dom));
+            ("Bulletin Board/Discussion",$forcestudent,$addentries,'',$dom,
+             $ENV{'form.register'}));
 
     my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});
 
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.85 loncom/interface/loncommon.pm:1.86
--- loncom/interface/loncommon.pm:1.85	Tue Feb 25 16:54:14 2003
+++ loncom/interface/loncommon.pm	Mon Mar  3 08:03:58 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.85 2003/02/25 21:54:14 albertel Exp $
+# $Id: loncommon.pm,v 1.86 2003/03/03 13:03:58 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1530,6 +1530,8 @@
  $addentries, extra parameters for the <body> tag.
  $bodyonly, if defined, only return the <body> tag.
  $domain, if defined, force a given domain.
+ $forcereg, if page should register as content page (relevant for 
+            text interface only)
 
 Returns: A uniform header for LON-CAPA web pages.  
 If $bodyonly is nonzero, a string containing a <body> tag will be returned.
@@ -1543,7 +1545,7 @@
 
 ###############################################
 sub bodytag {
-    my ($title,$function,$addentries,$bodyonly,$domain)=@_;
+    my ($title,$function,$addentries,$bodyonly,$domain,$forcereg)=@_;
     unless ($function) {
 	$function='student';
         if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {
@@ -1587,7 +1589,8 @@
     if ($bodyonly) {
         return $bodytag;
     } elsif ($ENV{'browser.interface'} eq 'textual') {
-        return $bodytag.&Apache::lonmenu::menubuttons(undef,'web').
+        return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web',
+                                                      $forcereg).
                '<h1>LON-CAPA: '.$title.'</h1>';
     } else {
         return(<<ENDBODY);
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.44 loncom/interface/lonmenu.pm:1.45
--- loncom/interface/lonmenu.pm:1.44	Thu Feb 20 17:04:18 2003
+++ loncom/interface/lonmenu.pm	Mon Mar  3 08:03:58 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.44 2003/02/20 22:04:18 www Exp $
+# $Id: lonmenu.pm,v 1.45 2003/03/03 13:03:58 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -70,7 +70,7 @@
     my $result = '';
     
     if ($target eq 'edit') {
-        $result .="<script type=\"text/javascrtipt\">\n".
+        $result .="<script type=\"text/javascript\">\n".
             "if (typeof swmenu != 'undefined') {swmenu.currentURL=null;}\n".
             &Apache::loncommon::browser_and_searcher_javascript().
                 "\n</script>\n";
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.150 loncom/interface/lonnavmaps.pm:1.151
--- loncom/interface/lonnavmaps.pm:1.150	Fri Feb 28 11:16:59 2003
+++ loncom/interface/lonnavmaps.pm	Mon Mar  3 08:03:58 2003
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.150 2003/02/28 16:16:59 www Exp $
+# $Id: lonnavmaps.pm,v 1.151 2003/03/03 13:03:58 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -167,7 +167,7 @@
     # Header
     $r->print('</head>'.
               &Apache::loncommon::bodytag('Navigate Course Contents','',
-                                          $addentries));
+                                    $addentries,'','',$ENV{'form.register'}));
     $r->print('<script>window.focus();</script>');
 
     $r->rflush();
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.7 loncom/interface/lonsimplepage.pm:1.8
--- loncom/interface/lonsimplepage.pm:1.7	Fri Feb 28 11:16:59 2003
+++ loncom/interface/lonsimplepage.pm	Mon Mar  3 08:03:58 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.7 2003/02/28 16:16:59 www Exp $
+# $Id: lonsimplepage.pm,v 1.8 2003/03/03 13:03:58 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -50,7 +50,7 @@
     my (undef,undef,undef,undef,$marker)=split(/\//,$r->uri);
 # Is this even in a course?
     unless ($ENV{'request.course.id'}) {
-	$r->print('<body>Not in a course</body>');
+	$r->print('</head><body>Not in a course</body></html>');
         return OK;
     }
 
@@ -91,7 +91,7 @@
 # --------------------------------------- There is such a user, get environment
 
     $r->print('</head>'.&Apache::loncommon::bodytag
-            ("Course Page",$forcestudent,$addentries,'',$dom));
+      ("Course Page",$forcestudent,$addentries,'',$dom,$ENV{'form.register'}));
 
     my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});
 
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.14 loncom/interface/lonsyllabus.pm:1.15
--- loncom/interface/lonsyllabus.pm:1.14	Fri Feb 28 11:16:59 2003
+++ loncom/interface/lonsyllabus.pm	Mon Mar  3 08:03:58 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.14 2003/02/28 16:16:59 www Exp $
+# $Id: lonsyllabus.pm,v 1.15 2003/03/03 13:03:58 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -51,7 +51,7 @@
 # Is this even a course?
     my $homeserver=&Apache::lonnet::homeserver($cnum,$cdom); 
     if ($homeserver eq 'no_host') {
-	$r->print('<body>No syllabus available</body>');
+	$r->print('</head><body>No syllabus available</body></html>');
         return OK;
     }
 # --------------------------------------------------------- The syllabus fields
@@ -89,7 +89,7 @@
 # ------------------------------------- There is such a course, get environment
     my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum);
     $r->print('</head>'.&Apache::loncommon::bodytag
-                             ("Syllabus",$forcestudent,$addentries,'',$cdom));
+       ("Syllabus",$forcestudent,$addentries,'',$cdom,$ENV{'form.register'}));
     $r->print('<h1>'.$courseenv{'description'}.'</h1><h3>'.
               $Apache::lonnet::domaindescription{$cdom}.'</h3>');
     my %syllabus=&Apache::lonnet::dump('syllabus',$cdom,$cnum);

--www1046696638--