--- loncom/homework/structuretags.pm 2003/11/21 20:21:20 1.226 +++ loncom/homework/structuretags.pm 2003/11/26 19:35:28 1.227 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.226 2003/11/21 20:21:20 albertel Exp $ +# $Id: structuretags.pm,v 1.227 2003/11/26 19:35:28 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -429,26 +429,19 @@ sub start_problem { } } elsif ($target eq 'web') { my $name= &get_resource_name($parstack,$safeeval); - if ($status eq 'CAN_ANSWER') { - # create a page header and exit - $result.="$head_tag_start$name + $result.="$head_tag_start$name $body_tag_start \n $form_tag_start". - ''; - if ($ENV{'request.state'} eq "construct") { - $result.= &problem_web_to_edit_header($ENV{'form.rndseed'}); + ''; + # create a page header and exit + if ($ENV{'request.state'} eq "construct") { + $result.= &problem_web_to_edit_header($ENV{'form.rndseed'}); + } + # if we are viewing someone else preserve that info + if (defined $ENV{'form.grade_symb'}) { + foreach my $field ('symb','courseid','domain','username') { + $result .= ''."\n"; } - # if we are viewing someone else preserve that info - if (defined $ENV{'form.grade_symb'}) { - foreach my $field ('symb','courseid','domain','username') { - $result .= ''."\n"; - } - } - } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' - || $status eq 'CLOSED' || $status eq 'UNAVALAILABLE' || - $status eq 'INVALID_ACCESS') { - $result.=$head_tag_start. - "$name\n$body_tag_start\n"; } } elsif ($target eq 'tex') { my $startminipage = ''; @@ -539,17 +532,9 @@ sub end_problem { (($target eq 'web') && ($ENV{'request.state'} ne 'construct')) || ($target eq 'answer') || ($target eq 'tex') ) { - if ($status eq 'CAN_ANSWER') { - if ($target ne 'tex' && - $ENV{'form.answer_output_mode'} ne 'tex') { - $result.="\n"; - } - } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER' || - $status eq 'UNCHECKEDOUT' || $status eq 'INVALID_ACCESS') { - if ($target ne 'tex' && - $ENV{'form.answer_output_mode'} ne 'tex') { - $result.="\n"; - } + if ($target ne 'tex' && + $ENV{'form.answer_output_mode'} ne 'tex') { + $result.="\n"; } if ($target eq 'web') { $result.=&Apache::lonxml::xmlend();