--- loncom/interface/lonindexer.pm 2010/01/28 00:01:13 1.181.4.4 +++ loncom/interface/lonindexer.pm 2009/12/02 18:22:20 1.181.6.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.181.4.4 2010/01/28 00:01:13 raeburn Exp $ +# $Id: lonindexer.pm,v 1.181.6.2 2009/12/02 18:22:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -503,15 +503,13 @@ END $select_file_categories{''} = &mt('All file types'); foreach my $cat (@file_categories) { my $types = join(",",&Apache::loncommon::filecategorytypes($cat)); - $select_file_categories{$types} = &mt($cat); + $select_file_categories{$types} = $cat; push(@select_form_order,$types); } $select_file_categories{'select_form_order'} = \@select_form_order; my $type_element= - &Apache::loncommon::select_form( - $typeselect, - 'only', - %select_file_categories); + &Apache::loncommon::select_form($typeselect,'only', + %select_file_categories); $type_element = ''; $r->print($type_element @@ -897,7 +895,7 @@ sub display_line { } # Do we have permission to look at this? - if($filecom[15] ne '1') { return OK if ((!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])) && (!&Apache::lonnet::allowed('bro',$pathprefix.$filecom[0]))); } + if($filecom[15] ne '1') { return OK if (!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])); } # make absolute links appear on different background if ($absolute) { $fileclr='#ccdd99'; } @@ -1298,8 +1296,12 @@ sub showpreview { my $output=''; my $embstyle=&Apache::loncommon::fileembstyle($curfext); if ($embstyle eq 'ssi') { - my $cache=$Apache::lonnet::perlvar{'lonDocRoot'}.$filelink. - '.tmp'; + my $cache = $Apache::lonnet::perlvar{'lonDocRoot'}.$filelink; + if ($env{'request.gcicontext'} eq 'buildtest') { + $cache .= '.tn'; + } else { + $cache .= '.tmp'; + } if ((!$env{'form.updatedisplay'}) && (-e $cache)) { open(FH,$cache);