'.
&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index',
'Problem Editing Help').' | '.
&Apache::loncommon::help_open_faq(5).
@@ -200,13 +200,23 @@ sub problem_edit_footer {
';
}
+sub option {
+ my ($value,$name) = @_;
+ my $result ="
+ ".&option('CAN_ANSWER' ,'problemstate').&mt("Answerable")."
+ ".&option('CANNOT_ANSWER_tries' ,'problemstate').&mt("Open with full tries")."
+ ".&option('CANNOT_ANSWER_correct','problemstate').&mt("Open and correct")."
+ ".&option('SHOW_ANSWER' ,'problemstate').&mt("Show Answer")."
+
+
+
+Problem Type:
+
+
+
+Feedback Mode:
+
+
+
+ ";
my $numtoanalyze=$ENV{'form.numtoanalyze'};
if (!$numtoanalyze) { $numtoanalyze=20; }
$result.= '';
}
}
}
@@ -1037,9 +1107,10 @@ sub end_part {
sub start_preduedate {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
+ &Apache::lonxml::debug("State in preduedate is ". $Apache::inputtags::status['-1']);
if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER' &&
- $Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER' &&
- $Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') {
+ $Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') {
+ &Apache::lonxml::debug("Wha? ". ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER'));
&Apache::lonxml::get_all_text("/preduedate",$parser);
}
}
@@ -1052,12 +1123,12 @@ sub end_preduedate {
sub start_postanswerdate {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
- if ($target eq 'web' || $target eq 'grade' || $target eq 'tex') {
+ if ($target eq 'web' || $target eq 'grade') {
if ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') {
&Apache::lonxml::get_all_text("/postanswerdate",$parser);
}
} elsif ($target eq 'tex') {
- return '\vskip 0 mm \noindent';
+ &Apache::lonxml::get_all_text("/postanswerdate",$parser);
}
return '';
}
@@ -1072,7 +1143,8 @@ sub start_notsolved {
$target eq 'tex') {
my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
&Apache::lonxml::debug("not solved has :$gradestatus:");
- if ($gradestatus =~ /^correct/) {
+ if ($gradestatus =~ /^correct/ &&
+ &Apache::response::show_answer()) {
&Apache::lonxml::debug("skipping");
&Apache::lonxml::get_all_text("/notsolved",$parser);
}
@@ -1089,7 +1161,8 @@ sub start_solved {
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
$target eq 'tex') {
my $gradestatus=$Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"};
- if ($gradestatus !~ /^correct/) {
+ if ($gradestatus !~ /^correct/ ||
+ !&Apache::response::show_answer()) {
&Apache::lonxml::get_all_text("/solved",$parser);
}
}
|