--- loncom/interface/lonsearchcat.pm 2004/07/19 16:38:07 1.231
+++ loncom/interface/lonsearchcat.pm 2004/09/27 14:58:01 1.234
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.231 2004/07/19 16:38:07 raeburn Exp $
+# $Id: lonsearchcat.pm,v 1.234 2004/09/27 14:58:01 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -659,18 +659,18 @@ sub print_basic_search_form {
my $scrout = &search_html_header().$bodytag;
if (&Apache::lonnet::allowed('bre',$ENV{'request.role.domain'})) {
# Define interface components
- my $userelatedwords=
+ my $userelatedwords= '';
+ my $onlysearchdomain='';
my $adv_search_link =
'
@@ -2633,10 +2633,74 @@ sub display_results {
&hidden_field('persistent_db_id').
&hidden_field('start')
);
+ #
+ # Build sorting selector
+ my @field_order = ('default',
+ 'title',
+ 'author',
+ 'subject',
+ 'url',
+ 'keywords',
+ 'version',
+ 'language',
+ 'creationdate'=>,
+ 'lastrevisiondate',
+ 'owner',
+ 'copyright',
+ 'authorspace',
+ 'lowestgradeleve',
+ 'highestgradelevel',
+ 'standards',
+ 'count',
+ 'stdno',
+ 'avetries',
+ 'difficulty',
+ 'disc',
+ 'clear',
+ 'technical',
+ 'correct',
+ 'helpful',
+ 'depth',
+ );
+ my %sort_fields = ('default' => 'Default',
+ 'title' => 'Title',
+ 'author' => 'Author',
+ 'subject' => 'Subject',
+ 'url' => 'URL',
+ 'keywords' => 'Keywords',
+ 'version' => 'Version',
+ 'language' => 'Language',
+ 'creationdate'=> 'Creation Date',
+ 'lastrevisiondate' => 'Last Revision Date',
+ 'owner' => 'Owner',
+ 'copyright' => 'Copyright',
+ 'authorspace' => 'Authorspace',
+ 'lowestgradeleve' => 'Lowest Grade Level',
+ 'highestgradelevel' => 'Highest Grade Level',
+ 'standards' => 'Standards',
+ 'count' => 'Number of Accesses',
+ 'stdno' => 'Students Attempting',
+ 'avetries' => 'Average Number of Tries',
+ 'difficulty' => 'Mean Degree of Difficulty',
+ 'disc' => 'Mean Degree of Discrimination',
+ 'clear' => 'Evaluation: Clear',
+ 'technical' => 'Evaluation: Technically Correct',
+ 'correct' => 'Evaluation: Material is Correct',
+ 'helpful' => 'Evaluation: Material is Helpful',
+ 'depth' => 'Evaluation: Material has Depth',
+ 'select_form_order' => \@field_order,
+ );
+
+ my $sortform = &mt('Sort by [_1]',
+ &Apache::loncommon::select_form($ENV{'form.sortfield'},
+ 'sortfield',
+ %sort_fields));
##
## Output links (if necessary) for 'prev' and 'next' pages.
$r->print
- (''.
+ (''.
+ $sortform.
+ ' | '.
&prev_next_buttons($min,$ENV{'form.show'},$total_results).
' | '.
&viewoptions().' | '
@@ -2647,13 +2711,21 @@ sub display_results {
" |