--- loncom/interface/lonmenu.pm 2011/10/31 22:46:09 1.358 +++ loncom/interface/lonmenu.pm 2011/11/27 22:51:28 1.363 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.358 2011/10/31 22:46:09 raeburn Exp $ +# $Id: lonmenu.pm,v 1.363 2011/11/27 22:51:28 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -153,6 +153,7 @@ use Apache::lonhtmlcommon(); use Apache::loncommon(); use Apache::lonenc(); use Apache::lonlocal; +use Apache::lonmsg(); use LONCAPA qw(:DEFAULT :match); use HTML::Entities(); use Apache::lonwishlist(); @@ -334,7 +335,8 @@ sub secondary_menu { and ( $env{'request.noversionuri'} eq '' || !defined($env{'request.noversionuri'}))) { - ($escurl = $env{'request.filename'}) =~ s{^/home/httpd/html}{}; + my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; + ($escurl = $env{'request.filename'}) =~ s{^\Q$londocroot\E}{}; $escurl = &escape($escurl); } $menu =~ s/\[url\]/$escurl/g; @@ -409,7 +411,7 @@ sub innerregister { my $hwkadd=''; if ($env{'request.symb'} ne '' && - $env{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form|task)$/) { + $env{'request.filename'}=~/$LONCAPA::assess_re/) { if (&Apache::lonnet::allowed('mgr',$crs)) { $hwkadd.=&switch('','',7,2,'pgrd.png','Content Grades','grades[_4]', "gocmd('/adm/grades','gradingmenu')", @@ -426,6 +428,12 @@ sub innerregister { "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'); + } # -- End Homework ### ### Determine whether or not to display the 'cstr' button for this @@ -707,7 +715,7 @@ ENDMENUITEMS unless ($env{'request.noversionuri'}=~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) { &Apache::lonhtmlcommon::add_breadcrumb_tool( - 'advtools', @inlineremote[61,71,72,73,92]); + 'advtools', @inlineremote[61,71,72,73,74,92]); } } } 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.