--- loncom/interface/lonmenu.pm 2012/08/03 17:35:32 1.369.2.17 +++ loncom/interface/lonmenu.pm 2012/08/03 22:38:35 1.369.2.18 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.17 2012/08/03 17:35:32 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.18 2012/08/03 22:38:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -569,46 +569,8 @@ sub innerregister { my $timesync = ( $noremote ? '' : 'swmenu.syncclock(1000*'.time.');' ); # ============================================================================= # ============================ This is for URLs that actually can be registered - unless ( ($env{'request.noversionuri'}!~m{^/(res/)*adm/}) + if ( ($env{'request.noversionuri'}!~m{^/(res/)*adm/}) || ($forcereg)) { - unless ($noremote) { -# Not registered, graphical - return (< -// - -ENDDONOTREGTHIS - - } - return ''; - } - # -- This applies to homework problems for users with grading privileges my $crs='/'.$env{'request.course.id'}; if ($env{'request.course.sec'}) { @@ -635,11 +597,13 @@ ENDDONOTREGTHIS "gocmd('/adm/parmset','set')", 'Content Settings'); } - if ($env{'request.symb'}=~/^uploaded/ && - &Apache::lonnet::allowed('mdc',$crs)) { - $hwkadd.=&switch('','',7,4,'docs.png','Folder/Page Content','parms[_2]', - "gocmd('/adm/coursedocs','direct')", - 'Folder/Page Content'); + if ($noremote) { + if ($env{'request.symb'}=~/^uploaded/ && + &Apache::lonnet::allowed('mdc',$crs)) { + $hwkadd.=&switch('','',7,4,'docs.png','Folder/Page Content','parms[_2]', + "gocmd('/adm/coursedocs','direct')", + 'Folder/Page Content'); + } } # -- End Homework ### @@ -947,6 +911,10 @@ ENDMENUITEMS } } } + return &Apache::lonhtmlcommon::scripttag('', 'start') + . &Apache::lonhtmlcommon::breadcrumbs(undef,undef,0) + . &Apache::lonhtmlcommon::scripttag('', 'end'); + } else { my $requri=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0])); $requri=&Apache::lonenc::check_encrypt(&unescape($requri)); @@ -998,10 +966,44 @@ var swmenu=null; ENDREGTHIS } + } else { + unless ($noremote) { +# Not registered, graphical + return (< +// + +ENDDONOTREGTHIS + + } + return ''; + } } sub is_course_upload {