version 1.255, 2006/03/06 18:23:10
|
version 1.256, 2006/03/15 20:56:16
|
Line 198 sub handler {
|
Line 198 sub handler {
|
&Apache::lonnet::logthis('lonsearchcat:'. |
&Apache::lonnet::logthis('lonsearchcat:'. |
'Unable to recover data from '. |
'Unable to recover data from '. |
$persistent_db_file); |
$persistent_db_file); |
my $html=&Apache::lonxml::xmlbegin(); |
my $msg = |
$r->print(<<END); |
'We were unable to retrieve data describing your search. '. |
$html |
'This is a serious error and has been logged. '. |
<head> |
'Please alert your LON-CAPA administrator.'; |
<title>LON-CAPA Search Error</title></head> |
return &error_page($r,$msg); |
$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. |
|
</body> |
|
</html> |
|
END |
|
return OK; |
|
} |
} |
} |
} |
} else { |
} else { |
Line 229 END
|
Line 222 END
|
} else { |
} else { |
# 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 $html=&Apache::lonxml::xmlbegin(); |
my $msg = 'Unable to tie hash to db file.'; |
$r->print($html.'<head></head>'.$bodytag. |
return &error_page($r,$msg); |
'Unable to tie hash to db file</body></html>'); |
|
return OK; |
|
} |
} |
} |
} |
## |
## |
Line 369 END
|
Line 360 END
|
&Apache::lonnet::logthis('lonsearchcat.pm: Unable to create '. |
&Apache::lonnet::logthis('lonsearchcat.pm: Unable to create '. |
'needed table. lonmysql error:'. |
'needed table. lonmysql error:'. |
$errorstring); |
$errorstring); |
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print(<<END); |
my $msg = |
$html |
'Unable to create table in which to store search results. '. |
<head> |
'The search has been aborted.'; |
<title>Search Error</title></head> |
return &error_page($r,$msg); |
$bodytag |
|
Unable to create table in which to store search results. |
|
The search has been aborted. |
|
</body> |
|
</html> |
|
END |
|
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 $html=&Apache::lonxml::xmlbegin(); |
my $msg= |
$r->print(<<END); |
'Unable to properly store search information. '. |
$html |
'The search has been aborted.'; |
<head> |
return &error_page($r,$msg); |
<title>Search Error</title></head> |
} |
$bodytag |
|
Unable to properly store search information. The search has been aborted. |
|
</body> |
|
</html> |
|
END |
|
return OK; |
|
} |
|
## |
## |
## Print out the frames interface |
## Print out the frames interface |
## |
## |
Line 406 END
|
Line 383 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 467 sub make_symb {
|
Line 452 sub make_symb {
|
|
|
sub course_search { |
sub course_search { |
my $r=shift; |
my $r=shift; |
my $bodytag=&Apache::loncommon::bodytag('Course Search'); |
|
my $pretty_search_string = '<b>'.$env{'form.courseexp'}.'</b>'; |
my $pretty_search_string = '<b>'.$env{'form.courseexp'}.'</b>'; |
my $search_string = $env{'form.courseexp'}; |
my $search_string = $env{'form.courseexp'}; |
my @New_Words; |
my @New_Words; |
Line 484 sub course_search {
|
Line 468 sub course_search {
|
my $discuss=$env{'form.crsdiscuss'}; |
my $discuss=$env{'form.crsdiscuss'}; |
my @allwords=($search_string,@New_Words); |
my @allwords=($search_string,@New_Words); |
$totalfound=0; |
$totalfound=0; |
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(&Apache::loncommon::start_page('Course Search'). |
$r->print($html.'<head><title>LON-CAPA Course Search</title></head>'. |
'<hr /><center><font size="+2" face="arial">'. |
$bodytag.'<hr /><center><font size="+2" face="arial">'.$pretty_search_string.'</font></center><hr /><b>'.&mt('Course content').':</b><br />'); |
$pretty_search_string.'</font></center>'. |
|
'<hr /><b>'.&mt('Course content').':</b><br />'); |
$r->rflush(); |
$r->rflush(); |
# ======================================================= Go through the course |
# ======================================================= Go through the course |
my $c=$r->connection; |
my $c=$r->connection; |
Line 584 sub course_search {
|
Line 569 sub course_search {
|
} |
} |
|
|
# =================================================== Done going through course |
# =================================================== Done going through course |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
# =============================== This pulls up a resource and its dependencies |
# =============================== This pulls up a resource and its dependencies |
Line 660 sub untiehash {
|
Line 645 sub untiehash {
|
|
|
} # End of course search scoping |
} # End of course search scoping |
|
|
sub search_html_header { |
|
my $html=&Apache::lonxml::xmlbegin(); |
|
my $Str = <<ENDHEADER; |
|
$html |
|
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
</head> |
|
ENDHEADER |
|
return $Str; |
|
} |
|
|
|
###################################################################### |
###################################################################### |
###################################################################### |
###################################################################### |
Line 687 Prints the form for the basic search. S
|
Line 662 Prints the form for the basic search. S
|
sub print_basic_search_form { |
sub print_basic_search_form { |
my ($r,$closebutton,$hidden_fields) = @_; |
my ($r,$closebutton,$hidden_fields) = @_; |
my $result = ($env{'form.catalogmode'} ne 'groupsearch'); |
my $result = ($env{'form.catalogmode'} ne 'groupsearch'); |
my $bodytag=&Apache::loncommon::bodytag('Search'). |
my $bread_crumb = |
&Apache::lonhtmlcommon::breadcrumbs(undef,'Searching','Search_Basic', |
&Apache::lonhtmlcommon::breadcrumbs(undef,'Searching','Search_Basic', |
undef,undef, |
undef,undef, |
$env{'form.catalogmode'} ne 'groupsearch'); |
$env{'form.catalogmode'} ne 'groupsearch'); |
my $scrout = &search_html_header().$bodytag; |
my $scrout = &Apache::loncommon::start_page('Search').$bread_crumb; |
if (&Apache::lonnet::allowed('bre',$env{'request.role.domain'})) { |
if (&Apache::lonnet::allowed('bre',$env{'request.role.domain'})) { |
# Define interface components |
# Define interface components |
my $userelatedwords= '<label>'. |
my $userelatedwords= '<label>'. |
Line 802 ENDCOURSESEARCH
|
Line 777 ENDCOURSESEARCH
|
</form> |
</form> |
ENDENDCOURSE |
ENDENDCOURSE |
} |
} |
$scrout.=(<<ENDDOCUMENT); |
$scrout .= &Apache::loncommon::end_page(); |
</body> |
|
</html> |
|
ENDDOCUMENT |
|
$r->print($scrout); |
$r->print($scrout); |
return; |
return; |
} |
} |
Line 824 Prints the advanced search form.
|
Line 796 Prints the advanced search form.
|
###################################################################### |
###################################################################### |
sub print_advanced_search_form{ |
sub print_advanced_search_form{ |
my ($r,$closebutton,$hidden_fields) = @_; |
my ($r,$closebutton,$hidden_fields) = @_; |
my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search'). |
my $bread_crumb = |
&Apache::lonhtmlcommon::breadcrumbs(undef,'Searching', |
&Apache::lonhtmlcommon::breadcrumbs(undef,'Searching', |
'Search_Advanced', |
'Search_Advanced', |
undef,undef, |
undef,undef, |
Line 837 sub print_advanced_search_form{
|
Line 809 sub print_advanced_search_form{
|
<input type="reset" name="reset" value='$lt{"reset"}' /> |
<input type="reset" name="reset" value='$lt{"reset"}' /> |
$closebutton |
$closebutton |
END |
END |
my $scrout=&search_html_header(); |
my $scrout= &Apache::loncommon::start_page('Advanced Catalog Search'); |
$scrout .= <<"ENDHEADER"; |
$scrout .= <<"ENDHEADER"; |
$bodytag |
$bread_crumb |
<form method="post" action="/adm/searchcat" name="advsearch"> |
<form method="post" action="/adm/searchcat" name="advsearch"> |
<p> |
<p> |
$advanced_buttons |
$advanced_buttons |
Line 1034 ENDHEADER
|
Line 1006 ENDHEADER
|
$scrout.=<<ENDDOCUMENT; |
$scrout.=<<ENDDOCUMENT; |
$advanced_buttons |
$advanced_buttons |
</form> |
</form> |
</body> |
|
</html> |
|
ENDDOCUMENT |
ENDDOCUMENT |
|
$scrout .= &Apache::loncommon::end_page(); |
$r->print($scrout); |
$r->print($scrout); |
return; |
return; |
} |
} |
Line 2046 sub ensure_db_and_table {
|
Line 2017 sub ensure_db_and_table {
|
if (! defined($table) || $table eq '' || $table =~ /\D/ ) { |
if (! defined($table) || $table eq '' || $table =~ /\D/ ) { |
$r->print("Unable to retrieve search results. ". |
$r->print("Unable to retrieve search results. ". |
"Unable to determine the table results were stored in. ". |
"Unable to determine the table results were stored in. ". |
"</body></html>"); |
&Apache::loncommon::end_page()); |
return undef; |
return undef; |
} |
} |
## |
## |
Line 2055 sub ensure_db_and_table {
|
Line 2026 sub ensure_db_and_table {
|
my $connection_result = &Apache::lonmysql::connect_to_db(); |
my $connection_result = &Apache::lonmysql::connect_to_db(); |
if (!defined($connection_result)) { |
if (!defined($connection_result)) { |
$r->print("Unable to connect to the MySQL database where your results". |
$r->print("Unable to connect to the MySQL database where your results". |
" are stored. </body></html>"); |
" are stored.". |
|
&Apache::loncommon::end_page()); |
&Apache::lonnet::logthis("lonsearchcat: unable to get lonmysql to". |
&Apache::lonnet::logthis("lonsearchcat: unable to get lonmysql to". |
" connect to database."); |
" connect to database."); |
&Apache::lonnet::logthis(&Apache::lonmysql::get_error()); |
&Apache::lonnet::logthis(&Apache::lonmysql::get_error()); |
Line 2063 sub ensure_db_and_table {
|
Line 2035 sub ensure_db_and_table {
|
} |
} |
my $table_check = &Apache::lonmysql::check_table($table); |
my $table_check = &Apache::lonmysql::check_table($table); |
if (! defined($table_check)) { |
if (! defined($table_check)) { |
$r->print("A MySQL error has occurred.</form></body></html>"); |
$r->print("A MySQL error has occurred.</form>". |
|
&Apache::loncommon::end_page()); |
&Apache::lonnet::logthis("lonmysql was unable to determine the status". |
&Apache::lonnet::logthis("lonmysql was unable to determine the status". |
" of table ".$table); |
" of table ".$table); |
return undef; |
return undef; |
Line 2121 sub print_sort_form {
|
Line 2094 sub print_sort_form {
|
## |
## |
my $total_results = &Apache::lonmysql::number_of_rows($table); |
my $total_results = &Apache::lonmysql::number_of_rows($table); |
if (! defined($total_results)) { |
if (! defined($total_results)) { |
$r->print("A MySQL error has occurred.</form></body></html>"); |
$r->print("A MySQL error has occurred.</form>". |
|
&Apache::loncommon::end_page()); |
&Apache::lonnet::logthis("lonmysql was unable to determine the number". |
&Apache::lonnet::logthis("lonmysql was unable to determine the number". |
" of rows in table ".$table); |
" of rows in table ".$table); |
&Apache::lonnet::logthis(&Apache::lonmysql::get_error()); |
&Apache::lonnet::logthis(&Apache::lonmysql::get_error()); |
return; |
return; |
} |
} |
my $result; |
my $result; |
my $html=&Apache::lonxml::xmlbegin(); |
my $html = &Apache::lonxml::xmlbegin(); |
|
my $head = &Apache::lonxml::headtag('Results'); |
|
my $end_head = &Apache::loncommon::endheadtag(); |
$result.=<<END; |
$result.=<<END; |
$html |
$html |
<head> |
$head |
<script> |
<script> |
function change_sort() { |
function change_sort() { |
var newloc = "/adm/searchcat?phase=results"; |
var newloc = "/adm/searchcat?phase=results"; |
Line 2141 $html
|
Line 2117 $html
|
parent.resultsframe.location= newloc; |
parent.resultsframe.location= newloc; |
} |
} |
</script> |
</script> |
<title>Results</title> |
$end_head |
</head> |
|
$bodytag |
$bodytag |
<form name="statusform" action="" method="post"> |
<form name="statusform" action="" method="post"> |
<input type="hidden" name="Queue" value="" /> |
<input type="hidden" name="Queue" value="" /> |
Line 2167 There are $total_results matches to your
|
Line 2142 There are $total_results matches to your
|
Search:$pretty_query_string |
Search:$pretty_query_string |
</p> |
</p> |
</form> |
</form> |
</body> |
|
</html> |
|
END |
END |
$r->print($result); |
$r->print($result.&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
|
|
Line 2370 sub run_search {
|
Line 2343 sub run_search {
|
# |
# |
# Print run_search header |
# Print run_search header |
# |
# |
my $html=&Apache::lonxml::xmlbegin(); |
my $html = &Apache::lonxml::xmlbegin(); |
|
my $head = &Apache::loncommon::head('Search Status'); |
$r->print(<<END); |
$r->print(<<END); |
$html |
$html |
<head> |
$head |
<title>Search Status</title></head> |
|
$bodytag |
$bodytag |
<form name="statusform" action="" method="post"> |
<form name="statusform" action="" method="post"> |
<input type="hidden" name="Queue" value="" /> |
<input type="hidden" name="Queue" value="" /> |
Line 2410 END
|
Line 2383 END
|
my $table =$env{'form.table'}; |
my $table =$env{'form.table'}; |
if (! defined($table) || $table eq '' || $table =~ /\D/ ) { |
if (! defined($table) || $table eq '' || $table =~ /\D/ ) { |
$r->print("Unable to determine table id to store search results in.". |
$r->print("Unable to determine table id to store search results in.". |
"The search has been aborted.</body></html>"); |
"The search has been aborted.". |
|
&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
my $table_status = &Apache::lonmysql::check_table($table); |
my $table_status = &Apache::lonmysql::check_table($table); |
if (! defined($table_status)) { |
if (! defined($table_status)) { |
$r->print("Unable to determine status of table.</body></html>"); |
$r->print("Unable to determine status of table.". |
|
&Apache::loncommon::end_page()); |
&Apache::lonnet::logthis("Bogus table id of $table for ". |
&Apache::lonnet::logthis("Bogus table id of $table for ". |
"$env{'user.name'} @ $env{'user.domain'}"); |
"$env{'user.name'} @ $env{'user.domain'}"); |
&Apache::lonnet::logthis("lonmysql error = ". |
&Apache::lonnet::logthis("lonmysql error = ". |
Line 2429 END
|
Line 2404 END
|
&Apache::lonmysql::get_debug()); |
&Apache::lonmysql::get_debug()); |
&Apache::lonnet::logthis('table status = "'.$table_status.'"'); |
&Apache::lonnet::logthis('table status = "'.$table_status.'"'); |
$r->print("The table id,$table, we tried to use is invalid.". |
$r->print("The table id,$table, we tried to use is invalid.". |
"The search has been aborted.</body></html>"); |
"The search has been aborted.". |
|
&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
## |
## |
Line 2558 END
|
Line 2534 END
|
# We have run out of time or run out of servers to talk to and |
# We have run out of time or run out of servers to talk to and |
# results to get, so let the client know the top frame needs to be |
# results to get, so let the client know the top frame needs to be |
# loaded from /adm/searchcat |
# loaded from /adm/searchcat |
$r->print("</body></html>"); |
$r->print(&Apache::loncommon::end_page()); |
# if ($env{'form.catalogmode'} ne 'groupsearch') { |
# if ($env{'form.catalogmode'} ne 'groupsearch') { |
$r->print("<script>". |
$r->print("<script>". |
"window.location='/adm/searchcat?". |
"window.location='/adm/searchcat?". |
Line 2637 sub display_results {
|
Line 2613 sub display_results {
|
if ($env{'form.catalogmode'} eq 'groupsearch') { |
if ($env{'form.catalogmode'} eq 'groupsearch') { |
if (! tie(%groupsearch_db,'GDBM_File',$diropendb, |
if (! tie(%groupsearch_db,'GDBM_File',$diropendb, |
&GDBM_WRCREAT(),0640)) { |
&GDBM_WRCREAT(),0640)) { |
$r->print('Unable to store import results.</form></body></html>'); |
$r->print('Unable to store import results.</form>'. |
|
&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |
return; |
return; |
} |
} |
Line 2650 sub display_results {
|
Line 2627 sub display_results {
|
## Get the number of results |
## Get the number of results |
my $total_results = &Apache::lonmysql::number_of_rows($table); |
my $total_results = &Apache::lonmysql::number_of_rows($table); |
if (! defined($total_results)) { |
if (! defined($total_results)) { |
$r->print("A MySQL error has occurred.</form></body></html>"); |
$r->print("A MySQL error has occurred.</form>". |
|
&Apache::loncommon::end_page()); |
&Apache::lonnet::logthis("lonmysql was unable to determine the number". |
&Apache::lonnet::logthis("lonmysql was unable to determine the number". |
" of rows in table ".$table); |
" of rows in table ".$table); |
&Apache::lonnet::logthis(&Apache::lonmysql::get_error()); |
&Apache::lonnet::logthis(&Apache::lonmysql::get_error()); |
Line 2757 sub display_results {
|
Line 2735 sub display_results {
|
&viewoptions().'</td></tr></table>' |
&viewoptions().'</td></tr></table>' |
); |
); |
if ($total_results == 0) { |
if ($total_results == 0) { |
$r->print('<meta HTTP-EQUIV="Refresh" CONTENT="2">'. |
$r->print('<meta HTTP-EQUIV="Refresh" CONTENT="2" />'. |
'<h3>'.&mt('There are currently no results').'.</h3>'. |
'<h3>'.&mt('There are currently no results').'.</h3>'. |
"</form></body></html>"); |
"</form>". |
|
&Apache::loncommon::end_page()); |
return; |
return; |
} else { |
} else { |
$r->print('<center>'. |
$r->print('<center>'. |
Line 2822 sub display_results {
|
Line 2801 sub display_results {
|
."</center>\n" |
."</center>\n" |
); |
); |
} |
} |
$r->print("</form></body></html>"); |
$r->print("</form>".&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |
untie %groupsearch_db if (tied(%groupsearch_db)); |
untie %groupsearch_db if (tied(%groupsearch_db)); |
return; |
return; |
Line 3019 the name of the input field to put the t
|
Line 2998 the name of the input field to put the t
|
###################################################################### |
###################################################################### |
sub search_results_header { |
sub search_results_header { |
my ($importbutton,$closebutton) = @_; |
my ($importbutton,$closebutton) = @_; |
my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1); |
my $result = |
my $result = ''; |
&Apache::lonxml::xmlbegin(). |
|
&Apache::loncommon::headtag(); |
|
|
# output beginning of search page |
# output beginning of search page |
# conditional output of script functions dependent on the mode in |
# conditional output of script functions dependent on the mode in |
# which the search was invoked |
# which the search was invoked |
Line 3110 SCRIPT
|
Line 3091 SCRIPT
|
} |
} |
</script> |
</script> |
SCRIPT |
SCRIPT |
|
|
|
my $end_head = &Apache::loncommon::endheadtag(); |
|
my $bodytag = &Apache::loncommon::bodytag(undef,undef,undef,1); |
$result.=<<END; |
$result.=<<END; |
</head> |
$end_head |
$bodytag |
$bodytag |
<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 3123 END
|
Line 3107 END
|
###################################################################### |
###################################################################### |
###################################################################### |
###################################################################### |
sub search_status_header { |
sub search_status_header { |
my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1); |
my $bodytag = &Apache::loncommon::bodytag(undef,undef,undef,1); |
my $html=&Apache::lonxml::xmlbegin(); |
my $html = &Apache::lonxml::xmlbegin(); |
|
my $head = &Apache::loncommon::head('Search Status'); |
return <<ENDSTATUS; |
return <<ENDSTATUS; |
$html |
$html |
<head> |
$head |
<title>Search Status</title></head> |
|
$bodytag |
$bodytag |
<h3>Search Status</h3> |
<h3>Search Status</h3> |
Sending search request to LON-CAPA servers.<br /> |
Sending search request to LON-CAPA servers.<br /> |
Line 3151 sub print_frames_interface {
|
Line 3135 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 $html=&Apache::lonxml::xmlbegin(); |
my $html = &Apache::lonxml::xmlbegin(); |
|
my $head = &Apache::loncommon::headtag('LON-CAPA Digital Library Search Results'); |
|
my $end_head = &Apache::loncommon::endheadtag(); |
my $result = <<"ENDFRAMES"; |
my $result = <<"ENDFRAMES"; |
$html |
$html |
<head> |
$head |
<script> |
<script> |
var targetwin = opener; |
var targetwin = opener; |
var queue = ''; |
var queue = ''; |
</script> |
</script> |
<title>LON-CAPA Digital Library Search Results</title> |
$end_head |
</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"> |
Line 3592 sub output_unparsed_phrase_error {
|
Line 3577 sub output_unparsed_phrase_error {
|
} else { |
} else { |
$errorstring = &mt('Unable to understand the search phrase <b>[_1]</b>:<i>[_2]</i>.',$field,$env{'form.'.$field}); |
$errorstring = &mt('Unable to understand the search phrase <b>[_1]</b>:<i>[_2]</i>.',$field,$env{'form.'.$field}); |
} |
} |
my $bodytag = &Apache::loncommon::bodytag('Search'); |
|
my $heading = &mt('Unparsed Field'); |
my $heading = &mt('Unparsed Field'); |
my $revise = &mt('Revise search request'); |
my $revise = &mt('Revise search request'); |
# make query information persistent to allow for subsequent revision |
# make query information persistent to allow for subsequent revision |
my $html=&Apache::lonxml::xmlbegin(); |
my $start_page = &Apache::loncommon::start_page('Search'); |
|
my $end_page = &Apache::loncommon::end_page(); |
$r->print(<<ENDPAGE); |
$r->print(<<ENDPAGE); |
$html |
$start_page |
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
</head> |
|
$bodytag |
|
<form method="post" action="/adm/searchcat"> |
<form method="post" action="/adm/searchcat"> |
$hidden_fields |
$hidden_fields |
$closebutton |
$closebutton |
Line 3614 $errorstring
|
Line 3595 $errorstring
|
<p> |
<p> |
<a href="/adm/searchcat?$parms&persistent_db_id=$env{'form.persistent_db_id'}">$revise</a> |
<a href="/adm/searchcat?$parms&persistent_db_id=$env{'form.persistent_db_id'}">$revise</a> |
</p> |
</p> |
</body> |
$end_page |
</html> |
|
ENDPAGE |
ENDPAGE |
} |
} |
|
|
Line 3645 sub output_blank_field_error {
|
Line 3625 sub output_blank_field_error {
|
my $errormsg = &mt('You did not fill in enough information for the search to be started. You need to fill in relevant fields on the search page in order for a query to be processed.'); |
my $errormsg = &mt('You did not fill in enough information for the search to be started. You need to fill in relevant fields on the search page in order for a query to be processed.'); |
my $revise = &mt('Revise Search Request'); |
my $revise = &mt('Revise Search Request'); |
my $heading = &mt('Unactionable Search Queary'); |
my $heading = &mt('Unactionable Search Queary'); |
my $html=&Apache::lonxml::xmlbegin(); |
my $start_page = &Apache::loncommon::start_page('Search'); |
|
my $end_page = &Apache::loncommon::end_page(); |
$r->print(<<ENDPAGE); |
$r->print(<<ENDPAGE); |
$html |
$start_page |
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
</head> |
|
$bodytag |
|
<form method="post" action="/adm/searchcat"> |
<form method="post" action="/adm/searchcat"> |
$hidden_fields |
$hidden_fields |
$closebutton |
$closebutton |
Line 3663 $errormsg
|
Line 3640 $errormsg
|
<p> |
<p> |
<a href="/adm/searchcat?$parms&persistent_db_id=$env{'form.persistent_db_id'}">$revise</a> |
<a href="/adm/searchcat?$parms&persistent_db_id=$env{'form.persistent_db_id'}">$revise</a> |
</p> |
</p> |
</body> |
$end_page |
</html> |
|
ENDPAGE |
ENDPAGE |
return; |
return; |
} |
} |
Line 3691 Inputs:
|
Line 3667 Inputs:
|
sub output_date_error { |
sub output_date_error { |
my ($r,$message,$closebutton,$hidden_fields)=@_; |
my ($r,$message,$closebutton,$hidden_fields)=@_; |
# make query information persistent to allow for subsequent revision |
# make query information persistent to allow for subsequent revision |
my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1); |
my $start_page = &Apache::loncommon::start_page('Search'); |
my $html=&Apache::lonxml::xmlbegin(); |
my $end_page = &Apache::loncommon::end_page(); |
$r->print(<<RESULTS); |
$r->print(<<RESULTS); |
$html |
$start_page |
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
</head> |
|
$bodytag |
|
<img align='right' src='/adm/lonIcons/lonlogos.gif' /> |
|
<h1>Search Catalog</h1> |
|
<form method="post" action="/adm/searchcat"> |
<form method="post" action="/adm/searchcat"> |
$hidden_fields |
$hidden_fields |
<input type='button' value='Revise search request' |
<input type='button' value='Revise search request' |
Line 3711 $closebutton
|
Line 3681 $closebutton
|
<p> |
<p> |
$message |
$message |
</p> |
</p> |
</body> |
$end_page |
</html> |
|
RESULTS |
RESULTS |
} |
} |
|
|