--- loncom/publisher/lonupload.pm 2003/11/08 11:13:50 1.24 +++ loncom/publisher/lonupload.pm 2004/03/31 05:24:00 1.26 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # Handler to upload files into construction space # -# $Id: lonupload.pm,v 1.24 2003/11/08 11:13:50 albertel Exp $ +# $Id: lonupload.pm,v 1.26 2004/03/31 05:24:00 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -79,7 +79,13 @@ sub upfile_store { sub phaseone { - my ($r,$fn,$uname,$udom)=@_; + my ($r,$fn,$uname,$udom,$mode)=@_; + my $action = '/adm/upload'; + if ($mode eq 'testbank') { + $action = '/adm/testbank'; + } elsif ($mode eq 'imsimport') { + $action = '/adm/imsimport'; + } $ENV{'form.upfile.filename'}=~s/\\/\//g; $ENV{'form.upfile.filename'}=~s/^.*\/([^\/]+)$/$1/; if ($ENV{'form.upfile.filename'}) { @@ -94,16 +100,31 @@ sub phaseone { &Debug($r, "Filename for upload: $fn"); if (($fn) && ($fn!~/\/$/)) { - $r->print('
'); + "/priv/$uname/". + '