Diff for /loncom/publisher/lonpublisher.pm between versions 1.57 and 1.59

version 1.57, 2001/12/05 20:25:20 version 1.59, 2001/12/05 21:12:04
Line 37 Line 37
 # 05/03,05/05,05/07 Gerd Kortemeyer  # 05/03,05/05,05/07 Gerd Kortemeyer
 # 05/28/2001 Scott Harrison  # 05/28/2001 Scott Harrison
 # 06/23,08/07,08/11,8/13,8/17,8/18,8/24,9/26,10/16 Gerd Kortemeyer  # 06/23,08/07,08/11,8/13,8/17,8/18,8/24,9/26,10/16 Gerd Kortemeyer
   # 12/04,12/05 Guy Albertelli
   # 12/05 Gerd Kortemeyer
   
 package Apache::lonpublisher;  package Apache::lonpublisher;
   
Line 351  sub publish { Line 353  sub publish {
  $scrout.='<h3>Dependencies</h3>';   $scrout.='<h3>Dependencies</h3>';
  my $allowstr="\n";   my $allowstr="\n";
         map {          map {
            $allowstr.='<allow src="'.$_.'" />'."\n";     my $thisdep=$_;
              $allowstr.='<allow src="'.$thisdep.'" />'."\n";
            $scrout.='<br>';             $scrout.='<br>';
            unless ($_=~/\*/) {             unless ($thisdep=~/\*/) {
        $scrout.='<a href="'.$_.'">';         $scrout.='<a href="'.$thisdep.'">';
            }             }
            $scrout.='<tt>'.$_.'</tt>';             $scrout.='<tt>'.$thisdep.'</tt>';
            unless ($_=~/\*/) {             unless ($thisdep=~/\*/) {
        $scrout.='</a>';         $scrout.='</a>';
                  if (
          &Apache::lonnet::getfile($Apache::lonnet::perlvar{'lonDocRoot'}.'/'.
                                               $thisdep.'.meta') eq '-1') {
      $scrout.=
                              ' - <font color=red>Currently not available</font>';
                  } else {
                      my %temphash=(&Apache::lonnet::declutter($target).'___'.
                                &Apache::lonnet::declutter($thisdep).'___usage'
                                    => time);
                      $thisdep=~/^\/res\/(\w+)\/(\w+)\//;
                      if ((defined($1)) && (defined($2))) {
                         &Apache::lonnet::put('resevaldata',\%temphash,$1,$2);
      }
          }
            }             }
         } keys %allow;          } keys %allow;
         $outstring=~s/(\<\/[^\>]+\>\s*)$/$allowstr$1/s;          $outstring=~s/(\<\/[^\>]+\>\s*)$/$allowstr$1/s;
Line 492  sub publish { Line 509  sub publish {
           &hiddenfield('phase','two').            &hiddenfield('phase','two').
           &hiddenfield('filename',$ENV{'form.filename'}).            &hiddenfield('filename',$ENV{'form.filename'}).
   &hiddenfield('allmeta',&Apache::lonnet::escape($allmeta)).    &hiddenfield('allmeta',&Apache::lonnet::escape($allmeta)).
             &hiddenfield('dependencies',join(',',keys %allow)).
           &textfield('Title','title',$metadatafields{'title'}).            &textfield('Title','title',$metadatafields{'title'}).
           &textfield('Author(s)','author',$metadatafields{'author'}).            &textfield('Author(s)','author',$metadatafields{'author'}).
   &textfield('Subject','subject',$metadatafields{'subject'});    &textfield('Subject','subject',$metadatafields{'subject'});

Removed from v.1.57  
changed lines
  Added in v.1.59


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>