--- loncom/interface/lonaboutme.pm 2009/05/11 13:34:10 1.128
+++ loncom/interface/lonaboutme.pm 2009/05/11 14:13:51 1.129
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Personal Information Page
#
-# $Id: lonaboutme.pm,v 1.128 2009/05/11 13:34:10 bisitz Exp $
+# $Id: lonaboutme.pm,v 1.129 2009/05/11 14:13:51 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -688,20 +688,6 @@ sub portfolio_files {
return $filecounts;
}
-{
- my $count=0;
- sub portfolio_table_start {
- $count=0;
- return '
';
- }
- sub portfolio_row_start {
- $count++;
- my $class = ($count%2)?'LC_odd_row'
- :'LC_even_row';
- return '';
- }
-}
-
sub build_hierarchy {
my ($r,$cdom,$cnum,$portaccess,$is_course,$filecounts,$mode,$access_info,
$allfileshash,$group) = @_;
@@ -746,10 +732,10 @@ sub build_hierarchy {
my $output;
if ($mode eq 'listfiles') {
if ($filecounts->{'both'} > 0) {
- $output = &portfolio_table_start();
+ $output = &Apache::loncommon::start_data_table();
$output .= &parse_directory($r,0,$allfileshash,'',$is_course,
$group);
- $output .= '
';
+ $output .= &Apache::loncommon::end_data_table();
}
}
return $output;
@@ -768,12 +754,13 @@ sub parse_directory {
((split('&',$_,2))[0],1)
} &Apache::lonnet::dirlist($portfolio_root.$path,$cdom,$cnum,$getpropath);
foreach my $item (sort(keys(%{$currhash}))) {
- $output .= &portfolio_row_start();
+ $output .= &Apache::loncommon::start_data_table_row();
$output .= '';
if (ref($currhash->{$item}) eq 'HASH') {
my $title=&HTML::Entities::encode($item,'<>&"');
$output .= ' '.$title;
- $output .= ' | | ';
+ $output .= ' | '
+ .&Apache::loncommon::end_data_table_row();
$output .= &parse_directory($r,$depth,$currhash->{$item},
$path.'/'.$item,$is_course,$group);
} else {
@@ -812,7 +799,8 @@ sub parse_directory {
&Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.gif').
'" class="LC_icon" />';
}
- $output .= '';
+ $output .= ''
+ .&Apache::loncommon::end_data_table_row();
}
}
return $output;