[LON-CAPA-cvs] cvs: modules /hoeppner lonsearchcat.pm
www
lon-capa-cvs-allow@mail.lon-capa.org
Sun, 29 Jun 2008 22:50:31 -0000
www Sun Jun 29 18:50:31 2008 EDT
Modified files:
/modules/hoeppner lonsearchcat.pm
Log:
I think sortfield works now.
Index: modules/hoeppner/lonsearchcat.pm
diff -u modules/hoeppner/lonsearchcat.pm:1.2 modules/hoeppner/lonsearchcat.pm:1.3
--- modules/hoeppner/lonsearchcat.pm:1.2 Sat Jun 28 20:22:14 2008
+++ modules/hoeppner/lonsearchcat.pm Sun Jun 29 18:50:29 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.2 2008/06/29 00:22:14 hoeppner Exp $
+# $Id: lonsearchcat.pm,v 1.3 2008/06/29 22:50:29 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -148,8 +148,17 @@
['catalogmode','launch','acts','mode','form','element','pause',
'phase','persistent_db_id','table','start','show',
'cleargroupsort','titleelement','area','inhibitmenu', 'algorithm', 'degree', 'connectivitywac',
- 'connectivitysac', 'instances', 'proximity', 'username','sort', 'url_id', 'rating', 'comment']);
+ 'connectivitysac', 'instances', 'proximity', 'username','sort', 'url_id', 'rating', 'comment',
+ 'sortfield','sortorder']);
+ &Apache::lonnet::logthis("Algo: ".$env{'form.algorithm'}.' '.$env{'form.username'}.' '.$env{'form.degree'});
+
+ unless ($env{'form.sortfield'}) {
+ if ($env{'form.algorithm'} eq 'usedauthors' || $env{'form.algorithm'} eq 'relatedcoordinators') {
+ $env{'form.sortfield'} = "stdno";
+ }
+ }
+ &Apache::lonnet::logthis("Sort: ".$env{'form.sortfield'}.' '.$env{'form.sortorder'});
##
## The following is a trick - we wait a few seconds if asked to so
## the daemon running the search can get ahead of the daemon
@@ -439,10 +448,6 @@
['query','customquery','customshow',
'libraries','pretty_string']);
if ($env{'form.phase'} eq 'sort') {
- if ($env{'form.algorithm'} eq 'UsedAuthors' || $env{'form.algorithm'} eq 'RelatedCoordinators') {
- $env{'form.sortfield'} = "stdno";
- }
- print INFO " sort eq sort -> printsortform: " . $env{'form.sortfield'} ."\n";
&print_sort_form($r,$pretty_string);
} elsif ($env{'form.phase'} eq 'run_search') {
@@ -3567,7 +3572,7 @@
my $result=<<END;
$start_page
<b>How good do the results meet your expectations? </b>
-<form> <form name="evaluation" method="post" action="/adm/searchcat">
+<form name="evaluation" method="post" action="/adm/searchcat">
<input type="hidden" name="phase" value="rate" />
<input type="hidden" name="table" value="$env{'form.table'}" />
<input type="hidden" name="username" value="$env{'form.username'}" />