--- loncom/interface/lonmenu.pm 2023/07/14 00:54:13 1.534 +++ loncom/interface/lonmenu.pm 2023/09/27 14:07:47 1.537 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.534 2023/07/14 00:54:13 raeburn Exp $ +# $Id: lonmenu.pm,v 1.537 2023/09/27 14:07:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -968,6 +968,18 @@ sub innerregister { $$showncrumbsref = 1; } return $trail; + } elsif (($resurl eq '/public'.$courseurl.'/syllabus') && + ($env{'form.folderpath'})) { + if ($env{'form.title'}) { + $title = $env{'form.title'}; + } else { + $title = 'Syllabus'; + } + &prepare_functions($resurl,$forcereg,$group,undef,undef,1,$hostname); + $title = &HTML::Entities::encode($title,'\'"<>&'); + my ($trail) = + &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1,1); + return $trail; } unless ($env{'request.state'} eq 'construct') { &Apache::lonhtmlcommon::clear_breadcrumbs(); @@ -1130,7 +1142,7 @@ END # End course context # Prepare the rest of the buttons - my ($menuitems,$got_prt,$got_wishlist); + my ($menuitems,$got_prt,$got_wishlist,$crsauthor); if ($const_space) { # # We are in construction space @@ -1270,8 +1282,12 @@ ENDMENUITEMS $got_prt = 1; if (($env{'user.adv'}) && ($env{'request.uri'} =~ /^\/res/) && (!$env{'request.enc'})) { - my ($cnum,$cdom) = &Apache::loncommon::crsauthor_url($env{'request.uri'}); - unless ($cnum) { + my $privurl = $env{'request.uri'}; + $privurl =~ s{^/res/}{/priv/}; + my ($cnum,$cdom) = &Apache::loncommon::crsauthor_url($privurl); + if ($cnum) { + $crsauthor = 1; + } else { # wishlist is only available for users with access to resource-pool # and links can only be set for resources within the resource-pool $menuitems .= (<