version 1.279, 2007/01/19 14:23:23
|
version 1.285, 2007/05/01 02:13:40
|
Line 750 sub setup_basic_search {
|
Line 750 sub setup_basic_search {
|
'</label>'; |
'</label>'; |
$onlysearchdomain = '<label>'.&mt('[_1] only search domain [_2]', |
$onlysearchdomain = '<label>'.&mt('[_1] only search domain [_2]', |
&Apache::lonhtmlcommon::checkbox('domains',$env{'form.domains'}, |
&Apache::lonhtmlcommon::checkbox('domains',$env{'form.domains'}, |
$r->dir_config('lonDefDomain'))). |
$r->dir_config('lonDefDomain')), |
|
$r->dir_config('lonDefDomain')). |
'</label>'; |
'</label>'; |
if ($area eq 'res') { |
if ($area eq 'res') { |
$inclext= '<label>'.&mt('[_1] include external resources', |
$inclext= '<label>'.&mt('[_1] include external resources', |
Line 763 sub setup_basic_search {
|
Line 764 sub setup_basic_search {
|
'&launch='.$env{'form.launch'}. |
'&launch='.$env{'form.launch'}. |
'&mode='.$env{'form.mode'}. |
'&mode='.$env{'form.mode'}. |
'&area='.$area. |
'&area='.$area. |
|
'&form='.$env{'form.form'}. |
|
'&titleelement='.$env{'form.titleelement'}. |
|
'&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 986 ENDHEADER
|
Line 990 ENDHEADER
|
description=>'Network-wide number of accesses (hits)',}, |
description=>'Network-wide number of accesses (hits)',}, |
{ name=>'stdno', |
{ name=>'stdno', |
description=> |
description=> |
'Total number of students who have worked on this problem',}, |
'Statistics calculated for number of students',}, |
{ name => 'avetries', |
{ name => 'avetries', |
description=>'Average number of tries till solved',}, |
description=>'Average number of tries till solved',}, |
{ name => 'difficulty', |
{ name => 'difficulty', |
Line 1391 sub parse_advanced_search {
|
Line 1395 sub parse_advanced_search {
|
'lastrevisiondatestart_month','lastrevisiondatestart_day', |
'lastrevisiondatestart_month','lastrevisiondatestart_day', |
'lastrevisiondatestart_year','lastrevisiondateend_month', |
'lastrevisiondatestart_year','lastrevisiondateend_month', |
'lastrevisiondateend_day','lastrevisiondateend_year') { |
'lastrevisiondateend_day','lastrevisiondateend_year') { |
$env{'form.'.$field}=~s/[^\w\/\s\(\)\=\-\"\']//g; |
$env{'form.'.$field}=~s/[^\w\/\s\(\)\=\-\"\'.]//g; |
} |
} |
foreach ('mode','form','element') { |
foreach ('mode','form','element') { |
# is this required? Hmmm. |
# is this required? Hmmm. |
Line 1532 sub parse_advanced_search {
|
Line 1536 sub parse_advanced_search {
|
if ($field ne '') { |
if ($field ne '') { |
my $value = $env{'form.addedvalues_'.$i}; |
my $value = $env{'form.addedvalues_'.$i}; |
if ($value ne '') { |
if ($value ne '') { |
$value =~ s/'/''/g; |
$value =~ s/'/''/g; #' stupid emacs |
my ($error,$query) = |
my ($error,$query) = |
&process_phrase_input($value,0,'pf.value'); |
&process_phrase_input($value,0,'pf.value'); |
if (!defined($error)) { |
if (!defined($error)) { |
Line 1673 sub parse_domain_restrictions {
|
Line 1677 sub parse_domain_restrictions {
|
foreach (sort @allowed_domains) { |
foreach (sort @allowed_domains) { |
$pretty_domains_string .= "<b>".$_."</b> "; |
$pretty_domains_string .= "<b>".$_."</b> "; |
} |
} |
foreach (keys(%Apache::lonnet::libserv)) { |
my %servers = &Apache::lonnet::get_servers(\@allowed_domains, |
if (exists($domain_hash{$Apache::lonnet::hostdom{$_}})) { |
'library'); |
push @$libraries_to_query,$_; |
$libraries_to_query = [keys(%servers)]; |
} |
|
} |
|
} |
} |
return ($libraries_to_query, |
return ($libraries_to_query, |
$pretty_domains_string); |
$pretty_domains_string); |
Line 1856 sub process_phrase_input {
|
Line 1858 sub process_phrase_input {
|
$item[1]; |
$item[1]; |
} |
} |
term: |
term: |
/[\w\Q:!@#$%^&*()+_=|{}<>,.;\\\/?\E]+/ { |
/[\w\Q:!@#$%^&*()+_=|{}<>,.;\\\/?\E\-]+/ { |
$item[1]; |
$item[1]; |
} |
} |
ENDGRAMMAR |
ENDGRAMMAR |
Line 2512 END
|
Line 2514 END
|
@Servers_to_contact = ($serverlist); |
@Servers_to_contact = ($serverlist); |
} |
} |
} else { |
} else { |
@Servers_to_contact = sort(keys(%Apache::lonnet::libserv)); |
my %all_library_servers = &Apache::lonnet::all_library(); |
|
@Servers_to_contact = sort(keys(%all_library_servers)); |
} |
} |
my %Server_status; |
my %Server_status; |
# |
# |