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

raeburn raeburn at source.lon-capa.org
Sun Dec 30 11:05:16 EST 2012


raeburn		Sun Dec 30 16:05:16 2012 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm lonhelper.pm 
  Log:
  - Suppress link to edit folder/page when lonnavmaps::render(() is used by
    helper to display course contents (e.g., when selecting whihc problems
    to print in a course). 
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.492 loncom/interface/lonnavmaps.pm:1.493
--- loncom/interface/lonnavmaps.pm:1.492	Sat Dec 29 17:37:20 2012
+++ loncom/interface/lonnavmaps.pm	Sun Dec 30 16:05:15 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.492 2012/12/29 17:37:20 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.493 2012/12/30 16:05:15 raeburn Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -164,6 +164,12 @@
 it. Default is false. True implies printCloseAll is false, since you
 can't close or open folders when this is on anyhow.
 
+=item * B<map_no_edit_link>:
+
+If true, the title of the folder or page will not be followed by an
+icon/link to direct editing of a folder or composite page, originally
+added via the Course Editor.
+
 =back
 
 =item * B<Apache::lonnavmaps::communication_status>:
@@ -981,11 +987,13 @@
         }
         if ((&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) &&
             ($resource->symb=~/\_\_\_[^\_]+\_\_\_uploaded/)) {
-            my $icon = &Apache::loncommon::lonhttpdurl('/res/adm/pages').'/editmap.png';
-            $editmapLink=' '.
+            if (!$params->{'map_no_edit_link'}) {
+                my $icon = &Apache::loncommon::lonhttpdurl('/res/adm/pages').'/editmap.png';
+                $editmapLink=' '.
                          '<a href="/adm/coursedocs?command=directnav&symb='.&escape($resource->symb()).'">'.
                          '<img src="'.$icon.'" alt="'.&mt('Edit Content').'" title="'.&mt('Edit Content').'" />'.
                          '</a>';
+            }
         }
     }
 
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.189 loncom/interface/lonhelper.pm:1.190
--- loncom/interface/lonhelper.pm:1.189	Mon Oct 29 17:38:56 2012
+++ loncom/interface/lonhelper.pm	Sun Dec 30 16:05:16 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.189 2012/10/29 17:38:56 raeburn Exp $
+# $Id: lonhelper.pm,v 1.190 2012/12/30 16:05:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2540,7 +2540,8 @@
 				       'closeAllPages' => $self->{'closeallpages'},
                                        'suppressEmptySequences' => $self->{'suppressEmptySequences'},
 				       'include_top_level_map' => $self->{'include_top_level_map'},
-                                       'iterator_map' => $mapUrl }
+                                       'iterator_map' => $mapUrl,
+                                       'map_no_edit_link' => 1, } 
                                        );
 
     $result .= $buttons;




More information about the LON-CAPA-cvs mailing list