--- loncom/publisher/lonretrieve.pm 2001/04/03 21:12:39 1.3 +++ loncom/publisher/lonretrieve.pm 2001/04/04 03:59:15 1.5 @@ -66,9 +66,52 @@ sub phaseone { '
'. + 'Retrieval of an old version will '. + 'overwrite the file currently in construction space
'. ''); } +sub phasetwo { + my ($r,$fn,$uname,$udom)=@_; + if ($ENV{'form.version'}) { + my $version=$ENV{'form.version'}; + if ($version eq 'new') { + $r->print('
Copying file: '); + if (copy($csource,$ctarget)) { + $r->print('ok
'); + print $logfile "Copied sucessfully.\n\n"; + } else { + my $error=$!; + $r->print('fail, '.$error.'
'); + print $logfile "Copy failed: $error\n\n"; + } + $r->print('Back to '.$fn.''); + } else { + $r->print( + 'Please pick a version to retrieve
'); + &phaseone($r,$fn,$uname,$udom); + } +} + sub handler { my $r=shift; @@ -107,6 +150,7 @@ sub handler { $r->print('