\n")
if ($hash{'display_attrs_8'} == 1);
- $r->print("
".&mt("Source Available")."
\n")
+ $r->print("
".&mt("Source Available")."
\n")
if ($hash{'display_attrs_10'} == 1);
- $r->print("
".&mt("Linked/Related Resources")."
\n")
+ $r->print("
".&mt("Linked/Related Resources")."
\n")
if ($hash{'display_attrs_11'} == 1);
- $r->print("
".&mt("Resource")."
\n")
+ $r->print("
".&mt("Resource")."
\n")
if ($hash{'display_attrs_7'} == 1);
- $r->print('
');
+ $r->print(&Apache::loncommon::end_data_table_header_row());
# ----------------- read in what directories have previously been set to "open"
foreach (keys %hash) {
@@ -577,14 +615,13 @@ END
# -------- recursively go through all the directories and output as appropriate
&scanDir ($r,$toplevel,$indent,\%hash);
-
-# ---------------------------- embed hidden information useful for group import
- $r->print("");
# -------------------------------------------------------------- end the tables
- $r->print('
');
- $r->print('
');
+ $r->print(&Apache::loncommon::end_data_table());
+
+# ---------------------------- embed hidden information useful for group import
+ $r->print("");
# --------------------------------------------------- end the output and return
$r->print(&Apache::loncommon::end_page()."\n");
@@ -620,7 +657,7 @@ sub scanDir {
next if($strip =~ /.*\.meta$/ | $obs eq '1');
my (@fileparts) = split(/\./,$strip);
if ($hash{'display_attrs_9'} != 1) {
-# if not all versions to be shown
+ # if not all versions to be shown
if (scalar(@fileparts) >= 3) {
my $fext = pop @fileparts;
my $ov = pop @fileparts;
@@ -676,7 +713,7 @@ sub get_list {
$uri=~s/\/+/\//g;
foreach (&Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$uri))) {
my @ratpart=split(/\:/,$_);
- push @list,$ratpart[1];
+ push(@list,&LONCAPA::map::qtescape($ratpart[1]));
}
$hash{'dirlist_files_'.$luri} = join("\n",@list);
} else {
@@ -685,7 +722,7 @@ sub get_list {
$hash{'dirlist_files_'.$luri} = join("\n",@list);
$hash{'dirlist_timestamp_files_'.$luri} = time;
}
- return @list=&match_ext($r,@list);
+ return @list=&match_ext($r,@list);
}
sub dynmetaread {
@@ -703,7 +740,7 @@ sub dynmetaread {
}
# Actually get the data
%dynhash=
- (%dynhash,&Apache::lonmeta::get_dynamic_metadata_from_sql($uri));
+ (%dynhash,&Apache::lonmeta::get_dynamic_metadata_from_sql($uri.'/'));
# Remember that we got it
$dynread{$uri}=1;
}
@@ -781,7 +818,7 @@ sub display_line {
$pathprefix=$startdir;
}
my $dirptr=16384;
- my $fileclr="#ffffe6";
+#SB my $fileclr="#ffffe6";
my $iconpath= $r->dir_config('lonIconsURL') . '/';
my @filecom = split (/\&/,$line);
@@ -795,7 +832,8 @@ sub display_line {
my $i=0;
while ($i<=11) {
$tabtag=join('',$tabtag,"
")
- if $hash{'display_attrs_'.$i} == 1;
+ if ($i != 9 &&
+ $hash{'display_attrs_'.$i} == 1);
$i++;
}
my $valign = ($hash{'display_attrs_7'} == 1 ? 'top' : 'bottom');
@@ -807,7 +845,9 @@ sub display_line {
$updir='/'.(split(/\.(page|sequence)\/\//,$startdir))[-1];
$updir=~s/\/+/\//g;
- $r->print("
\n");
+ $r->print(&mt("Up")."$tabtag");
+ $r->print(&Apache::loncommon::end_data_table_row());
return OK;
}
# Do we have permission to look at this?
@@ -829,90 +871,101 @@ sub display_line {
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'; }
+#SB if ($absolute) { $fileclr='#ccdd99'; }
# display domain
if ($filecom[1] eq 'domain') {
$r->print (''."\n")
if ($env{'form.dirPointer'} eq "on");
- $r->print("