--- loncom/homework/structuretags.pm 2004/09/22 20:49:45 1.260.2.5 +++ loncom/homework/structuretags.pm 2004/07/27 23:35:33 1.261 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.260.2.5 2004/09/22 20:49:45 albertel Exp $ +# $Id: structuretags.pm,v 1.261 2004/07/27 23:35:33 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -61,7 +61,7 @@ sub start_tex { if ($target eq 'tex') { return $bodytext.' '; } - return $result; + return $result;; } sub end_tex { @@ -83,7 +83,8 @@ sub page_start { $result=&Apache::londefdef::start_html($target,$token,$tagstack, $parstack,$parser,$safeeval); $head_tag_start=''.&Apache::lonmenu::registerurl(undef,$target). - &Apache::lonhtmlcommon::htmlareaheaders(); + &Apache::lonhtmlcommon::htmlareaheaders(). + &Apache::lonhtmlcommon::spellheader(); } my $body_tag_start; if (!defined($found{'body'})) { @@ -353,13 +354,12 @@ sub init_problem_globals { if ($type eq 'problem') { $Apache::inputtags::part='0'; @Apache::inputtags::partlist=('0'); - $Apache::lonhomework::problemstatus=&get_problem_status('0'); - $Apache::lonhomework::ignore_response_errors=0; - } elsif ($type eq 'library') { + + $Apache::lonhomework::problemstatus=&get_problem_status('0') + } else { $Apache::inputtags::part=''; @Apache::inputtags::partlist=(); $Apache::lonhomework::problemstatus=''; - $Apache::lonhomework::ignore_response_errors=1; } @Apache::inputtags::responselist = (); @Apache::inputtags::importlist = (); @@ -861,7 +861,7 @@ sub start_instructorcomment { if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex' || $target eq 'analyze') { $result=($ENV{'request.role'}=~/^(in|cc|au|ca|li)/); - if ( (! $result) or ($ENV{'form.instructor_comments'} eq 'hide')) { + if ( ! $result ) { my $skip=&Apache::lonxml::get_all_text("/instructorcomment", $parser,$style); &Apache::lonxml::debug("skipping ahead :$skip: $$parser[-1]"); @@ -1084,11 +1084,7 @@ sub start_part { } else { if ($target eq 'tex') { if (not $ENV{'form.problem_split'}=~/yes/) { - if ($$tagstack[-2] eq 'td') { - $result.='\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; - } else { - $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; - } + $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent'; } my $weight = &Apache::lonnet::EXT("resource.$id.weight"); my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages'); @@ -1148,7 +1144,6 @@ sub end_part { $gradestatus=''; } $result=$gradestatus; - if ($$tagstack[-2] eq 'td' and $target eq 'tex') {$result.='\end{minipage}';} } elsif ($target eq 'edit') { $result=&Apache::edit::end_table(); }