version 1.175, 2007/08/02 00:10:59
|
version 1.177, 2007/08/17 21:33:19
|
Line 106 sub handler {
|
Line 106 sub handler {
|
|
|
my $fileclr='#ffffe6'; |
my $fileclr='#ffffe6'; |
my $line; |
my $line; |
my (@attrchk,@openpath,%typechk); |
my (@attrchk,@openpath,$typeselect); |
my $uri=$r->uri; |
my $uri=$r->uri; |
|
|
# -------------------------------------- see if called from an interactive mode |
# -------------------------------------- see if called from an interactive mode |
Line 411 ENDHEADER
|
Line 411 ENDHEADER
|
{'domain' => $headerdom,})); |
{'domain' => $headerdom,})); |
# ---------------------------------- get state of file types to be showing |
# ---------------------------------- get state of file types to be showing |
if ($env{'form.only'}) { |
if ($env{'form.only'}) { |
if ($env{'form.only'} eq 'problem' ) { |
$typeselect = $env{'form.only'}; |
$typechk{'problem'} = 'selected'; |
|
} elsif ($env{'form.only'} eq 'gif,jpg,jpeg' ) { |
|
$typechk{'graphic'} = 'selected'; |
|
} |
|
} else { |
} else { |
$typechk{'all'} = 'selected'; |
$typeselect = ''; |
} |
} |
|
|
|
|
# ---------------------------------- get state of file attributes to be showing |
# ---------------------------------- get state of file attributes to be showing |
if ($env{'form.attrs'}) { |
if ($env{'form.attrs'}) { |
for (my $i=0; $i<=11; $i++) { |
for (my $i=0; $i<=11; $i++) { |
Line 482 ENDHEADER
|
Line 477 ENDHEADER
|
</tr> |
</tr> |
</table> |
</table> |
<input type="hidden" name="attrs" value="1" /> |
<input type="hidden" name="attrs" value="1" /> |
<label><select name="only" onClick="this.form.submit()"> |
<label> |
<option value='problem' $typechk{'problem'}>Problems</option> |
END |
<option value='gif,jpg,jpeg' $typechk{'graphic'}>Graphics</option> |
my @file_categories = &Apache::loncommon::filecategories(); |
<option value='' $typechk{'all'}>All</option> |
my %select_file_categories; |
</select>File Types Displayed</label> |
my @select_form_order = (''); |
|
$select_file_categories{''} = 'All file types'; |
|
foreach my $cat(@file_categories) { |
|
my $types = join ",",&Apache::loncommon::filecategorytypes($cat); |
|
$select_file_categories{$types} = $cat; |
|
push(@select_form_order,$types); |
|
} |
|
$select_file_categories{'select_form_order'} = [@select_form_order]; |
|
$r->print(&Apache::loncommon::select_form($typeselect,'only', |
|
%select_file_categories |
|
)); |
|
$r->print(<<END); |
|
File Type Displayed</label> |
<br /> |
<br /> |
<input type="submit" name="updatedisplay" value="$lt{'ud'}" /> |
<input type="submit" name="updatedisplay" value="$lt{'ud'}" /> |
<input type="hidden" name="acts" value="" /> |
<input type="hidden" name="acts" value="" /> |