[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages menu.html /interface lonmenu.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 04 Apr 2003 19:35:04 -0000


www		Fri Apr  4 14:35:04 2003 EDT

  Modified files:              
    /loncom/html/res/adm/pages	menu.html 
    /loncom/interface	lonmenu.pm 
  Log:
  Cannot post symb to NAV under the name of "symb", since that parameter is
  reserved for the symb of the resource you are looking at - lonacc chokes on
  that.
  
  
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.91 loncom/html/res/adm/pages/menu.html:1.92
--- loncom/html/res/adm/pages/menu.html:1.91	Wed Apr  2 19:52:21 2003
+++ loncom/html/res/adm/pages/menu.html	Fri Apr  4 14:35:04 2003
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.91 2003/04/03 00:52:21 www Exp $
+// $Id: menu.html,v 1.92 2003/04/04 19:35:04 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -287,7 +287,7 @@
       this.document.server.postdata.value=postdata;
       this.document.server.command.value='';
       this.document.server.url.value='';
-      this.document.server.symb.value='';
+      this.document.server.postsymb.value='';
       this.document.server.submit();
    }
 }
@@ -301,7 +301,7 @@
       this.document.server.postdata.value='';
       this.document.server.command.value=cmd;
       this.document.server.url.value=currentURL;
-      this.document.server.symb.value=currentSymb;
+      this.document.server.postsymb.value=currentSymb;
       this.document.server.submit();
    }
 }
@@ -542,7 +542,7 @@
 <input type="hidden" name="postdata" value="none" />
 <input type="hidden" name="command" value="none" />
 <input type="hidden" name="url" value="none" />
-<input type="hidden" name="symb" value="none" />
+<input type="hidden" name="postsymb" value="none" />
 </form>
 </font>
 </body>
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.54 loncom/interface/lonmenu.pm:1.55
--- loncom/interface/lonmenu.pm:1.54	Thu Apr  3 16:32:23 2003
+++ loncom/interface/lonmenu.pm	Fri Apr  4 14:35:04 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.54 2003/04/03 21:32:23 www Exp $
+# $Id: lonmenu.pm,v 1.55 2003/04/04 19:35:04 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -52,13 +52,22 @@
     my $forcereg=shift;
     my $target  =shift;
     my $registration=shift;
+    my $navmaps='';
+    my $escurl=&Apache::lonnet::escape($ENV{'REQUEST_URI'});
+    my $escsymb=&Apache::lonnet::escape($ENV{'request.symb'});
     if ($ENV{'browser.interface'} eq 'textual') {
 # Textual display only
+        if ($ENV{'request.course.id'}) {
+	    $navmaps=(<<ENDNAV);
+<a href="/adm/navmaps?postdata=$escurl&postsymb=$escsymb" target="_top">Navigate Contents</a>
+ENDNAV
+        }
 	my $output=(<<ENDMAINMENU);
 <script>
 // BEGIN LON-CAPA Internal
 </script>
-<a href="/adm/menu" target="_top">Main Menu</a><br />
+<a href="/adm/menu" target="_top">Main Menu</a>
+$navmaps<br />
 <script>
 // END LON-CAPA Internal
 </script>
@@ -67,13 +76,18 @@
 	return $output."<hr />";
     } elsif ($ENV{'environment.remote'} eq 'off') {
 # Remote Control is switched off
-        my $escurl=&Apache::lonnet::escape($ENV{'REQUEST_URI'});
+        if ($ENV{'request.course.id'}) {
+	    $navmaps=(<<ENDNAVREM);
+<a href="/adm/navmaps?postdata=$escurl&postsymb=$escsymb" target="_top">Navigate Contents</a>
+ENDNAVREM
+        }
 	my $output=(<<ENDINLINEMENU);
 <script>
 // BEGIN LON-CAPA Internal
 </script>
 <table bgcolor="#AAAAAA" width="100%" border="2"><tr><td>
 <a href="/adm/menu" target="_top">Main Menu</a>
+$navmaps
 <a href="/adm/remote?action=launch&url=$escurl" target="_top">Launch Remote Control</a>
 <br />
 <script>