[LON-CAPA-cvs] cvs: loncom /interface lonindexer.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Thu, 08 Aug 2002 13:07:17 -0000
matthew Thu Aug 8 09:07:17 2002 EDT
Modified files:
/loncom/interface lonindexer.pm
Log:
Minor cleanups and name changes.
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.47 loncom/interface/lonindexer.pm:1.48
--- loncom/interface/lonindexer.pm:1.47 Tue Jul 30 15:47:13 2002
+++ loncom/interface/lonindexer.pm Thu Aug 8 09:07:17 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.47 2002/07/30 19:47:13 ng Exp $
+# $Id: lonindexer.pm,v 1.48 2002/08/08 13:07:17 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -135,16 +135,10 @@
&start_fresh_session();
}
# -------------------- refresh environment with user database values (in %hash)
- if ($hash{'mode_catalog'} eq 'interactive') {
- $ENV{'form.catalogmode'}='interactive';
- }
- if ($hash{'mode_catalog'} eq 'groupimport') {
- $ENV{'form.catalogmode'}='groupimport';
- }
+ &setvalues(\%hash,'form.catalogmode',\%ENV,'form.catalogmode' );
# --------------------- define extra fields and buttons in case of special mode
if ($ENV{'form.catalogmode'} eq 'interactive') {
- $hash{'mode_catalog'}='interactive';
$extrafield='<td bgcolor="'.$fileclr.'" valign="bottom">'.
'<a name="$anchor"><img src="'.$iconpath.'whitespace1.gif"'.
' border="0" /></td>';
@@ -154,7 +148,6 @@
END
}
elsif ($ENV{'form.catalogmode'} eq 'groupimport') {
- $hash{'mode_catalog'}='groupimport';
$extrafield='<td bgcolor="'.$fileclr.'" valign="bottom">'.
'<a name="$anchor"><img src="'.$iconpath.'whitespace1.gif"'.
' border="0" /></td>';
@@ -176,11 +169,11 @@
# $element is the name of the element in $formname which receives
# the URL.
# &Apache::lonxml::debug('Checking mode, form, element');
- &setvalues(\%hash,'form_mode' ,\%ENV,'form.mode' );
- &setvalues(\%hash,'form_form' ,\%ENV,'form.form' );
- &setvalues(\%hash,'form_element',\%ENV,'form.element');
- &setvalues(\%hash,'form_only' ,\%ENV,'form.only' );
- &setvalues(\%hash,'form_omit' ,\%ENV,'form.omit' );
+ &setvalues(\%hash,'form.mode' ,\%ENV,'form.mode' );
+ &setvalues(\%hash,'form.form' ,\%ENV,'form.form' );
+ &setvalues(\%hash,'form.element',\%ENV,'form.element');
+ &setvalues(\%hash,'form.only' ,\%ENV,'form.only' );
+ &setvalues(\%hash,'form.omit' ,\%ENV,'form.omit' );
# Deal with 'omit' and 'only'
if (exists $ENV{'form.omit'}) {
@@ -902,19 +895,14 @@
# --------- settings whenever the user causes the indexer window to be launched
sub start_fresh_session {
- delete $hash{'mode_catalog'};
- delete $hash{'form_mode'};
- delete $hash{'form_form'};
- delete $hash{'form_element'};
- delete $hash{'form_omit'};
- delete $hash{'form_only'};
+ delete $hash{'form.catalogmode'};
+ delete $hash{'form.mode'};
+ delete $hash{'form.form'};
+ delete $hash{'form.element'};
+ delete $hash{'form.omit'};
+ delete $hash{'form.only'};
foreach (keys %hash) {
- if ($_ =~ /^pre_/) {
- delete $hash{$_};
- }
- if ($_ =~ /^store/) {
- delete $hash{$_};
- }
+ delete $hash{$_} if (/^(pre_|store)/);
}
}