version 1.30, 2001/01/10 21:49:43
|
version 1.35, 2001/01/24 14:26:28
|
Line 12 use Apache::inputtags;
|
Line 12 use Apache::inputtags;
|
use Apache::structuretags; |
use Apache::structuretags; |
use Apache::response; |
use Apache::response; |
use Apache::hint; |
use Apache::hint; |
|
use Apache::outputtags; |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
|
|
sub get_target { |
sub get_target { |
if ( $ENV{'request.state'} eq "published") { |
if ( $ENV{'request.state'} eq "published") { |
if ( defined $ENV{'form.submit'}) { |
if ( defined $ENV{'form.submitted'}) { |
return ('grade', 'web'); |
return ('grade', 'web'); |
} else { |
} else { |
return ('web'); |
return ('web'); |
} |
} |
} elsif ($ENV{'request.state'} eq "construct") { |
} elsif ($ENV{'request.state'} eq "construct") { |
if ( defined $ENV{'form.preview'}) { |
if ( defined $ENV{'form.preview'}) { |
if ( defined $ENV{'form.submit'}) { |
if ( defined $ENV{'form.submitted'}) { |
return ('grade', 'web'); |
return ('grade', 'web'); |
} else { |
} else { |
return ('web'); |
return ('web'); |
Line 94 sub check_date {
|
Line 95 sub check_date {
|
$datemsg = "is due at $date"; |
$datemsg = "is due at $date"; |
} elsif ($type eq 'answerdate') { |
} elsif ($type eq 'answerdate') { |
$status='CLOSED'; |
$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') { |
if ($status eq 'CAN_ANSWER') { |
#check #tries |
#check #tries |
Line 116 sub check_date {
|
Line 117 sub check_date {
|
sub handler { |
sub handler { |
my $request=$_[0]; |
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(); |
my (@targets) = &get_target(); |
|
|
Line 127 sub handler {
|
Line 128 sub handler {
|
} |
} |
$request->send_http_header; |
$request->send_http_header; |
return OK if $request->header_only; |
return OK if $request->header_only; |
|
|
|
#check if we know where we are |
|
if ($ENV{'request.course.fn'} && !&Apache::lonnet::symbread()) { |
|
$request->internal_redirect('/adm/ambiguous'); return; |
|
} |
|
|
&Apache::lonhomework::send_header($request); |
&Apache::lonhomework::send_header($request); |
|
|
#check if allowed to see |
#check if allowed to see |