--- loncom/interface/groupsort.pm 2003/09/23 00:26:10 1.23 +++ loncom/interface/groupsort.pm 2004/07/12 20:42:31 1.29 @@ -2,7 +2,7 @@ # The LON-CAPA group sort handler # Allows for sorting prior to import into RAT. # -# $Id: groupsort.pm,v 1.23 2003/09/23 00:26:10 www Exp $ +# $Id: groupsort.pm,v 1.29 2004/07/12 20:42:31 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,6 +39,7 @@ use Apache::Constants qw(:common); use GDBM_File; use Apache::loncommon; use Apache::lonlocal; +use Apache::lonnet; my %hash; # variable to tie to user specific database my $iconpath; # variable to be accessible to multiple subroutines @@ -68,7 +69,7 @@ sub handler { # finish_import looks different for graphical or "simple" RAT my $finishimport=''; - if ($ENV{'form.mode'} eq 'simple') { + if ($ENV{'form.mode'} eq 'simple' || $ENV{'form.mode'} eq '') { $finishimport=(<print(<  + onClick="window.location='$resurl?catalogmode=groupimport'" />  END } if ($ENV{'form.catalogmode'} eq 'groupsearch') { @@ -351,13 +357,7 @@ END foreach (sort {$shash{$a}<=>$shash{$b}} (keys %shash)) { my $key=$_; $ctr++; - my @file_ext = split(/\./,$key); - my $curfext = $file_ext[scalar(@file_ext)-1]; - my $iconname="unknown.gif"; - my $embstyle = &Apache::loncommon::fileembstyle($curfext); - # The unless conditional that follows is a bit of overkill - $iconname = $curfext.".gif" unless - (!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn'); + my $iconname=&Apache::loncommon::icon($key); if ($clen > 1) { $r->print(""); $r->print(&movers($clen,$ctr)); @@ -367,7 +367,7 @@ END $r->print(""); $r->print(&select_box($clen,$ctr)); $r->print(""); - $r->print(""); + $r->print(""); $r->print(""); $r->print("$thash{$key}\n"); $r->print("$key\n");