$extrafield");
&begin_form ($r,$curdir);
$r->print (''."\n");
@@ -915,15 +927,19 @@ sub display_line {
# display file
if (($fnptr == 0 and $filecom[3] ne '') or $absolute) {
+ my $title;
my $filelink = $pathprefix.$filecom[0];
+ if ($hash{'display_attrs_0'} == 1) {
+ $title = &Apache::lonnet::gettitle($filelink);
+ }
my @file_ext = split (/\./,$listname);
my $curfext = $file_ext[-1];
if (@Omit) {
- foreach (@Omit) { return OK if ($curfext eq $_); }
+ foreach (@Omit) { return OK if (lc($curfext) eq $_); }
}
if (@Only) {
my $skip = 1;
- foreach (@Only) { $skip = 0 if ($curfext eq $_); }
+ foreach (@Only) { $skip = 0 if (lc($curfext) eq $_); }
return OK if ($skip > 0);
}
# Set the icon for the file
@@ -948,6 +964,10 @@ sub display_line {
$r->print(" />\n");
$r->print(" | ");
$hash{"pre_${fnum}_link"}=$filelink;
+ $hash{"pre_${fnum}_title"}=$title;
+ if (!$hash{"pre_${fnum}_title"}) {
+ $hash{"pre_${fnum}_title"} = 'Not_retrieved';
+ }
$fnum++;
}
# Form to open or close sequences
@@ -987,21 +1007,20 @@ sub display_line {
$r->print("\n");
my $quotable_filelink = &Apache::loncommon::escape_single($filelink);
-
$r->print (" $listname ");
-
+ $quotable_filelink = &Apache::loncommon::escape_single($filelink.'.meta');
+ &Apache::loncommon::inhibit_menu_check(\$quotable_filelink);
$r->print (" (metadata) ");
+ "?inhibitmenu=yes','metadatafile','500','550','no','yes','no');\" ".
+ " target=\"_self\">".&mt('metadata').") ");
# Close form to open/close sequence
if ($filelink=~/\.(page|sequence)$/) {
$r->print('');
}
$r->print(" | \n");
if ($hash{'display_attrs_0'} == 1) {
- my $title = &Apache::lonnet::gettitle($filelink,'title');
$r->print(' '.($title eq '' ? ' ' : $title).
' | '."\n");
}
@@ -1057,6 +1076,7 @@ sub display_line {
if($source eq 'open') {
my $sourcelink = &Apache::lonsource::make_link($filelink,$listname);
my $quotable_sourcelink = &Apache::loncommon::escape_single($sourcelink);
+ &Apache::loncommon::inhibit_menu_check(\$quotable_sourcelink);
$r->print(''."print(' | '.($title eq '' ? ' ' : $title).
' | '."\n");
}
@@ -1254,6 +1274,7 @@ sub begin_form {
$r->print (''.
"\n");
$r->print (''."\n");
+ $r->print(&Apache::loncommon::inhibit_menu_check('input'));
$dnum++;
}