--- loncom/interface/lonnavmaps.pm 2012/12/08 20:10:26 1.491 +++ loncom/interface/lonnavmaps.pm 2013/12/01 21:29:13 1.497 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.491 2012/12/08 20:10:26 raeburn Exp $ +# $Id: lonnavmaps.pm,v 1.497 2013/12/01 21:29:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees @@ -164,6 +164,12 @@ If true, the resource's folder will not it. Default is false. True implies printCloseAll is false, since you can't close or open folders when this is on anyhow. +=item * B: + +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: @@ -613,7 +619,7 @@ sub getDescription { return &mt("Having technical difficulties; please check status later"); } if ($status == $res->NOTHING_SET) { - return &Apache::lonhtmlcommon::direct_parm_link(&mt("Not currently assigned.",$res->symb(),'opendate'),$part); + return &Apache::lonhtmlcommon::direct_parm_link(&mt('Not currently assigned'),$res->symb(),'opendate',$part); } if ($status == $res->OPEN_LATER) { return &mt("Open [_1]",&Apache::lonhtmlcommon::direct_parm_link(&timeToHumanString($open,'start'),$res->symb(),'opendate',$part)); @@ -981,11 +987,13 @@ sub render_resource { } 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=' '. + ''. ''.&mt('Edit Content').''. ''; + } } } @@ -2012,6 +2020,7 @@ sub new { $self->{USERNAME} = shift || $env{'user.name'}; $self->{DOMAIN} = shift || $env{'user.domain'}; $self->{CODE} = shift; + $self->{NOHIDE} = shift; @@ -2051,7 +2060,7 @@ sub new { $self->{PARM_HASH} = \%parmhash; $self->{PARM_CACHE} = {}; } else { - $self->change_user($self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}); + $self->change_user($self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}, $self->{NOHIDE}); } return $self; @@ -2072,6 +2081,7 @@ sub change_user { $self->{USERNAME} = shift; $self->{DOMAIN} = shift; $self->{CODE} = shift; + $self->{NOHIDE} = shift; # If the hashes are already tied make sure to break that bond: @@ -2087,7 +2097,7 @@ sub change_user { my ($cdom, $cnum) = split(/\_/, $env{'request.course.id'}); my %big_hash; - &Apache::lonmap::loadmap($cnum, $cdom, $self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}, \%big_hash); + &Apache::lonmap::loadmap($cnum, $cdom, $self->{USERNAME}, $self->{DOMAIN}, $self->{CODE}, $self->{NOHIDE}, \%big_hash); $self->{NAV_HASH} = \%big_hash; @@ -4225,7 +4235,7 @@ resource of the map. Returns a string with the type of the map in it. -=item *B: +=item * B: Returns a string with a comma-separated ordered list of map_pc IDs for the hierarchy of maps containing a map, with the top level