--- loncom/interface/lonaboutme.pm 2009/04/21 17:58:17 1.127
+++ loncom/interface/lonaboutme.pm 2009/05/12 14:46:59 1.130
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Personal Information Page
#
-# $Id: lonaboutme.pm,v 1.127 2009/04/21 17:58:17 neumanie Exp $
+# $Id: lonaboutme.pm,v 1.130 2009/05/12 14:46:59 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -95,7 +95,7 @@ sub handler {
return OK if $r->header_only;
my $target=$env{'form.grade_target'};
# ------------------------------------------------------------ Print the screen
- if ($target eq 'tex') {
+ if ($target eq 'tex') {
$r->print(&Apache::lonprintout::print_latex_header($env{'form.latex_type'}));
}
my (undef,undef,$cdom,$cnum,undef,$action)=split(/\//,$r->uri);
@@ -215,9 +215,9 @@ sub handler {
$args->{'no_nav_bar'} = 1;
}
$args->{'bread_crumbs'} = [{href=>"/adm/fhwfdev/$cnum/aboutme",text=>"Personal Information Page"}];
- my $start_page = &Apache::loncommon::start_page("Personal Data",$rss_link,$args);
+ my $start_page = &Apache::loncommon::start_page('Personal Information Page',$rss_link,$args);
$r->print($start_page);
-
+
#Print Privacy Note
if ($allowed) {
$r->print('
'
@@ -226,7 +226,7 @@ sub handler {
.'
'
);
}
-
+
#Print last modified
my $lastmod;
@@ -246,9 +246,9 @@ sub handler {
}
#----------------Print Functions
- if ($target ne 'tex'){
+ if ($target ne 'tex') {
$r->print(&Apache::lontemplate::start_functionslist());
- if($allowed){
+ if ($allowed) {
my $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}});
$r->print(&Apache::lontemplate::item_functionslist(
''.&mt('Show Public View').''
@@ -377,10 +377,9 @@ my $image;
&Apache::lontemplate::print_aboutme_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus);
#End Print Content
- if($target ne 'tex')#Begin Print RSS and portfiles
- {
+ if($target ne 'tex') { #Begin Print RSS and portfiles
&print_portfiles_link($r,$is_course);
- if(&Apache::lonrss::advertisefeeds($cnum,$cdom) ne ''){
+ if (&Apache::lonrss::advertisefeeds($cnum,$cdom) ne '') {
&Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_ContentBoxSpecial');
$r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom));
&Apache::lontemplate::print_end_template($r);
@@ -397,9 +396,9 @@ my $image;
$r->print('');
}
if ($target ne 'tex') {$r->print('
');} else {$r->print('\\\\');}
- } else {
+ } else {
$r->print(''.&mt('No personal information provided').'.
');
- }
+ }
if ($env{'request.course.id'}
&& &Apache::lonnet::allowed('srm',$env{'request.course.id'})
@@ -418,7 +417,7 @@ my $image;
$r->print('\\\\\textbf{'.&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'}\\\\'.&mt('Shared by course faculty and staff').'\\\\\\\\');
&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);
}
- }
+ }
if ($target ne 'tex') {
$r->print('');
$r->print('');
@@ -689,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) = @_;
@@ -747,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;
@@ -769,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 {
@@ -813,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;