--- loncom/homework/structuretags.pm 2008/08/26 03:18:29 1.429 +++ loncom/homework/structuretags.pm 2008/10/24 16:22:54 1.433 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.429 2008/08/26 03:18:29 raeburn Exp $ +# $Id: structuretags.pm,v 1.433 2008/10/24 16:22:54 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -74,7 +74,7 @@ sub start_tex { if ($target ne 'edit' && $target ne 'modified') { my $bodytext=&Apache::lonxml::get_all_text("/tex",$parser,$style); if ($target eq 'tex') { - return $bodytext.' '; + return $bodytext.'{}'; } } elsif ($target eq "edit" ) { my $bodytext = @@ -1392,9 +1392,15 @@ sub end_languageblock { my $result = &Apache::lonxml::endredirection(); my $which = &Apache::lonxml::get_param('which',$parstack, $safeeval); - foreach my $language (split(/\s*\,\s*/,$which)) { - unless ($language=~/\w/) { next; } - $available_texts{$language} = $result; + if ($which=~/\w/) { + $available_texts{$which} = $result; + } + my $otherlangs = &Apache::lonxml::get_param('other',$parstack, + $safeeval); + foreach my $language (split(/\s*\,\s*/,$otherlangs)) { + if ($language=~/\w/) { + $available_texts{$language} = $result; + } } } @@ -1493,7 +1499,7 @@ sub end_while { $return = &Apache::run::run($code,$safeeval); } if ($error) { - &Apache::lonxml::error('
'.&mt('Code ran too long. It ran for more than').' '.$Apache::lonnet::perlvar{'lonScriptTimeout'}.' '.&mt('seconds occured while running <while> on line').' '.$line.'
'); + &Apache::lonxml::error('
'.&mt('Code ran too long. It ran for more than').' '.$Apache::lonnet::perlvar{'lonScriptTimeout'}.' '.&mt('seconds occurred while running <while> on line').' '.$line.'
'); } } elsif ($target eq "edit") { $result.= &Apache::edit::tag_end($target,$token,''); @@ -1890,10 +1896,10 @@ sub end_startouttext { if ($target eq 'edit') { my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth; $text=&Apache::lonxml::get_all_text("endouttext",$parser,$style); - $result.=&Apache::edit::start_table($token)."".&mt('Text Block')." -".&mt('Delete:'). - &Apache::edit::deletelist($target,$token) - .""; + $result.=&Apache::edit::start_table($token)."".&mt('Text Block')."" + .''.&mt('Delete?').' ' + .&Apache::edit::deletelist($target,$token) + .''; unless ($env{'environment.wysiwygeditor'} eq 'on') { $result.='' .&Apache::lonhtmlcommon::dragmath_button($areaid,1)