--- loncom/publisher/lonrights.pm 2003/03/20 21:47:57 1.6 +++ loncom/publisher/lonrights.pm 2005/04/07 06:56:27 1.17 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to show and edit custom distribution rights # -# $Id: lonrights.pm,v 1.6 2003/03/20 21:47:57 www Exp $ +# $Id: lonrights.pm,v 1.17 2005/04/07 06:56:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,19 +32,32 @@ package Apache::lonrights; use strict; use Apache::Constants qw(:common :http); -use Apache::lonnet(); +use Apache::lonnet; use Apache::loncommon(); use HTML::LCParser; use Apache::File; +use Apache::lonlocal; sub handler { my $r=shift; - $r->content_type('text/html'); + my $target = $env{'form.grade_target'}; + if ($target eq 'meta') { + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + $env{'request.uri'}=$r->uri; + my $file = &Apache::lonnet::filelocation("",$r->uri); + my $content=&Apache::lonnet::getfile($file); + my $result=&Apache::lonxml::xmlparse(undef,'meta',$content); + $r->print($result); + return OK; + } + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; $r->print( - '