--- loncom/homework/lonhomework.pm 2007/11/03 00:52:06 1.282 +++ loncom/homework/lonhomework.pm 2007/11/13 23:26:08 1.284 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.282 2007/11/03 00:52:06 albertel Exp $ +# $Id: lonhomework.pm,v 1.284 2007/11/13 23:26:08 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -543,7 +543,8 @@ sub due_date { &Apache::lonxml::debug("looking for first_access $first_access"); if (defined($first_access)) { $interval = $first_access+$interval; - $date = ($interval < $due_date)? $interval : $due_date; + $date = (!$due_date || $interval < $due_date) ? $interval + : $due_date; } else { $date = $due_date; } @@ -683,9 +684,9 @@ sub handle_save_or_undo { my $error=0; if ($env{'form.Undo'} eq &mt('undo')) { my $error=0; - if (!copy($file,$filetmp)) { $error=1; } - if ((!$error) && (!copy($filebak,$file))) { $error=1; } - if ((!$error) && (!move($filetmp,$filebak))) { $error=1; } + if (!&File::Copy::copy($file,$filetmp)) { $error=1; } + if ((!$error) && (!&File::Copy::copy($filebak,$file))) { $error=1; } + if ((!$error) && (!&File::Copy::move($filetmp,$filebak))) { $error=1; } if (!$error) { &Apache::lonxml::info("

". &mt("Undid changes, Switched [_1] and [_2]",