--- loncom/interface/lonsearchcat.pm 2005/02/02 22:02:41 1.237 +++ loncom/interface/lonsearchcat.pm 2005/02/17 08:29:43 1.238 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.237 2005/02/02 22:02:41 albertel Exp $ +# $Id: lonsearchcat.pm,v 1.238 2005/02/17 08:29:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -195,9 +195,11 @@ sub handler { &Apache::lonnet::logthis('lonsearchcat:'. 'Unable to recover data from '. $persistent_db_file); - $r->print(< -LON-CAPA Search Error + my $html=&Apache::lonxml::xmlbegin(); + $r->print(< +LON-CAPA Search Error $bodytag We were unable to retrieve data describing your search. This is a serious error and has been logged. Please alert your LON-CAPA administrator. @@ -224,7 +226,8 @@ END } else { # This is a stupid error to give to the user. # It really tells them nothing. - $r->print(''.$bodytag. + my $html=&Apache::lonxml::xmlbegin(); + $r->print($html.''.$bodytag. 'Unable to tie hash to db file'); return OK; } @@ -368,8 +371,11 @@ END &Apache::lonnet::logthis('lonsearchcat.pm: Unable to create '. 'needed table. lonmysql error:'. $errorstring); + my $html=&Apache::lonxml::xmlbegin(); $r->print(<Search Error +$html + +Search Error $bodytag Unable to create table in which to store search results. The search has been aborted. @@ -380,8 +386,11 @@ END } delete($ENV{'form.launch'}); if (! &make_form_data_persistent($r,$persistent_db_file)) { - $r->print(<Search Error + my $html=&Apache::lonxml::xmlbegin(); + $r->print(< +Search Error $bodytag Unable to properly store search information. The search has been aborted. @@ -477,7 +486,8 @@ sub course_search { my $discuss=$ENV{'form.crsdiscuss'}; my @allwords=($search_string,@New_Words); $totalfound=0; - $r->print('LON-CAPA Course Search'. + my $html=&Apache::lonxml::xmlbegin(); + $r->print($html.'LON-CAPA Course Search'. $bodytag.'
'.$pretty_search_string.'

'.&mt('Course content').':
'); $r->rflush(); # ======================================================= Go through the course @@ -653,8 +663,9 @@ sub untiehash { } # End of course search scoping sub search_html_header { + my $html=&Apache::lonxml::xmlbegin(); my $Str = < +$html The LearningOnline Network with CAPA @@ -2111,8 +2122,9 @@ sub print_sort_form { return; } my $result; + my $html=&Apache::lonxml::xmlbegin(); $result.=< +$html