--- loncom/xml/lonxml.pm 2010/01/28 18:46:47 1.494.4.3 +++ loncom/xml/lonxml.pm 2009/10/15 21:12:51 1.500 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.494.4.3 2010/01/28 18:46:47 raeburn Exp $ +# $Id: lonxml.pm,v 1.500 2009/10/15 21:12:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1043,7 +1043,7 @@ sub get_id { my ($parstack,$safeeval)=@_; my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); if ($env{'request.state'} eq 'construct' && $id =~ /([._]|[^\w\d\s[:punct:]])/) { - &error(&mt("ID [_1] contains invalid characters, IDs are only allowed to contain letters, numbers, spaces and -",''.$id.'')); + &error(&mt('ID [_1] contains invalid characters. IDs are only allowed to contain letters, numbers, spaces and -','"'.$id.'"')); } if ($id =~ /^\s*$/) { $id = $Apache::lonxml::curdepth; } return $id; @@ -1548,27 +1548,22 @@ sub renderingoptions { } my $output; unless ($env{'form.forceedit'}) { - $output .= - ''. + $output .= ' + '. &mt('Language:').' '. - &Apache::loncommon::select_form( - $env{'form.languages'}, - 'languages', - &Apache::lonlocal::texthash(%langchoices)). - ''; + &Apache::loncommon::select_form($env{'form.languages'},'languages', + %langchoices).' + '; } - $output .= - ' '. + $output .= ' + '. &mt('Math Rendering:').' '. - &Apache::loncommon::select_form( - $env{'form.texengine'}, - 'texengine', - &Apache::lonlocal::texthash - ('' => '', - 'tth' => 'tth (TeX to HTML)', - 'jsMath' => 'jsMath', - 'mimetex' => 'mimetex (Convert to Images)')). - ''; + &Apache::loncommon::select_form($env{'form.texengine'},'texengine', + ('' => '', + 'tth' => 'tth (TeX to HTML)', + 'jsMath' => 'jsMath', + 'mimetex' => 'mimetex (Convert to Images)')).' + '; return $output; } @@ -1716,8 +1711,8 @@ sub handler { $request->set_last_modified(&Apache::lonnet::metadata($request->uri, 'lastrevisiondate')); } - # Embedded Flash movies (e.g., from Camtasia) served from https will not display in IE - # if XML config file has expired from cache. + # Embedded Flash movies from Camtasia served from https will not display in IE + # if XML config file has expired from cache. if ($ENV{'SERVER_PORT'} == 443) { if ($request->uri =~ /\.xml$/) { my ($httpbrowser,$clientbrowser) = @@ -1762,10 +1757,13 @@ sub handler { if ($filecontents eq -1) { my $start_page=&Apache::loncommon::start_page('File Error'); my $end_page=&Apache::loncommon::end_page(); - my $fnf=&mt('File not found'); + my $errormsg='
' + .&mt('File not found: [_1]' + ,''.$file.'') + .'
'; $result=(<