--- loncom/publisher/lonrights.pm 2007/07/13 18:35:28 1.24 +++ loncom/publisher/lonrights.pm 2012/11/09 15:29:19 1.34 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to show and edit custom distribution rights # -# $Id: lonrights.pm,v 1.24 2007/07/13 18:35:28 albertel Exp $ +# $Id: lonrights.pm,v 1.34 2012/11/09 15:29:19 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -55,15 +55,30 @@ sub handler { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; + # Breadcrumbs + &Apache::lonhtmlcommon::clear_breadcrumbs(); + &Apache::lonhtmlcommon::add_breadcrumb({ + 'text' => 'Construction Space', + 'href' => &Apache::loncommon::authorspace($r->uri), + }); + &Apache::lonhtmlcommon::add_breadcrumb({ + 'text' => 'Custom Rights Editor', + 'title' => 'Custom Distribution Rights Editor', + 'href' => '',}); + my $js = &Apache::loncommon::coursebrowser_javascript(). &Apache::loncommon::studentbrowser_javascript(); - $r->print(&Apache::loncommon::start_page('Custom Distribution Rights',$js)); + # Breadcrumbs are included by &start_page + $r->print(&Apache::loncommon::start_page('Custom Distribution Rights',$js) + .&Apache::loncommon::head_subbox( + &Apache::loncommon::CSTR_pageheader()) + ); $r->rflush(); my $uri=$r->uri; my $fn=&Apache::lonnet::filelocation('',$uri); my $contents=''; - my $constructmode=($uri=~/^\/\~/); + my $constructmode=($uri=~ m{^/priv/}); # ============================================================ Modify and store if ($constructmode && $env{'form.store'}) { @@ -165,7 +180,7 @@ sub handler { $contents=join('',<$fh>); $fh->close(); } - $r->print('