--- loncom/interface/groupsort.pm 2001/12/11 03:37:11 1.5 +++ loncom/interface/groupsort.pm 2002/03/21 14:33:49 1.7 @@ -2,7 +2,7 @@ # The LON-CAPA group sort handler # Allows for sorting prior to import into RAT. # -# $Id: groupsort.pm,v 1.5 2001/12/11 03:37:11 harris41 Exp $ +# $Id: groupsort.pm,v 1.7 2002/03/21 14:33:49 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -28,6 +28,8 @@ # # YEAR=2001 # 8/7,8/8,10/14,10/15,12/10 Scott Harrison +# YEAR=2002 +# 1/17 Scott Harrison # ### @@ -87,7 +89,6 @@ function finish_import() { opener.editmode=0; opener.notclear=0; opener.linkmode=0; - opener.infoclear(); opener.draw(); self.close(); } @@ -134,6 +135,29 @@ END $diropendb = "/home/httpd/perl/tmp/$domain\_$ENV{'user.name'}_indexer.db"; } + else { # choose last accessed + my $dsearch; my $dindex; + my $dsearcht; my $dindext; + $dsearch = + "/home/httpd/perl/tmp/$domain\_$ENV{'user.name'}_searchcat.db"; + if (-e $dsearch) { + $dsearcht=(stat($dsearch))[9]; + } + $dindex = + "/home/httpd/perl/tmp/$domain\_$ENV{'user.name'}_indexer.db"; + if (-e $dindex) { + $dindext=(stat($dindex))[9]; + } + if (!$dsearcht and !$dindext) { + $diropendb=''; + } + elsif ($dsearcht>$dindext) { + $diropendb=$dsearch; + } + else { + $diropendb=$dindex; + } + } if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT,0640)) { my $acts = $ENV{'form.acts'}; my @Acts = split(/b/,$acts);