--- loncom/interface/londocs.pm 2003/09/08 19:21:10 1.75 +++ loncom/interface/londocs.pm 2003/09/08 21:19:44 1.76 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.75 2003/09/08 19:21:10 www Exp $ +# $Id: londocs.pm,v 1.76 2003/09/08 21:19:44 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -126,15 +126,55 @@ sub dumpbutton { sub dumpcourse { my $r=shift; $r->print('Dump DOCS'. - &Apache::loncommon::bodytag('Dump Course DOCS to Construction Space')); + &Apache::loncommon::bodytag('Dump Course DOCS to Construction Space'). + '
'); my ($home,$other,%outhash)=&authorhosts(); unless ($home) { return ''; } - if ($ENV{'form.authorspace'}) { + my $origcrsid=$ENV{'request.course.id'}; + my %origcrsdata=&Apache::lonnet::coursedescription($origcrsid); + if (($ENV{'form.authorspace'}) && ($ENV{'form.authorfolder'}=~/\w/)) { +# Do the dumping unless ($outhash{'home_'.$ENV{'form.authorspace'}}) { return ''; } my ($ca,$cd)=split(/\@/,$ENV{'form.authorspace'}); + my $title=$ENV{'form.authorfolder'}; + + } else { +# Input form + unless ($home==1) { + $r->print( + '

Select the Construction Space

'); + } else { + $r->print(''); + } + } + } + unless ($home==1) { + $r->print(''); + } + my $title=$origcrsdata{'description'}; + $title=~s/\s+/\_/gs; + $title=~s/\W//gs; + $r->print('

Folder in Construction Space


'); + &tiehash(); + foreach (&Apache::loncreatecourse::crsdirlist($origcrsid,'userfiles')) { + $r->print("\n
".$_.' '. + $hash{'title_'.$hash{ +'ids_/uploaded/'.$origcrsdata{'domain'}.'/'.$origcrsdata{'num'}.'/'.$_}} + ); + } + &untiehash(); + $r->print( + '
'); } } + # Imports the given (name, url) resources into the course # coursenum, coursedom, and folder must precede the list sub group_import {