--- loncom/homework/structuretags.pm 2002/02/06 16:18:54 1.80 +++ loncom/homework/structuretags.pm 2002/03/06 20:22:12 1.84 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.80 2002/02/06 16:18:54 albertel Exp $ +# $Id: structuretags.pm,v 1.84 2002/03/06 20:22:12 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -79,7 +79,7 @@ sub page_start { if (!defined($found{'html'})) { $result=&Apache::londefdef::start_html($target,$token,$tagstack,$parstack, $parser,$safeeval); - $head_tag_start=''.&Apache::lonxml::registerurl(); + $head_tag_start=''.&Apache::lonxml::registerurl(undef,$target); } my $body_tag_start; if (!defined($found{'body'})) { @@ -162,7 +162,10 @@ ENDCHECKOUT sub start_problem { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; - if ( $Apache::inputtags::part ne '' ) { + # meta is called from lonpublisher, which doesn't uses the normal + # lonhomework method of parsing the file which means that inputtags + # won't get reset + if ( $Apache::inputtags::part ne '' && $target != 'meta' ) { &Apache::lonxml::error('Only one problem allowed in a .problem file'); my $bodytext=&Apache::lonxml::get_all_text("/problem",$$parser[-1]); return ''; @@ -307,8 +310,7 @@ sub end_problem { my $result=''; my $status=$Apache::inputtags::status['-1']; if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ) { - if ( $target eq 'grade' && $Apache::inputtags::part eq '0' && - $status eq 'CAN_ANSWER') { + if ( $target eq 'grade' && $Apache::inputtags::part eq '0') { # if part is zero, no s existed, so we need to the grading &Apache::inputtags::grade; } elsif ( $target eq 'web' && $Apache::inputtags::part eq '0') { @@ -605,12 +607,11 @@ sub end_startouttext { $result.=&Apache::edit::start_table($token)."Text Block Delete:". &Apache::edit::deletelist($target,$token) - ." + ." ". &Apache::edit::insertlist($target,$token). - " -\n". - &Apache::edit::editfield($token->[1],$text,"",50,4); + &Apache::edit::end_row().&Apache::edit::start_spanning_row()."\n". + &Apache::edit::editfield($token->[1],$text,"",50,4); } if ($target eq 'modified') { $text=&Apache::lonxml::get_all_text("endouttext",$$parser['-1']);