--- loncom/interface/lonsearchcat.pm 2002/09/16 13:05:54 1.153.2.1 +++ loncom/interface/lonsearchcat.pm 2002/09/16 20:09:45 1.157 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.153.2.1 2002/09/16 13:05:54 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.157 2002/09/16 20:09:45 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -115,6 +115,11 @@ that produces it. Adding a new view typ adding a line to the definition of this hash and making sure the function takes the proper parameters. +=item $bodytag + +LON-CAPA standard body tag, gotten from &Apache::lonnet::bodytag. +No title, no table, just a tag. + =back =cut @@ -136,6 +141,8 @@ my %Views = ("Detailed Citation View" => "Compact View" => \&compact_view); my %persistent_db; my $hidden_fields; +my $bodytag; + ###################################################################### ###################################################################### @@ -164,6 +171,10 @@ string that holds portions of the screen sub handler { my $r = shift; # + + my $loaderror=&Apache::lonnet::overloaderror($r); + if ($loaderror) { return $loaderror; } + my $closebutton; # button that closes the search window # This button is different for the RAT compared to # normal invocation. @@ -205,6 +216,7 @@ sub handler { ($ENV{'form.launch'} eq '1')) { $ENV{'form.persistent_db_id'} = time; } + $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1); my $persistent_db_file = "/home/httpd/perl/tmp/". &Apache::lonnet::escape($domain). '_'.&Apache::lonnet::escape($ENV{'user.name'}). @@ -217,7 +229,7 @@ sub handler { $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. @@ -236,8 +248,10 @@ END &start_fresh_session(); untie %groupsearch_db; } else { - $r->print('Unable to tie hash to db '. - 'file'); + # This is a stupid error to give to the user. + # It really tells them nothing. + $r->print(''.$bodytag. + 'Unable to tie hash to db file'); return OK; } } @@ -332,7 +346,7 @@ END if (! defined(&create_results_table())) { $r->print(<Search Error - +$bodytag Unable to create table in which to store search results. The search has been aborted. @@ -344,7 +358,7 @@ END if (! &make_form_data_persistent($r,$persistent_db_file)) { $r->print(<Search Error - +$bodytag Unable to properly store search information. The search has been aborted. @@ -393,6 +407,7 @@ Returns a scalar which holds html for th sub print_basic_search_form{ my ($r,$closebutton) = @_; + my $bodytag=&Apache::loncommon::bodytag('Catalog Search'); my $scrout=<<"ENDDOCUMENT"; @@ -405,13 +420,10 @@ sub print_basic_search_form{ } - - -

Search Catalog

+$bodytag
$hidden_fields -

Basic Search

Enter terms or phrases separated by AND, OR, or NOT then press SEARCH below. @@ -477,6 +489,7 @@ END if (!defined($ENV{'form.viewselect'})) { $ENV{'form.viewselect'} ="Detailed Citation View"; } + my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search'); my $scrout=<<"ENDHEADER"; @@ -489,10 +502,7 @@ END } - - -

Advanced Catalog Search

-
+$bodytag Enter terms or phrases separated by search operators such as AND, OR, or NOT.
@@ -1674,7 +1684,7 @@ sub print_sort_form { Results - +$bodytag END @@ -1892,7 +1902,7 @@ sub run_search { $r->print(< Search Status - +$bodytag END @@ -2546,6 +2556,7 @@ SCRIPT SCRIPT $result.=< +$bodytag $importbutton @@ -2558,7 +2569,7 @@ END sub search_status_header { return <Search Status - +$bodytag

Search Status

Sending search request to LON-CAPA servers.
ENDSTATUS @@ -2830,7 +2841,7 @@ sub output_blank_field_error { BEGINNING $r->print(< - +$bodytag

Search Catalog

@@ -2877,7 +2888,7 @@ sub output_date_error { The LearningOnline Network with CAPA - +$bodytag

Search Catalog