Diff for /loncom/interface/lonaboutme.pm between versions 1.49 and 1.52

version 1.49, 2006/08/04 20:41:32 version 1.52, 2006/08/16 19:40:46
Line 37  use Apache::lonfeedback; Line 37  use Apache::lonfeedback;
 use Apache::lonrss();  use Apache::lonrss();
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonmsgdisplay();  use Apache::lonmsgdisplay();
   use HTML::Entities();
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
Line 206  sub handler { Line 207  sub handler {
       }        }
               if ($allowed) {                if ($allowed) {
                  $r->print('<br /><textarea cols="80" rows="6" name="'.$_.'">'.                   $r->print('<br /><textarea cols="80" rows="6" name="'.$_.'">'.
    $syllabus{$_}.     &HTML::Entities::encode($syllabus{$_},'"&<>').
            '</textarea><input type="submit" name="storesyl" value="'.             '</textarea><input type="submit" name="storesyl" value="'.
    &mt('Store').'" />');     &mt('Store').'" />');
       }        }
Line 485  sub parse_directory { Line 486  sub parse_directory {
     my %dirlist = map {      my %dirlist = map {
     ((split('&',$_,2))[0],1)      ((split('&',$_,2))[0],1)
  } &Apache::lonnet::dirlist($path,$cdom,$cnum,$portfolio_root);   } &Apache::lonnet::dirlist($path,$cdom,$cnum,$portfolio_root);
     &Apache::lonnet::logthis("$path -- $portfolio_root");  
     foreach my $item (sort(keys(%{$currhash}))) {      foreach my $item (sort(keys(%{$currhash}))) {
         $output .= &portfolio_row_start();          $output .= &portfolio_row_start();
         $output .= '<td style="padding-left: '.($depth*25).'px">';          $output .= '<td style="padding-left: '.($depth*25).'px">';
Line 496  sub parse_directory { Line 496  sub parse_directory {
             $output .= &parse_directory($r,$depth,$currhash->{$item},              $output .= &parse_directory($r,$depth,$currhash->{$item},
  $path.'/'.$item);   $path.'/'.$item);
         } else {          } else {
             my $showname;     
             if ($currhash->{$item} =~ m|/([^/]+)$|) {  
                 $showname = $1;      my $file_name; 
             } else {      if ($currhash->{$item} =~ m|/([^/]+)$|) {
                 $showname = $currhash->{$item};   $file_name = $1;
             }      } else {
             $showname=&HTML::Entities::encode($showname,'<>&"');   $file_name = $currhash->{$item};
       }
       my $have_meta = exists($dirlist{$file_name.'.meta'});
     my $url = '/uploaded/'.$cdom.'/'.$cnum.'/portfolio/'.      my $url = '/uploaded/'.$cdom.'/'.$cnum.'/portfolio/'.
  $currhash->{$item};   $currhash->{$item};
   
               my $showname;
       if ($have_meta) {
    $showname = &Apache::lonnet::metadata($url,'title');
       }
       if ($showname eq '') {
    $showname = $file_name;
       } else {
    $showname = $file_name.' ('.$showname.')';
       }
   
               $showname=&HTML::Entities::encode($showname,'<>&"');
             $output .= '<a href="'.$url.'">'.              $output .= '<a href="'.$url.'">'.
  '<img alt="" src="'.&Apache::loncommon::icon($currhash->{$item}).'" class="LC_icon" />'.   '<img alt="" src="'.&Apache::loncommon::icon($currhash->{$item}).'" class="LC_icon" />'.
  '&nbsp;'.$showname.'</a>';   '&nbsp;'.$showname.'</a>';
     $output.='</td><td>';      $output.='</td><td>';
     &Apache::lonnet::logthis("sh $showname");      if ($have_meta) {
     if (exists($dirlist{$showname.'.meta'})) {  
  $output.= '<a href="'.$url.'.meta"><img alt="'.&mt('Catalog Information').'" src="'.   $output.= '<a href="'.$url.'.meta"><img alt="'.&mt('Catalog Information').'" src="'.
  &Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.gif').   &Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.gif').
  '" class="LC_icon" /></a>';   '" class="LC_icon" /></a>';

Removed from v.1.49  
changed lines
  Added in v.1.52


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