--- loncom/interface/londocs.pm 2003/09/09 19:39:04 1.77 +++ loncom/interface/londocs.pm 2003/09/15 15:24:18 1.78 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.77 2003/09/09 19:39:04 www Exp $ +# $Id: londocs.pm,v 1.78 2003/09/15 15:24:18 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -162,15 +162,25 @@ sub dumpcourse { $title=~s/\W//gs; $r->print('

Folder in Construction Space


'); &tiehash(); + $r->print('

Filenames in Construction Space

'); foreach (&Apache::loncreatecourse::crsdirlist($origcrsid,'userfiles')) { - $r->print("\n
".$_.' '. - $hash{'title_'.$hash{ -'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}} - ); + $r->print(''); + my ($ext)=($_=~/\.(\w+)$/); + my $title=$hash{'title_'.$hash{ + 'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}}; + $r->print(''); + unless ($title) { + $title=$_; + } + $title=~s/\.(\w+)$//; + $title=~s/\W+/\_/gs; + $title.='.'.$ext; + $r->print("\n\n"); } + $r->print("
Internal FilenameTitleSave as ...
'.$_.''.($title?$title:' ').'
\n"); &untiehash(); $r->print( - ''); + '

'); } }