[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Thu, 30 Nov 2006 01:14:17 -0000
banghart Wed Nov 29 20:14:17 2006 EDT
Modified files:
/loncom/homework lonhomework.pm
Log:
Fix the line ends only if needed.
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.261 loncom/homework/lonhomework.pm:1.262
--- loncom/homework/lonhomework.pm:1.261 Tue Oct 17 11:11:11 2006
+++ loncom/homework/lonhomework.pm Wed Nov 29 20:14:17 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.261 2006/10/17 15:11:11 albertel Exp $
+# $Id: lonhomework.pm,v 1.262 2006/11/30 01:14:17 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -657,9 +657,6 @@
my $filebak =$file.".bak";
my $filetmp =$file.".tmp";
my $error=0;
-
- &Apache::lonnet::correct_line_ends($result);
-
if ($env{'form.Undo'} eq &mt('undo')) {
my $error=0;
if (!copy($file,$filetmp)) { $error=1; }
@@ -672,6 +669,7 @@
$error=1;
}
} else {
+ &Apache::lonnet::correct_line_ends($result);
my $fs=Apache::File->new(">$filebak");
if (defined($fs)) {
print $fs $$problem;