--- loncom/publisher/testbankimport.pm 2014/02/11 19:11:18 1.44 +++ loncom/publisher/testbankimport.pm 2017/11/12 23:08:58 1.45 @@ -1,5 +1,5 @@ # Handler for parsing text upload problem descriptions into .problems -# $Id: testbankimport.pm,v 1.44 2014/02/11 19:11:18 bisitz Exp $ +# $Id: testbankimport.pm,v 1.45 2017/11/12 23:08:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1508,7 +1508,7 @@ sub create_mcq { if (-e $destdir.$libfile) { $result = 'exists'; } else { - if (open(PROB,">$destdir$libfile")) { + if (open(PROB,">",$destdir.$libfile)) { print PROB $output; close(PROB); $result = 'ok'; @@ -1586,7 +1586,7 @@ sub create_ess { if (-e $destdir.$libfile) { $result = 'exists'; } else { - if (open(PROB,">$destdir$libfile")) { + if (open(PROB,">",$destdir.$libfile)) { print PROB $output; close(PROB); $result = 'ok'; @@ -1636,7 +1636,7 @@ sub parse_datafile { $res = $mm->checktype_filename($dirpath.$filename); if ($env{'form.phase'} eq 'three') { if ($res eq 'text/plain') { - open(TESTBANK,"<$dirpath$filename"); + open(TESTBANK,"<",$dirpath.$filename); @{$text} = ; close(TESTBANK); } elsif ($res eq 'application/rtf') {