--- loncom/interface/lonindexer.pm 2002/03/25 19:27:17 1.40 +++ loncom/interface/lonindexer.pm 2002/06/29 19:55:19 1.45 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.40 2002/03/25 19:27:17 matthew Exp $ +# $Id: lonindexer.pm,v 1.45 2002/06/29 19:55:19 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,6 +43,7 @@ # 12/11,12/13 Scott Harrison # YEAR=2002 # 1/17 Scott Harrison +# 6/29/2002 H. K. Ng # ### @@ -81,7 +82,7 @@ my $fnum; # file counter my $dnum; # directory counter # ----- Used to include or exclude files with certain extensions. -my @Only = (); +my @Only = (); my @Omit = (); @@ -95,6 +96,11 @@ sub handler { $dnum=0; untie %hash; + # Deal with stupid global variables (is there a way around making + # these global to this package? It is just so wrong....) + undef (@Only); + undef (@Omit); + # ------------------------------------- read in machine configuration variables my $iconpath= $r->dir_config('lonIconsURL') . "/"; my $domain = $r->dir_config('lonDefDomain'); @@ -127,8 +133,7 @@ sub handler { if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT,0640)) { if ($ENV{'form.launch'} eq '1') { &start_fresh_session(); - } - + } # -------------------- refresh environment with user database values (in %hash) if ($hash{'mode_catalog'} eq 'interactive') { $ENV{'form.catalogmode'}='interactive'; @@ -200,8 +205,14 @@ END # by default (ie. if $mode is undefined). This is the easy # way out. Hopefully in the future I'll find a way to get # the calls dealt with in a more comprehensive manner. + +# +# There is now also mode "simple", which is for the simple version of the rat +# +# if (!defined($mode) || ($mode ne 'edit' && $mode ne 'parmset')) { my $location = "/adm/groupsort?catalogmode=groupimport&"; + $location .= "mode=".$mode."&"; $location .= "acts="; $catalogmodefunctions=<<"END"; function select_data(title,url) { @@ -368,37 +379,38 @@ ENDHEADER } # ---------------------------------------------------------------- output title - $r->print('