--- loncom/publisher/lonupload.pm 2003/11/08 11:13:50 1.24 +++ loncom/publisher/lonupload.pm 2004/05/14 14:53:31 1.27 @@ -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.27 2004/05/14 14:53:31 www 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/". + '\\n") + newWindow.document.write(" | Importing Testbank questions into LON-CAPA") + newWindow.document.write("Four requirements must be met to ensure that you will succeed in building LON-CAPA problem files using your plain text file containing testbank questions.") + newWindow.document.write("
|