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

raeburn raeburn@source.lon-capa.org
Mon, 29 Mar 2010 00:53:52 -0000


raeburn		Mon Mar 29 00:53:52 2010 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - No "Return to Last Location" when viewing special documents included in
    course:  (navmaps, aboutme, viewclasslist).
  - No evaluation, feedback or metadata icons in secondary menu for
    special documents: navmaps, aboutme, viewclasslist, aboutme/portfolio 
    (accessible files in group or user portfolio) included in course.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.322 loncom/interface/lonmenu.pm:1.323
--- loncom/interface/lonmenu.pm:1.322	Thu Mar 25 17:38:43 2010
+++ loncom/interface/lonmenu.pm	Mon Mar 29 00:53:52 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.322 2010/03/25 17:38:43 raeburn Exp $
+# $Id: lonmenu.pm,v 1.323 2010/03/29 00:53:52 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -297,6 +297,11 @@
 }
 
 sub show_return_link {
+    if (($env{'request.noversionuri'} =~ m{^/adm/(viewclasslist|navmaps)($|\?)})
+        || ($env{'request.noversionuri'} =~ m{^/adm/.*/aboutme($|\?)})) {
+
+        return if ($env{'form.register'});
+    }
     return (($env{'request.noversionuri'}=~m{^/(res|public)/} &&
 	     $env{'request.symb'} eq '')
 	    ||
@@ -305,8 +310,8 @@
 	    (($env{'request.noversionuri'}=~/^\/adm\//) &&
 	     ($env{'request.noversionuri'}!~/^\/adm\/wrapper\//) &&
 	     ($env{'request.noversionuri'}!~
-	      m[^/adm/.*/(smppg|bulletinboard|aboutme)($|\?)])
-	     ));
+	      m{^/adm/.*/(smppg|bulletinboard)($|\?)})
+           ));
 }
 
 sub innerregister {
@@ -558,7 +563,7 @@
 $menuitems.="&anno-[_1]&tations[_1]&annotate()&";
 $menuitems.="Make notes and annotations about this resource&&1\n";
 
-            unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist)(\?|$)/) {
+            unless ($env{'request.noversionuri'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme|viewclasslist|portfolio)(\?|$)/) {
 		if ((!$env{'request.enc'}) && ($env{'request.noversionuri'} !~ m{^/adm/wrapper/ext/})) {
 		    $menuitems.=(<<ENDREALRES);
 s&6&3&catalog.png&catalog[_2]&info[_1]&catalog_info()&Show Metadata