Diff for /loncom/interface/londocs.pm between versions 1.130 and 1.134

version 1.130, 2004/06/15 15:50:03 version 1.134, 2004/07/04 05:43:12
Line 157  sub dumpcourse { Line 157  sub dumpcourse {
  $crs=~s/\_/\//g;   $crs=~s/\_/\//g;
  foreach (keys %replacehash) {   foreach (keys %replacehash) {
     my $newfilename=$title.'/'.$replacehash{$_};      my $newfilename=$title.'/'.$replacehash{$_};
     $newfilename=~s/[^\w\/\.]+/\_/g;      $newfilename=~s/[^\w\/\.\/]+/\_/g;
     my @dirs=split(/\//,$newfilename);      my @dirs=split(/\//,$newfilename);
     my $path='/home/'.$ca.'/public_html';      my $path='/home/'.$ca.'/public_html';
     my $makepath=$path;      my $makepath=$path;
Line 201  sub dumpcourse { Line 201  sub dumpcourse {
     $r->print(      $r->print(
   '<input type="hidden" name="authorspace" value="'.$1.'" />');    '<input type="hidden" name="authorspace" value="'.$1.'" />');
  } else {   } else {
     $r->print('<option value="'.$1.'">'.$_.'</option>');      $r->print('<option value="'.$1.'">'.$1.' - '.
         &Apache::loncommon::plainname(split(/\@/,$1)).'</option>');
  }   }
     }      }
  }   }
Line 224  sub dumpcourse { Line 225  sub dumpcourse {
  $title=$_;   $title=$_;
     }      }
     $title=~s/\.(\w+)$//;      $title=~s/\.(\w+)$//;
     $title=~s/\W+/\_/gs;      $title=~s/[^\w\/]+/\_/gs;
     $title.='.'.$ext;      $title.='.'.$ext;
     $r->print("\n<td><input type='text' size='60' name='namefor_".$_."' value='".$title."' /></td></tr>\n");      $r->print("\n<td><input type='text' size='60' name='namefor_".$_."' value='".$title."' /></td></tr>\n");
  }   }
Line 494  sub editor { Line 495  sub editor {
            $r->print(&entryline($idx,$name,$url,$folder,$allowed,$_,$coursenum));             $r->print(&entryline($idx,$name,$url,$folder,$allowed,$_,$coursenum));
            $idx++;             $idx++;
         }          }
    unless ($idx) {
       $r->print('<tr><td>'.&mt('Currently no documents.').'</td></tr>');
    }
         $r->print('</table>');          $r->print('</table>');
     }      }
 }  }
Line 1220  ENDNEWSCRIPT Line 1224  ENDNEWSCRIPT
   $r->print('</head>'.    $r->print('</head>'.
             &Apache::loncommon::bodytag('Course Documents','',$events,              &Apache::loncommon::bodytag('Course Documents','',$events,
  '','',$showdoc).   '','',$showdoc).
     &Apache::loncommon::help_open_faq(273).      &Apache::loncommon::help_open_menu('','','','',273,'RAT'));
     &Apache::loncommon::help_open_bug('RAT'));  
   unless ($showdoc) {    unless ($showdoc) {
 # -----------------------------------------------------------------------------  # -----------------------------------------------------------------------------
        my %lt=&Apache::lonlocal::texthash(         my %lt=&Apache::lonlocal::texthash(

Removed from v.1.130  
changed lines
  Added in v.1.134


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