--- loncom/publisher/lonretrieve.pm 2001/04/03 18:12:57 1.2 +++ loncom/publisher/lonretrieve.pm 2001/04/03 22:03:55 1.4 @@ -11,7 +11,7 @@ # 03/23 Guy Albertelli # 03/24,03/29 Gerd Kortemeyer) # -# 03/31 Gerd Kortemeyer +# 03/31,04/03 Gerd Kortemeyer package Apache::lonretrieve; @@ -24,21 +24,77 @@ sub phaseone { my ($r,$fn,$uname,$udom)=@_; my $docroot=$r->dir_config('lonDocRoot'); - my $resdir=$docroot.'/res/'.$udom.'/'.$uname.$fn; + my $urldir='/res/'.$udom.'/'.$uname.$fn; + $urldir=~s/\/[^\/]+$/\//; + + my $resfn=$docroot.'/res/'.$udom.'/'.$uname.$fn; + my $resdir=$resfn; $resdir=~s/\/[^\/]+$/\//; $fn=~/^\/(.+)\.(\w+)$/; my $main=$1; my $suffix=$2; - + + $r->print('
'); +} + +sub phasetwo { + my ($r,$fn,$uname,$udom)=@_; + if ($ENV{'form.version'}) { + my $version=$ENV{'form.version'}; + if ($version eq 'new') { + $r->print(''); + &phaseone($r,$fn,$uname,$udom); + } } sub handler { @@ -79,6 +135,7 @@ sub handler { $r->print('