[LON-CAPA-cvs] cvs: loncom /publisher lonrights.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 20 Jan 2004 23:03:18 -0000


albertel		Tue Jan 20 18:03:18 2004 EDT

  Modified files:              
    /loncom/publisher	lonrights.pm 
  Log:
  - understands 'meta' target now
  
  
Index: loncom/publisher/lonrights.pm
diff -u loncom/publisher/lonrights.pm:1.12 loncom/publisher/lonrights.pm:1.13
--- loncom/publisher/lonrights.pm:1.12	Tue Jan 20 16:10:03 2004
+++ loncom/publisher/lonrights.pm	Tue Jan 20 18:03:18 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to show and edit custom distribution rights
 #
-# $Id: lonrights.pm,v 1.12 2004/01/20 21:10:03 albertel Exp $
+# $Id: lonrights.pm,v 1.13 2004/01/20 23:03:18 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -41,6 +41,17 @@
 sub handler {
 
   my $r=shift;
+  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;