--- loncom/interface/lonmenu.pm 2012/12/14 14:21:55 1.369.2.28 +++ loncom/interface/lonmenu.pm 2012/12/22 15:08:10 1.369.2.29 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.28 2012/12/14 14:21:55 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.29 2012/12/22 15:08:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -577,8 +577,7 @@ sub innerregister { } my $trail; if ($env{'form.folderpath'}) { - my $editbutton = - &prepare_functions($resurl,$forcereg,$group,undef,undef,1); + &prepare_functions($resurl,$forcereg,$group,undef,undef,1); ($trail) = &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); } else { @@ -625,7 +624,7 @@ sub innerregister { $editbutton = &prepare_functions($resurl,$forcereg,$group); } if ($editbutton eq '') { - &clear(6,1); + $editbutton = &clear(6,1); } # @@ -1287,7 +1286,7 @@ sub prepare_functions { $forceedit,$forceview,$forcereg, $env{'form.title'},$env{'form.suppurl'}); } - } elsif ($resurl !~ m{^adm/($match_domain)/($match_username)/aboutme$}) { + } elsif ($resurl !~ m{^/?adm/($match_domain)/($match_username)/aboutme$}) { if ($env{'request.filename'}) { my $file=&Apache::lonnet::declutter($env{'request.filename'}); ($cfile,$home,$switchserver,$forceedit,$forceview) = @@ -1304,7 +1303,7 @@ sub prepare_functions { if ($env{'request.course.id'}) { # This applies to about me page for users in a course - if ($resurl =~ m{^adm/($match_domain)/($match_username)/aboutme$}) { + if ($resurl =~ m{^/?adm/($match_domain)/($match_username)/aboutme$}) { my ($sdom,$sname) = ($1,$2); unless (&Apache::lonnet::is_course($sdom,$sname)) { &switch('','',6,4,'mail-message-new-22x22.png','Message to user',