--- loncom/homework/structuretags.pm 2002/08/26 20:42:36 1.107 +++ loncom/homework/structuretags.pm 2002/09/23 17:19:24 1.115 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.107 2002/08/26 20:42:36 sakharuk Exp $ +# $Id: structuretags.pm,v 1.115 2002/09/23 17:19:24 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -161,7 +161,7 @@ sub problem_web_to_edit_header { Show All Foils + $result.= ' /> Show All Foils
]*)>//g;
- $gradesatement =~ s/<\/td>//g;
- $gradesatement =~ s//\\textbf{/g;
- $gradesatement =~ s/<\/b>/}/g;
- $gradesatement =~ s/ /\\vskip 0 mm /g; - $gradesatement =~ s/]*)>//g; - } - $result.= $gradesatement; + my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part); + #FIXME this is ugly we should just generate tex in inputtags + if ($target eq 'tex') { $gradestatus=&html_to_tex($gradestatus); } + $result.= $gradestatus; } if ( - (($target eq 'web' || $target eq 'tex') && ($ENV{'request.state'} ne 'construct')) || - ($target eq 'answer') + (($target eq 'web') && ($ENV{'request.state'} ne 'construct')) || + ($target eq 'answer') || ($target eq 'tex') ) { if ($status eq 'CAN_ANSWER') { if ($target ne 'tex') { @@ -442,11 +432,29 @@ sub end_problem { return $result; } +#FIXME I am ugly shoot me +sub html_to_tex { + my ($string)=@_; + $string =~ s/
|