--- loncom/interface/lonsearchcat.pm 2004/05/07 18:50:14 1.224 +++ loncom/interface/lonsearchcat.pm 2004/05/09 22:55:17 1.225 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.224 2004/05/07 18:50:14 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.225 2004/05/09 22:55:17 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1490,8 +1490,9 @@ sub parse_basic_search { ('title', 'author', 'subject', 'notes', 'abstract', 'keywords')); foreach my $search (&process_phrase_input($search_string)){ - $pretty_search_string .= '
'.''.$search.''; if ($ENV{'form.related'}) { + $pretty_search_string .= ' and
' if ($pretty_search_string ne ''); + $pretty_search_string .= ''.$search.''; my @New_Words; ($search,@New_Words) = &related_version($search); next if (! $search); @@ -1499,6 +1500,9 @@ sub parse_basic_search { $pretty_search_string .= " with related words: @New_Words"; } + } else { + $pretty_search_string .= ' and ' if ($pretty_search_string ne ''); + $pretty_search_string .= ''.$search.''; } # # Build SQL query string based on form page @@ -1511,7 +1515,7 @@ sub parse_basic_search { $pretty_search_string .= ' '.$pretty_domains_string; } $pretty_search_string .= "
\n"; - $pretty_search_string =~ s:^
::; + $pretty_search_string =~ s:^
and ::; # &Apache::lonnet::logthis($final_query); return ($final_query,$pretty_search_string, $libraries_to_query); @@ -2933,41 +2937,73 @@ sub detailed_citation_view { { name=>'copyrighttag', translate => 'Copyright/Distribution: [_1]',}, { name=>'count', + format => "%d", translate => 'Access Count: [_1]',}, { name=>'stdno', + format => "%d", translate => 'Number of Students: [_1]',}, { name=>'avetries', + format => "%.2f", translate => 'Average Tries: [_1]',}, { name=>'disc', + format => "%.2f", translate => 'Degree of Discrimination: [_1]',}, { name=>'difficulty', + format => "%.2f", translate => 'Degree of Difficulty: [_1]',}, { name=>'clear', + format => "%.2f", translate => 'Clear: [_1]',}, { name=>'depth', + format => "%.2f", translate => 'Depth: [_1]',}, { name=>'helpful', + format => "%.2f", translate => 'Helpful: [_1]',}, { name=>'correct', + format => "%.2f", translate => 'Correct: [_1]',}, { name=>'technical', + format => "%.2f", translate => 'Technical: [_1]',}, + { name=>'comefrom_list', + type => 'list', + translate => 'Resources that lead up to this resource in maps',}, + { name=>'goto_list', + type => 'list', + translate => 'Resources that follow this resource in maps',}, + { name=>'usage_list', + type => 'list', + translate => 'Resources using or importing resource',}, ) { - if (exists($values{$field->{'name'}}) && - $values{$field->{'name'}} ne '') { + next if (! exists($values{$field->{'name'}}) || + $values{$field->{'name'}} eq ''); + if (exists($field->{'type'}) && $field->{'type'} eq 'list') { + $result .= ''.&mt($field->{'translate'}).''; + } elsif (exists($field->{'format'}) && $field->{'format'} ne ''){ + $result.= &mt($field->{'translate'}, + sprintf($field->{'format'}, + $values{$field->{'name'}})).'
'."\n"; + } else { if ($field->{'special'} eq 'url link') { $result.= - &mt($field->{'translate'}, - ''. - $values{$field->{'name'}}. - ''); + &mt($field->{'translate'}, + ''. + $values{$field->{'name'}}. + ''); } else { $result.= &mt($field->{'translate'}, $values{$field->{'name'}}); } $result .= "
\n"; - } + } } $result .= "

"; if (exists($values{'extrashow'}) && $values{'extrashow'} ne '') {