version 1.307, 2009/05/15 14:48:42
|
version 1.312, 2009/07/31 10:58:57
|
Line 191 sub handler {
|
Line 191 sub handler {
|
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/searchcat?'. |
({href=>'/adm/searchcat?'. |
&Apache::loncommon::inhibit_menu_check(). |
&Apache::loncommon::inhibit_menu_check(). |
'&catalogmode='.$env{'form.catalogmode'}. |
'&catalogmode='.$env{'form.catalogmode'}. |
'&launch='.$env{'form.launch'}. |
'&launch='.$env{'form.launch'}. |
'&mode='.$env{'form.mode'}, |
'&mode='.$env{'form.mode'}, |
text=>"$crumb_text", |
text=>"$crumb_text", |
target=>'_top', |
target=>'_top', |
bug=>'Searching',}); |
bug=>'Searching',}); |
Line 314 END
|
Line 314 END
|
} |
} |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check(). |
({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check(). |
'&phase=disp_adv'. |
'&phase=disp_adv'. |
'&catalogmode='.$env{'form.catalogmode'}. |
'&catalogmode='.$env{'form.catalogmode'}. |
'&launch='.$env{'form.launch'}. |
'&launch='.$env{'form.launch'}. |
'&mode='.$env{'form.mode'}, |
'&mode='.$env{'form.mode'}, |
text=>"Advanced $srchtype Search", |
text=>"Advanced $srchtype Search", |
bug=>'Searching',}); |
bug=>'Searching',}); |
} elsif ($env{'form.searchmode'} eq 'course search') { |
} elsif ($env{'form.searchmode'} eq 'course search') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check(). |
({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check(). |
'&phase=disp_adv'. |
'&phase=disp_adv'. |
'catalogmode='.$env{'form.catalogmode'}. |
'catalogmode='.$env{'form.catalogmode'}. |
'&launch='.$env{'form.launch'}. |
'&launch='.$env{'form.launch'}. |
'&mode='.$env{'form.mode'}, |
'&mode='.$env{'form.mode'}, |
text=>"Course Search", |
text=>"Course Search", |
bug=>'Searching',}); |
bug=>'Searching',}); |
} |
} |
Line 488 sub course_search {
|
Line 488 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; |
$r->print(&Apache::loncommon::start_page('Course Search'). |
|
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check(). |
|
'&phase=disp_adv'. |
|
'catalogmode='.$env{'form.catalogmode'}. |
|
'&launch='.$env{'form.launch'}. |
|
'&mode='.$env{'form.mode'}, |
|
text=>"Course Search", |
|
bug=>'Searching',}); |
|
$r->print(&Apache::loncommon::start_page('Course Search')); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Searching','Searching', |
|
$env{'form.catalogmode'} ne 'import')); |
|
|
|
$r->print( |
'<hr /><center><font size="+2" face="arial">'. |
'<hr /><center><font size="+2" face="arial">'. |
$pretty_search_string.'</font></center>'. |
$pretty_search_string.'</font></center>'. |
'<hr /><b>'.&mt('Course content').':</b><br />'); |
'<hr /><b>'.&mt('Course content').':</b><br />'); |
Line 511 sub course_search {
|
Line 524 sub course_search {
|
untie(%hash); |
untie(%hash); |
} |
} |
unless ($totalfound) { |
unless ($totalfound) { |
$r->print('<p>'.&mt('No matches found in resources').'.</p>'); |
$r->print('<p class="LC_info">'.&mt('No matches found in resources.').'</p>'); |
} |
} |
|
|
# Check discussions if requested |
# Check discussions if requested |
Line 571 sub course_search {
|
Line 584 sub course_search {
|
$url = '/res/'.$url; |
$url = '/res/'.$url; |
} |
} |
if ($url =~ /\?/) { |
if ($url =~ /\?/) { |
$url .= '&symb='; |
$url .= '&symb='; |
} else { |
} else { |
$url .= '?symb='; |
$url .= '?symb='; |
} |
} |
Line 586 sub course_search {
|
Line 599 sub course_search {
|
} |
} |
} |
} |
unless ($totaldiscussions) { |
unless ($totaldiscussions) { |
$r->print('<p>'.&mt('No matches found in postings').'.</p>'); |
$r->print('<p class="LC_info">'.&mt('No matches found in postings.').'</p>'); |
} |
} |
} else { |
} else { |
$r->print('<div class="LC_error">'.&mt('An error occurred retrieving information about resources in the course.').'<br />'.&mt('It is recommended that you [_1]re-initialize the course[_2] and then try your search again.','<a href="/adm/roles">','</a>').'</div>'); |
$r->print('<div class="LC_error">'.&mt('An error occurred retrieving information about resources in the course.').'<br />'.&mt('It is recommended that you [_1]re-initialize the course[_2] and then try your search again.','<a href="/adm/roles">','</a>').'</div>'); |
Line 716 $hidden_fields
|
Line 729 $hidden_fields
|
<p> |
<p> |
$lt{'note'}. |
$lt{'note'}. |
</p> |
</p> |
<p> |
|
<table> |
<table> |
<tr><td> |
<tr><td> |
ENDCOURSESEARCH |
ENDCOURSESEARCH |
Line 737 ENDCOURSESEARCH
|
Line 749 ENDCOURSESEARCH
|
<tr><td><label>$relcheckbox $lt{'use'}</label></td><td></td></tr> |
<tr><td><label>$relcheckbox $lt{'use'}</label></td><td></td></tr> |
<tr><td><label>$crscheckbox $lt{'full'}</label></td><td></td></tr> |
<tr><td><label>$crscheckbox $lt{'full'}</label></td><td></td></tr> |
<tr><td><label>$discheckbox $lt{'disc'}</label></td><td></td></tr> |
<tr><td><label>$discheckbox $lt{'disc'}</label></td><td></td></tr> |
</table><p> |
</table> |
<input type="submit" name="coursesubmit" value='$lt{'srch'}' /> |
<p> |
|
<input type="submit" name="coursesubmit" value='$lt{'srch'}' /> |
</p> |
</p> |
</center> |
</center> |
</form> |
</form> |
Line 767 sub setup_basic_search {
|
Line 780 sub setup_basic_search {
|
'</label>'; |
'</label>'; |
$adv_search_link = '<a href="/adm/searchcat?'. |
$adv_search_link = '<a href="/adm/searchcat?'. |
&Apache::loncommon::inhibit_menu_check(). |
&Apache::loncommon::inhibit_menu_check(). |
'&phase=disp_adv'. |
'&phase=disp_adv'. |
'&catalogmode='.$env{'form.catalogmode'}. |
'&catalogmode='.$env{'form.catalogmode'}. |
'&launch='.$env{'form.launch'}. |
'&launch='.$env{'form.launch'}. |
'&mode='.$env{'form.mode'}. |
'&mode='.$env{'form.mode'}. |
'&area='.$area. |
'&area='.$area. |
'&form='.$env{'form.form'}. |
'&form='.$env{'form.form'}. |
'&titleelement='.$env{'form.titleelement'}. |
'&titleelement='.$env{'form.titleelement'}. |
'&element='.$env{'form.element'}. |
'&element='.$env{'form.element'}. |
'">'.&mt('Advanced Search').'</a>'; |
'">'.&mt('Advanced Search').'</a>'; |
# |
# |
$scrout.='<form name="loncapa_search" method="post" '. |
$scrout.='<form name="loncapa_search" method="post" '. |
Line 926 ENDHEADER
|
Line 939 ENDHEADER
|
&titlefield(&mt('Domains')).'</td><td colspan="2">'. |
&titlefield(&mt('Domains')).'</td><td colspan="2">'. |
&Apache::loncommon::domain_select('domains', |
&Apache::loncommon::domain_select('domains', |
$env{'form.domains'},1). |
$env{'form.domains'},1). |
'<br /><label>'; |
'<br />'; |
$scrout .= '</td></tr>'.$/; |
$scrout .= '</td></tr>'.$/; |
# |
# |
# Misc metadata |
# Misc metadata |
Line 2240 sub print_sort_form {
|
Line 2253 sub print_sort_form {
|
<script type="text/javascript"> |
<script type="text/javascript"> |
function change_sort() { |
function change_sort() { |
var newloc = "/adm/searchcat?phase=results"; |
var newloc = "/adm/searchcat?phase=results"; |
newloc += "&persistent_db_id=$env{'form.persistent_db_id'}"; |
newloc += "&persistent_db_id=$env{'form.persistent_db_id'}"; |
newloc += "&sortby="; |
newloc += "&sortby="; |
newloc += document.forms.statusform.elements.sortby.value; |
newloc += document.forms.statusform.elements.sortby.value; |
parent.resultsframe.location= newloc; |
parent.resultsframe.location= newloc; |
} |
} |
Line 2454 sub revise_button {
|
Line 2467 sub revise_button {
|
$revise_phase = 'disp_adv' if ($env{'form.searchmode'} eq 'advanced'); |
$revise_phase = 'disp_adv' if ($env{'form.searchmode'} eq 'advanced'); |
my $newloc = '/adm/searchcat'. |
my $newloc = '/adm/searchcat'. |
'?persistent_db_id='.$env{'form.persistent_db_id'}. |
'?persistent_db_id='.$env{'form.persistent_db_id'}. |
'&cleargroupsort=1'. |
'&cleargroupsort=1'. |
'&phase='.$revise_phase; |
'&phase='.$revise_phase; |
my $result = qq{<input type="button" value="$revisetext" name="revise"} . |
my $result = qq{<input type="button" value="$revisetext" name="revise"} . |
qq{ onClick="parent.location='$newloc';" /> }; |
qq{ onClick="parent.location='$newloc';" /> }; |
return $result; |
return $result; |
Line 2748 sub display_results {
|
Line 2761 sub display_results {
|
## |
## |
my $viewfunction = $Views{$env{'form.viewselect'}}; |
my $viewfunction = $Views{$env{'form.viewselect'}}; |
if (!defined($viewfunction)) { |
if (!defined($viewfunction)) { |
$r->print("Internal Error - Bad view selected.\n"); |
$r->print('<p class="LC_error">' |
|
.&mt('Internal Error - Bad view selected.') |
|
.'</p>'."\n"); |
$r->rflush(); |
$r->rflush(); |
return; |
return; |
} |
} |
Line 2765 sub display_results {
|
Line 2780 sub display_results {
|
if ($env{'form.catalogmode'} eq 'import') { |
if ($env{'form.catalogmode'} eq 'import') { |
if (! tie(%groupsearch_db,'GDBM_File',$diropendb, |
if (! tie(%groupsearch_db,'GDBM_File',$diropendb, |
&GDBM_WRCREAT(),0640)) { |
&GDBM_WRCREAT(),0640)) { |
$r->print('Unable to save import results.</form>'. |
$r->print('<p class="LC_error">'. |
|
&mt('Unable to save import results.'). |
|
'</p>'. |
|
'</form>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
$r->rflush(); |
$r->rflush(); |
return; |
return; |
Line 2779 sub display_results {
|
Line 2797 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>". |
$r->print('<p class="LC_error">'. |
|
&mt('A MySQL error has occurred.'). |
|
'</p>'. |
|
'</form>'. |
&Apache::loncommon::end_page()); |
&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); |
Line 2906 sub display_results {
|
Line 2927 sub display_results {
|
); |
); |
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>'. |
'<p class="LC_info">'.&mt('There are currently no results').'.</p>'. |
"</form>". |
"</form>". |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
return; |
return; |
} else { |
} else { |
$r->print('<center>'. |
$r->print('<div>'. |
mt('Results [_1] to [_2] out of [_3]', |
mt('Results [_1] to [_2] out of [_3]', |
$min,$max,$total_results). |
$min,$max,$total_results). |
"</center>\n"); |
"</div>\n"); |
} |
} |
## |
## |
## Get results from MySQL table |
## Get results from MySQL table |
Line 2944 sub display_results {
|
Line 2965 sub display_results {
|
if ($area eq 'portfolio') { |
if ($area eq 'portfolio') { |
$tabletype = 'portfolio_search'; |
$tabletype = 'portfolio_search'; |
} |
} |
|
$r->print(&Apache::loncommon::start_data_table()); |
foreach my $row (@Results) { |
foreach my $row (@Results) { |
if ($connection->aborted()) { |
if ($connection->aborted()) { |
&cleanup(); |
&cleanup(); |
return; |
return; |
} |
} |
my %Fields = %{&parse_row($tabletype,@$row)}; |
my %Fields = %{&parse_row($tabletype,@$row)}; |
my $output="<p>\n"; |
my $output; |
if (! defined($Fields{'title'}) || $Fields{'title'} eq '') { |
if (! defined($Fields{'title'}) || $Fields{'title'} eq '') { |
$Fields{'title'} = 'Untitled'; |
$Fields{'title'} = 'Untitled'; |
} |
} |
Line 2959 sub display_results {
|
Line 2981 sub display_results {
|
# Render the result into html |
# Render the result into html |
$output.= &$viewfunction($prefix,%Fields); |
$output.= &$viewfunction($prefix,%Fields); |
# Print them out as they come in. |
# Print them out as they come in. |
$r->print($output); |
$r->print(&Apache::loncommon::start_data_table_row() |
|
.'<td>' |
|
.$output |
|
.'</td>' |
|
.&Apache::loncommon::end_data_table_row() |
|
); |
$r->rflush(); |
$r->rflush(); |
} |
} |
|
$r->print(&Apache::loncommon::end_data_table()); |
if (@Results < 1) { |
if (@Results < 1) { |
$r->print(&mt("There were no results matching your query")); |
$r->print('<p class="LC_info">' |
|
.&mt('There were no results matching your query.') |
|
.'</p>'); |
} else { |
} else { |
$r->print |
$r->print |
('<center>'. |
('<center>'. |
&prev_next_buttons($min,$env{'form.show'},$total_results, |
&prev_next_buttons($min,$env{'form.show'},$total_results, |
"table=".$env{'form.table'}. |
"table=".$env{'form.table'}. |
"&phase=results". |
"&phase=results". |
"&persistent_db_id=". |
"&persistent_db_id=". |
$env{'form.persistent_db_id'}) |
$env{'form.persistent_db_id'}) |
."</center>\n" |
."</center>\n" |
); |
); |
Line 3260 SCRIPT
|
Line 3290 SCRIPT
|
} |
} |
function select_group() { |
function select_group() { |
parent.window.location= |
parent.window.location= |
"/adm/groupsort?mode=$env{'form.mode'}&catalogmode=import$inhibit_menu&acts="+ |
"/adm/groupsort?mode=$env{'form.mode'}&catalogmode=import$inhibit_menu&acts="+ |
parent.statusframe.document.forms.statusform.elements.acts.value; |
parent.statusframe.document.forms.statusform.elements.acts.value; |
} |
} |
</script> |
</script> |
Line 3277 END
|
Line 3307 END
|
} |
} |
|
|
sub results_link { |
sub results_link { |
my $basic_link = "/adm/searchcat?"."&table=".$env{'form.table'}. |
my $basic_link = "/adm/searchcat?"."&table=".$env{'form.table'}. |
"&persistent_db_id=".$env{'form.persistent_db_id'}; |
"&persistent_db_id=".$env{'form.persistent_db_id'}; |
my $results_link = $basic_link."&phase=results". |
my $results_link = $basic_link."&phase=results". |
"&pause=1"."&start=1"; |
"&pause=1"."&start=1"; |
return $results_link; |
return $results_link; |
} |
} |
|
|
Line 3288 sub results_link {
|
Line 3318 sub results_link {
|
###################################################################### |
###################################################################### |
sub print_frames_interface { |
sub print_frames_interface { |
my $r = shift; |
my $r = shift; |
my $basic_link = "/adm/searchcat?"."&table=".$env{'form.table'}. |
my $basic_link = "/adm/searchcat?"."&table=".$env{'form.table'}. |
"&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; |
my $js = <<JS; |
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 3382 sub detailed_citation_view {
|
Line 3412 sub detailed_citation_view {
|
my $jumpurl=$values{'url'}; |
my $jumpurl=$values{'url'}; |
$jumpurl=~s|^/ext/|http://|; |
$jumpurl=~s|^/ext/|http://|; |
$result .= '<b>'.$prefix. |
$result .= '<b>'.$prefix. |
'<img src="'.&Apache::loncommon::icon($values{'url'}).'" />'.' '. |
'<img src="'.&Apache::loncommon::icon($values{'url'}).'" alt="" />'.' '. |
'<a href="'.$jumpurl.'?inhibitmenu=yes" '. |
'<a href="'.$jumpurl.'?inhibitmenu=yes" '. |
'target="preview">'.$values{'title'}."</a></b>\n"; |
'target="preview">'.$values{'title'}."</a></b>\n"; |
$result .= "<p>\n"; |
$result .= "<p>\n"; |
Line 3474 sub detailed_citation_view {
|
Line 3504 sub detailed_citation_view {
|
if (exists($values{'shortabstract'}) && $values{'shortabstract'} ne '') { |
if (exists($values{'shortabstract'}) && $values{'shortabstract'} ne '') { |
$result .= '<p>'.$values{'shortabstract'}.'</p>'; |
$result .= '<p>'.$values{'shortabstract'}.'</p>'; |
} |
} |
$result .= '<hr align="left" width="200" noshade />'."\n"; |
|
return $result; |
return $result; |
} |
} |
|
|
sub detailed_citation_preview { |
sub detailed_citation_preview { |
my ($prefix,%values)=@_; |
my ($prefix,%values)=@_; |
return '<table><tr><td>'. |
return &detailed_citation_view($prefix,%values). |
&detailed_citation_view($prefix,%values). |
|
'</td><td>'. |
'</td><td>'. |
&Apache::lonindexer::showpreview($values{'url'}). |
&Apache::lonindexer::showpreview($values{'url'}); |
'</td></tr></table><hr />'; |
|
} |
} |
|
|
|
|
Line 3501 sub detailed_citation_preview {
|
Line 3528 sub detailed_citation_preview {
|
sub summary_view { |
sub summary_view { |
my ($prefix,%values) = @_; |
my ($prefix,%values) = @_; |
my $icon=&Apache::loncommon::icon($values{'url'}); |
my $icon=&Apache::loncommon::icon($values{'url'}); |
my $result=qq{$prefix<img src="$icon" />}; |
my $result=qq{$prefix<img src="$icon" alt="" />}; |
if (exists($env{'form.sortfield'}) && |
if (exists($env{'form.sortfield'}) && |
$env{'form.sortfield'} !~ /^(default| |
$env{'form.sortfield'} !~ /^(default| |
author| |
author| |
Line 3520 sub summary_view {
|
Line 3547 sub summary_view {
|
|
|
$result.=<<END; |
$result.=<<END; |
<a href="$jumpurl?inhibitmenu=yes" |
<a href="$jumpurl?inhibitmenu=yes" |
target='preview'>$values{'title'}</a> <br /> |
target="preview">$values{'title'}</a><br /> |
$link <br /> |
$link<br /> |
$values{'author'}, $values{'owner'} -- $values{'lastrevisiondate'}<br /> |
$values{'author'}, $values{'owner'} -- $values{'lastrevisiondate'}<br /> |
$values{'copyrighttag'}<br /> |
$values{'copyrighttag'}<br /> |
$values{'extrashow'} |
$values{'extrashow'} |
</p> |
|
<hr align='left' width='200' noshade /> |
|
END |
END |
return $result; |
return $result; |
} |
} |
|
|
sub summary_preview { |
sub summary_preview { |
my ($prefix,%values)=@_; |
my ($prefix,%values)=@_; |
return '<table><tr><td>'. |
return &summary_view($prefix,%values). |
&summary_view($prefix,%values). |
|
'</td><td>'. |
'</td><td>'. |
&Apache::lonindexer::showpreview($values{'url'}). |
&Apache::lonindexer::showpreview($values{'url'}); |
'</td></tr></table><hr />'; |
|
} |
} |
|
|
###################################################################### |
###################################################################### |
Line 3570 sub compact_view {
|
Line 3593 sub compact_view {
|
$result.=' <span class="LC_nobreak">'. |
$result.=' <span class="LC_nobreak">'. |
'<a href="'.$jumpurl.'?inhibitmenu=yes" target="preview">'. |
'<a href="'.$jumpurl.'?inhibitmenu=yes" target="preview">'. |
&HTML::Entities::encode($values{'title'},'<>&"').'</a></span> '. |
&HTML::Entities::encode($values{'title'},'<>&"').'</a></span> '. |
$link.' <b>'.$values{'author'}.'</b> ('.$values{'domain'}.')<br />'; |
$link.' <b>'.$values{'author'}.'</b> ('.$values{'domain'}.')'; |
return $result; |
return $result; |
} |
} |
|
|
Line 3610 sub fielded_format_view {
|
Line 3633 sub fielded_format_view {
|
$jumpurl=~s|^/ext/|http://|; |
$jumpurl=~s|^/ext/|http://|; |
|
|
my $result=<<END; |
my $result=<<END; |
$prefix <img src="$icon" /> |
$prefix <img src="$icon" alt="" /> |
<dl> |
<dl> |
<dt>URL:</dt> |
<dt>URL:</dt> |
<dd><a href="$jumpurl?inhibitmenu=yes" |
<dd><a href="$jumpurl?inhibitmenu=yes" |
Line 3636 END
|
Line 3659 END
|
} |
} |
$result .= "</dl>\n"; |
$result .= "</dl>\n"; |
$result .= $values{'extrashow'}; |
$result .= $values{'extrashow'}; |
$result .= '<hr align="left" width="200" noshade />'."\n"; |
|
return $result; |
return $result; |
} |
} |
|
|
Line 3710 $prefix
|
Line 3732 $prefix
|
$xml |
$xml |
</pre> |
</pre> |
$values{'extrashow'} |
$values{'extrashow'} |
<hr align='left' width='200' noshade /> |
|
END |
END |
return $result; |
return $result; |
} |
} |
Line 3750 sub output_unparsed_phrase_error {
|
Line 3771 sub output_unparsed_phrase_error {
|
my ($r,$closebutton,$parms,$hidden_fields,$field)=@_; |
my ($r,$closebutton,$parms,$hidden_fields,$field)=@_; |
my $errorstring; |
my $errorstring; |
if ($field eq 'basicexp') { |
if ($field eq 'basicexp') { |
$errorstring = &mt('Unable to understand the search phrase <i>[_1]</i>. Please modify your search.',$env{'form.basicexp'}); |
$errorstring = &mt('Unable to understand the search phrase [_1]. Please modify your search.' |
|
,'<i>'.$env{'form.basicexp'}.'</i>'); |
} 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 [_1]: [_2]' |
|
,'<i>'.$field.'</i>' |
|
,$env{'form.'.$field}); |
} |
} |
my $heading = &mt('Unparsed Field'); |
my $heading = &mt('Unparsed Field'); |
my $revise = &mt('Revise search request'); |
my $revise = &mt('Revise search request'); |
Line 3766 $hidden_fields
|
Line 3790 $hidden_fields
|
$closebutton |
$closebutton |
<hr /> |
<hr /> |
<h2>$heading</h2> |
<h2>$heading</h2> |
<p> |
<p class="LC_warning"> |
$errorstring |
$errorstring |
</p> |
</p> |
<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> |
$end_page |
$end_page |
ENDPAGE |
ENDPAGE |
Line 3798 $parms is extra information to include i
|
Line 3822 $parms is extra information to include i
|
###################################################################### |
###################################################################### |
sub output_blank_field_error { |
sub output_blank_field_error { |
my ($r,$closebutton,$parms,$hidden_fields)=@_; |
my ($r,$closebutton,$parms,$hidden_fields)=@_; |
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 $start_page = &Apache::loncommon::start_page('Search'); |
my $start_page = &Apache::loncommon::start_page('Search'); |
Line 3810 $hidden_fields
|
Line 3834 $hidden_fields
|
$closebutton |
$closebutton |
<hr /> |
<hr /> |
<h2>$heading</h2> |
<h2>$heading</h2> |
<p> |
<p class="LC_warning"> |
$errormsg |
$errormsg |
</p> |
</p> |
<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> |
$end_page |
$end_page |
ENDPAGE |
ENDPAGE |
Line 3845 sub output_date_error {
|
Line 3869 sub output_date_error {
|
# make query information persistent to allow for subsequent revision |
# make query information persistent to allow for subsequent revision |
my $start_page = &Apache::loncommon::start_page('Search'); |
my $start_page = &Apache::loncommon::start_page('Search'); |
my $end_page = &Apache::loncommon::end_page(); |
my $end_page = &Apache::loncommon::end_page(); |
|
my $heading = &mt('Error'); |
$r->print(<<RESULTS); |
$r->print(<<RESULTS); |
$start_page |
$start_page |
<form method="post" action="/adm/searchcat"> |
<form method="post" action="/adm/searchcat"> |
Line 3852 $hidden_fields
|
Line 3877 $hidden_fields
|
<input type='button' value='Revise search request' |
<input type='button' value='Revise search request' |
onClick='this.form.submit();' /> |
onClick='this.form.submit();' /> |
$closebutton |
$closebutton |
|
</form> |
<hr /> |
<hr /> |
<h3>Error</h3> |
<h3>$heading</h3> |
<p> |
<p class="LC_error"> |
$message |
$message |
</p> |
</p> |
$end_page |
$end_page |