[LON-CAPA-cvs] cvs: loncom /interface groupsort.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 09 May 2002 23:07:36 -0000


www		Thu May  9 19:07:36 2002 EDT

  Modified files:              
    /loncom/interface	groupsort.pm 
  Log:
  Also import GET-provided mode and use new routine for that
  
  
Index: loncom/interface/groupsort.pm
diff -u loncom/interface/groupsort.pm:1.8 loncom/interface/groupsort.pm:1.9
--- loncom/interface/groupsort.pm:1.8	Thu May  9 16:57:26 2002
+++ loncom/interface/groupsort.pm	Thu May  9 19:07:36 2002
@@ -2,7 +2,7 @@
 # The LON-CAPA group sort handler
 # Allows for sorting prior to import into RAT.
 #
-# $Id: groupsort.pm,v 1.8 2002/05/09 20:57:26 www Exp $
+# $Id: groupsort.pm,v 1.9 2002/05/09 23:07:36 www Exp $
 # 
 # Copyright Michigan State University Board of Trustees
 #
@@ -46,6 +46,9 @@
 # ---------------------------------------------------------------- Main Handler
 sub handler {
     my $r = shift;
+ 
+   &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
+                                           ['acts','catalogmode','mode']);
 
     # color scheme
     my $fileclr = '#ffffe6';
@@ -130,17 +133,7 @@
 
     my %shash; # sort order (key is resource location, value is sort order)
     my %thash; # title (key is resource location, value is title)
-    foreach (split(/&/,$ENV{'QUERY_STRING'})) {
-       my ($name, $value) = split(/=/,$_);
-       $value =~ tr/+/ /;
-       $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
-       if ($name eq 'acts') {
-           $ENV{'form.'.$name}=$value;
-       }
-       if ($name eq 'catalogmode') {
-           $ENV{'form.'.$name}=$value;
-       }
-    }
+
     my $diropendb;
     if ($ENV{'form.catalogmode'} eq 'groupsearch') {
 	$diropendb =