version 1.257, 2006/03/19 21:54:41
|
version 1.261, 2006/04/07 21:56:01
|
Line 199 sub handler {
|
Line 199 sub handler {
|
'We were unable to retrieve data describing your search. '. |
'We were unable to retrieve data describing your search. '. |
'This is a serious error and has been logged. '. |
'This is a serious error and has been logged. '. |
'Please alert your LON-CAPA administrator.'; |
'Please alert your LON-CAPA administrator.'; |
return &error_page($r,$msg); |
&Apache::loncommon::simple_error_page($r,'Search Error', |
|
$msg); |
|
return OK; |
} |
} |
} |
} |
} else { |
} else { |
Line 220 sub handler {
|
Line 222 sub handler {
|
# This is a stupid error to give to the user. |
# This is a stupid error to give to the user. |
# It really tells them nothing. |
# It really tells them nothing. |
my $msg = 'Unable to tie hash to db file.'; |
my $msg = 'Unable to tie hash to db file.'; |
return &error_page($r,$msg); |
&Apache::loncommon::simple_error_page($r,'Search Error', |
|
$msg); |
|
return OK; |
} |
} |
} |
} |
## |
## |
Line 361 END
|
Line 365 END
|
my $msg = |
my $msg = |
'Unable to create table in which to store search results. '. |
'Unable to create table in which to store search results. '. |
'The search has been aborted.'; |
'The search has been aborted.'; |
return &error_page($r,$msg); |
&Apache::loncommon::simple_error_page($r,'Search Error', |
|
$msg); |
|
return OK; |
} |
} |
delete($env{'form.launch'}); |
delete($env{'form.launch'}); |
if (! &make_form_data_persistent($r,$persistent_db_file)) { |
if (! &make_form_data_persistent($r,$persistent_db_file)) { |
my $msg= |
my $msg= |
'Unable to properly store search information. '. |
'Unable to properly store search information. '. |
'The search has been aborted.'; |
'The search has been aborted.'; |
return &error_page($r,$msg); |
&Apache::loncommon::simple_error_page($r,'Search Error', |
|
$msg); |
|
return OK; |
} |
} |
## |
## |
## Print out the frames interface |
## Print out the frames interface |
Line 380 END
|
Line 388 END
|
return OK; |
return OK; |
} |
} |
|
|
sub error_page { |
|
my ($r,$msg) = @_; |
|
$r->print(&Apache::loncommon::start_page('Search Error'). |
|
&mt($msg). |
|
&Apache::loncommon::end_page()); |
|
return OK; |
|
} |
|
|
|
# |
# |
# The mechanism used to store values away and retrieve them does not |
# The mechanism used to store values away and retrieve them does not |
# handle the case of missing environment variables being significant. |
# handle the case of missing environment variables being significant. |
Line 2106 sub print_sort_form {
|
Line 2106 sub print_sort_form {
|
</script> |
</script> |
END |
END |
|
|
my $head = &Apache::loncommon::start_page('Results',$js, |
my $start_page = &Apache::loncommon::start_page('Results',$js, |
{'only_body' => 1}); |
{'only_body' => 1}); |
my $breadcrumbs= |
my $breadcrumbs= |
&Apache::lonhtmlcommon::breadcrumbs |
&Apache::lonhtmlcommon::breadcrumbs |
(undef,'Searching','Searching',undef,undef, |
(undef,'Searching','Searching',undef,undef, |
Line 2337 sub run_search {
|
Line 2337 sub run_search {
|
# |
# |
# Print run_search header |
# Print run_search header |
# |
# |
my $head = &Apache::loncommon::start_page('Search Status',undef, |
my $start_page = &Apache::loncommon::start_page('Search Status',undef, |
{'only_body' => 1}); |
{'only_body' => 1}); |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs |
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs |
(undef,'Searching','Searching',undef,undef, |
(undef,'Searching','Searching',undef,undef, |
$env{'form.catalogmode'} ne 'groupsearch'); |
$env{'form.catalogmode'} ne 'groupsearch'); |
Line 3088 SCRIPT
|
Line 3088 SCRIPT
|
|
|
my $start_page = &Apache::loncommon::start_page(undef,$js, |
my $start_page = &Apache::loncommon::start_page(undef,$js, |
{'only_body' =>1}); |
{'only_body' =>1}); |
$result.=<<END; |
my $result=<<END; |
$start_page |
$start_page |
<form name="results" method="post" action="/adm/searchcat" > |
<form name="results" method="post" action="/adm/searchcat" > |
<input type="hidden" name="Queue" value="" /> |
<input type="hidden" name="Queue" value="" /> |
Line 3125 sub print_frames_interface {
|
Line 3125 sub print_frames_interface {
|
"&persistent_db_id=".$env{'form.persistent_db_id'}; |
"&persistent_db_id=".$env{'form.persistent_db_id'}; |
my $run_search_link = $basic_link."&phase=run_search"; |
my $run_search_link = $basic_link."&phase=run_search"; |
my $results_link = &results_link(); |
my $results_link = &results_link(); |
|
my $js = <<JS; |
|
<script type="text/javascript"> |
|
var targetwin = opener; |
|
var queue = ''; |
|
</script> |
|
JS |
my $html = &Apache::lonxml::xmlbegin(); |
my $html = &Apache::lonxml::xmlbegin(); |
my $head = &Apache::loncommon::headtag('LON-CAPA Digital Library Search Results'); |
my $head = &Apache::loncommon::head('LON-CAPA Digital Library Search Results',$js); |
my $end_head = &Apache::loncommon::endheadtag(); |
|
my $result = <<"ENDFRAMES"; |
my $result = <<"ENDFRAMES"; |
$html |
$html |
$head |
$head |
<script> |
|
var targetwin = opener; |
|
var queue = ''; |
|
</script> |
|
$end_head |
|
<frameset rows="150,*"> |
<frameset rows="150,*"> |
<frame name="statusframe" src="$run_search_link"> |
<frame name="statusframe" src="$run_search_link"> |
<frame name="resultsframe" src="$results_link"> |
<frame name="resultsframe" src="$results_link"> |