--- loncom/homework/lonhomework.pm 2001/01/10 21:49:43 1.30 +++ loncom/homework/lonhomework.pm 2001/01/15 21:44:21 1.34 @@ -12,18 +12,19 @@ use Apache::inputtags; use Apache::structuretags; use Apache::response; use Apache::hint; +use Apache::outputtags; use Apache::Constants qw(:common); sub get_target { if ( $ENV{'request.state'} eq "published") { - if ( defined $ENV{'form.submit'}) { + if ( defined $ENV{'form.submitted'}) { return ('grade', 'web'); } else { return ('web'); } } elsif ($ENV{'request.state'} eq "construct") { if ( defined $ENV{'form.preview'}) { - if ( defined $ENV{'form.submit'}) { + if ( defined $ENV{'form.submitted'}) { return ('grade', 'web'); } else { return ('web'); @@ -94,7 +95,7 @@ sub check_date { $datemsg = "is due at $date"; } elsif ($type eq 'answerdate') { $status='CLOSED'; - $datemsg = "was due as $lastdate, and answers will be available at $date"; + $datemsg = "was due on $lastdate, and answers will be available on $date"; } if ($status eq 'CAN_ANSWER') { #check #tries @@ -116,7 +117,7 @@ sub check_date { sub handler { my $request=$_[0]; - if ( $ENV{'user.name'} eq 'albertel' ) { $Apache::lonxml::debug=1; } + if ( $ENV{'user.name'} eq 'albertel' ) {$Apache::lonxml::debug=1;} else {$Apache::lonxml::debug=0;} my (@targets) = &get_target();