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

raeburn raeburn at source.lon-capa.org
Fri Mar 2 20:01:33 EST 2012


raeburn		Sat Mar  3 01:01:33 2012 EDT

  Modified files:              (Branch: loncapaMITrelate_1)
    /loncom/interface	lonmenu.pm 
  Log:
  - Customization for MITrelate
    - Suppress display of printing icon in inline menu for non-CC roles
      in Mechanics Online course.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.315.2.15.2.1 loncom/interface/lonmenu.pm:1.315.2.15.2.2
--- loncom/interface/lonmenu.pm:1.315.2.15.2.1	Fri Mar  2 14:48:19 2012
+++ loncom/interface/lonmenu.pm	Sat Mar  3 01:01:33 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.315.2.15.2.1 2012/03/02 14:48:19 raeburn Exp $
+# $Id: lonmenu.pm,v 1.315.2.15.2.2 2012/03/03 01:01:33 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -743,9 +743,12 @@
 c&6&3
 c&8&1
 c&8&2
-s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document&&&$icon_text{'printout'}
-s&9&1&sbkm.gif&set[_1]&bookmark[_2]&set_bookmark()&Set a bookmark for this resource&&1&$icon_text{'bookmark'}
 ENDMENUITEMS
+            if (($env{'request.course.id'} ne 'relate_3e100973b27484f2drelatel1') ||
+                ($env{'request.role'} =~ /^cc/)) {
+                $menuitems .= "s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document&&&$icon_text{'printout'}\n";
+            }
+            $menuitems .= "s&9&1&sbkm.gif&set[_1]&bookmark[_2]&set_bookmark()&Set a bookmark for this resource&&1&$icon_text{'bookmark'}\n";
 
 my $currentURL = &Apache::loncommon::get_symb();
 my ($symb_old,$symb_old_enc) = &Apache::loncommon::clean_symb($currentURL);
@@ -790,7 +793,7 @@
 s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document&&&$icontext
 ENDMENUITEMS
 	    }
-	}
+        }
         my $buttons='';
         foreach (split(/\n/,$menuitems)) {
 	    my ($command, at rest)=split(/\&/,$_);




More information about the LON-CAPA-cvs mailing list