version 1.24, 2000/12/21 18:13:33
|
version 1.27, 2001/01/05 20:05:26
|
Line 6 use strict;
|
Line 6 use strict;
|
use Apache::lonnet; |
use Apache::lonnet; |
|
|
sub BEGIN { |
sub BEGIN { |
&Apache::lonxml::register('Apache::structuretags',('block','while','randomlist','problem','web','tex','part','pre_duedate','post_answerdate','solved','not_solved')); |
&Apache::lonxml::register('Apache::structuretags',('block','while','randomlist','problem','web','tex','part','preduedate','postanswerdate','solved','notsolved')); |
} |
} |
|
|
sub start_web { |
sub start_web { |
Line 54 sub start_problem {
|
Line 54 sub start_problem {
|
if ( $status eq 'CLOSED' ) { |
if ( $status eq 'CLOSED' ) { |
my $bodytext=&Apache::lonxml::get_all_text("/problem",$$parser[$#$parser]); |
my $bodytext=&Apache::lonxml::get_all_text("/problem",$$parser[$#$parser]); |
if ( $target eq "web" ) { |
if ( $target eq "web" ) { |
return "<br></br>Problem is not open to be viewed. The problem $datemsg<br></br>"; |
return "<body bgcolor=#FFFFFF> <br></br>Problem is not open to be viewed. The problem $datemsg<br></br>"; |
} |
} |
} |
} |
} |
} |
Line 237 sub end_part {
|
Line 237 sub end_part {
|
return &Apache::inputtags::gradestatus($Apache::inputtags::part); |
return &Apache::inputtags::gradestatus($Apache::inputtags::part); |
} |
} |
|
|
sub start_pre_duedate { |
sub start_preduedate { |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
if ($target ne 'meta') { |
if ($target ne 'meta') { |
if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER') { |
if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER') { |
&Apache::lonxml::get_all_text("/pre_duedate",$$parser[$#$parser]); |
&Apache::lonxml::get_all_text("/preduedate",$$parser[$#$parser]); |
} |
} |
} |
} |
return ''; |
return ''; |
} |
} |
|
|
sub end_pre_duedate { |
sub end_preduedate { |
return ''; |
return ''; |
} |
} |
|
|
sub start_post_answerdate { |
sub start_postanswerdate { |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
if ($target ne 'meta') { |
if ($target ne 'meta') { |
if ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') { |
if ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') { |
&Apache::lonxml::get_all_text("/post_answerdate",$$parser[$#$parser]); |
&Apache::lonxml::get_all_text("/postanswerdate",$$parser[$#$parser]); |
} |
} |
} |
} |
return ''; |
return ''; |
} |
} |
|
|
sub end_post_answerdate { |
sub end_postanswerdate { |
return ''; |
return ''; |
} |
} |
|
|
sub start_not_solved { |
sub start_notsolved { |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
if ($target ne 'meta') { |
if ($target ne 'meta') { |
my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"}; |
my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"}; |
&Apache::lonxml::debug("not solved has :$gradestatus:"); |
&Apache::lonxml::debug("not solved has :$gradestatus:"); |
if ($gradestatus =~ /^correct/) { |
if ($gradestatus =~ /^correct/) { |
&Apache::lonxml::debug("skipping"); |
&Apache::lonxml::debug("skipping"); |
&Apache::lonxml::get_all_text("/not_solved",$$parser[$#$parser]); |
&Apache::lonxml::get_all_text("/notsolved",$$parser[$#$parser]); |
} |
} |
} |
} |
return ''; |
return ''; |
} |
} |
|
|
sub end_not_solved { |
sub end_notsolved { |
return ''; |
return ''; |
} |
} |
|
|