version 1.45, 2002/06/29 19:55:19
|
version 1.48, 2002/08/08 13:07:17
|
Line 135 sub handler {
|
Line 135 sub handler {
|
&start_fresh_session(); |
&start_fresh_session(); |
} |
} |
# -------------------- refresh environment with user database values (in %hash) |
# -------------------- refresh environment with user database values (in %hash) |
if ($hash{'mode_catalog'} eq 'interactive') { |
&setvalues(\%hash,'form.catalogmode',\%ENV,'form.catalogmode' ); |
$ENV{'form.catalogmode'}='interactive'; |
|
} |
|
if ($hash{'mode_catalog'} eq 'groupimport') { |
|
$ENV{'form.catalogmode'}='groupimport'; |
|
} |
|
|
|
# --------------------- define extra fields and buttons in case of special mode |
# --------------------- define extra fields and buttons in case of special mode |
if ($ENV{'form.catalogmode'} eq 'interactive') { |
if ($ENV{'form.catalogmode'} eq 'interactive') { |
$hash{'mode_catalog'}='interactive'; |
|
$extrafield='<td bgcolor="'.$fileclr.'" valign="bottom">'. |
$extrafield='<td bgcolor="'.$fileclr.'" valign="bottom">'. |
'<a name="$anchor"><img src="'.$iconpath.'whitespace1.gif"'. |
'<a name="$anchor"><img src="'.$iconpath.'whitespace1.gif"'. |
' border="0" /></td>'; |
' border="0" /></td>'; |
Line 154 sub handler {
|
Line 148 sub handler {
|
END |
END |
} |
} |
elsif ($ENV{'form.catalogmode'} eq 'groupimport') { |
elsif ($ENV{'form.catalogmode'} eq 'groupimport') { |
$hash{'mode_catalog'}='groupimport'; |
|
$extrafield='<td bgcolor="'.$fileclr.'" valign="bottom">'. |
$extrafield='<td bgcolor="'.$fileclr.'" valign="bottom">'. |
'<a name="$anchor"><img src="'.$iconpath.'whitespace1.gif"'. |
'<a name="$anchor"><img src="'.$iconpath.'whitespace1.gif"'. |
' border="0" /></td>'; |
' border="0" /></td>'; |
Line 176 END
|
Line 169 END
|
# $element is the name of the element in $formname which receives |
# $element is the name of the element in $formname which receives |
# the URL. |
# the URL. |
# &Apache::lonxml::debug('Checking mode, form, element'); |
# &Apache::lonxml::debug('Checking mode, form, element'); |
&setvalues(\%hash,'form_mode' ,\%ENV,'form.mode' ); |
&setvalues(\%hash,'form.mode' ,\%ENV,'form.mode' ); |
&setvalues(\%hash,'form_form' ,\%ENV,'form.form' ); |
&setvalues(\%hash,'form.form' ,\%ENV,'form.form' ); |
&setvalues(\%hash,'form_element',\%ENV,'form.element'); |
&setvalues(\%hash,'form.element',\%ENV,'form.element'); |
&setvalues(\%hash,'form_only' ,\%ENV,'form.only' ); |
&setvalues(\%hash,'form.only' ,\%ENV,'form.only' ); |
&setvalues(\%hash,'form_omit' ,\%ENV,'form.omit' ); |
&setvalues(\%hash,'form.omit' ,\%ENV,'form.omit' ); |
|
|
# Deal with 'omit' and 'only' |
# Deal with 'omit' and 'only' |
if (exists $ENV{'form.omit'}) { |
if (exists $ENV{'form.omit'}) { |
Line 426 END
|
Line 419 END
|
# $r->print(&initdebug()); |
# $r->print(&initdebug()); |
# $r->print(&writedebug("Omit:@Omit")) if (@Omit); |
# $r->print(&writedebug("Omit:@Omit")) if (@Omit); |
# $r->print(&writedebug("Only:@Only")) if (@Only); |
# $r->print(&writedebug("Only:@Only")) if (@Only); |
$r->print("<table width='100\%' border=0><tr><td bgcolor=#990404>\n"); |
$r->print("<table width='100\%' border=0><tr><td bgcolor=#777777>\n"); |
$r->print("<table width='100\%' border=0><tr bgcolor=$titleclr>\n"); |
$r->print("<table width='100\%' border=0><tr bgcolor=$titleclr>\n"); |
$r->print("<td $colspan><b>Name</b></td>\n"); |
$r->print("<td $colspan><b>Name</b></td>\n"); |
$r->print("<td><b>Title</b></td>\n") |
$r->print("<td><b>Title</b></td>\n") |
Line 723 sub display_line {
|
Line 716 sub display_line {
|
|
|
# display file |
# display file |
if ($fnptr == 0 and $filecom[3] ne '') { |
if ($fnptr == 0 and $filecom[3] ne '') { |
|
my $filelink = $startdir.$filecom[0]; |
|
return OK if (!&Apache::lonnet::allowed('bre',$filelink)); |
my @file_ext = split (/\./,$listname); |
my @file_ext = split (/\./,$listname); |
my $curfext = $file_ext[-1]; |
my $curfext = $file_ext[-1]; |
if (@Omit) { |
if (@Omit) { |
Line 740 sub display_line {
|
Line 735 sub display_line {
|
$iconname = $curfext.".gif" unless |
$iconname = $curfext.".gif" unless |
(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn'); |
(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn'); |
# |
# |
my $filelink = $startdir.$filecom[0]; |
|
$r->print("<tr bgcolor=$fileclr><td nowrap valign='bottom'>"); |
$r->print("<tr bgcolor=$fileclr><td nowrap valign='bottom'>"); |
my $metafile = grep /^$filecom[0]\.meta\&/, @list; |
my $metafile = grep /^$filecom[0]\.meta\&/, @list; |
my $title; |
my $title; |
Line 901 sub begin_form {
|
Line 895 sub begin_form {
|
|
|
# --------- settings whenever the user causes the indexer window to be launched |
# --------- settings whenever the user causes the indexer window to be launched |
sub start_fresh_session { |
sub start_fresh_session { |
delete $hash{'mode_catalog'}; |
delete $hash{'form.catalogmode'}; |
delete $hash{'form_mode'}; |
delete $hash{'form.mode'}; |
delete $hash{'form_form'}; |
delete $hash{'form.form'}; |
delete $hash{'form_element'}; |
delete $hash{'form.element'}; |
delete $hash{'form_omit'}; |
delete $hash{'form.omit'}; |
delete $hash{'form_only'}; |
delete $hash{'form.only'}; |
foreach (keys %hash) { |
foreach (keys %hash) { |
if ($_ =~ /^pre_/) { |
delete $hash{$_} if (/^(pre_|store)/); |
delete $hash{$_}; |
|
} |
|
if ($_ =~ /^store/) { |
|
delete $hash{$_}; |
|
} |
|
} |
} |
} |
} |
|
|