[LON-CAPA-cvs] cvs: loncom /publisher testbankimport.pm
raeburn
raeburn at source.lon-capa.org
Sun Nov 12 18:08:59 EST 2017
raeburn Sun Nov 12 23:08:59 2017 EDT
Modified files:
/loncom/publisher testbankimport.pm
Log:
- Use three-argument open() to separate file mode from the filename.
Index: loncom/publisher/testbankimport.pm
diff -u loncom/publisher/testbankimport.pm:1.44 loncom/publisher/testbankimport.pm:1.45
--- loncom/publisher/testbankimport.pm:1.44 Tue Feb 11 19:11:18 2014
+++ loncom/publisher/testbankimport.pm Sun Nov 12 23:08:58 2017
@@ -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 @@
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 @@
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 @@
$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} = <TESTBANK>;
close(TESTBANK);
} elsif ($res eq 'application/rtf') {
More information about the LON-CAPA-cvs
mailing list