--- loncom/interface/lonaboutme.pm 2009/04/15 10:49:30 1.125
+++ loncom/interface/lonaboutme.pm 2009/05/13 14:27:52 1.131
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Personal Information Page
#
-# $Id: lonaboutme.pm,v 1.125 2009/04/15 10:49:30 bisitz Exp $
+# $Id: lonaboutme.pm,v 1.131 2009/05/13 14:27:52 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -214,16 +214,13 @@ sub handler {
if ($env{'form.popup'}) {
$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);
+ $args->{'bread_crumbs'} = [{href=>"/adm/$cdom/$cnum/aboutme",text=>"Personal Information Page"}];
+ my $start_page = &Apache::loncommon::start_page('Personal Information Page',$rss_link,$args);
$r->print($start_page);
- }
-
-#Print Privacy Note
- if ($allowed) {
- $r->print('
'
+ #Print Privacy Note
+ if ($allowed) {
+ $r->print('
'
.''.&mt('Privacy Note:').' '
.&mt('The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.')
.'
'
@@ -233,12 +230,13 @@ sub handler {
#Print last modified
my $lastmod;
- if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) {
- $lastmod=$syllabus{'uploaded.lastmodified'};
- $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));
+ if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) {
+ $lastmod=$syllabus{'uploaded.lastmodified'};
+ $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));
$r->print('
');
$r->print(&mt('Last updated').': '.$lastmod . '');
$r->print('
');
+ }
}
#Print Help Text
if ($target ne 'tex') {
@@ -248,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').''
@@ -284,7 +282,7 @@ sub handler {
if ($target ne 'tex') {
$r->print('
');
$r->print('
'.&Apache::loncommon::plainname($cnum,$cdom).'
');
- $r->print('
');
+ $r->print('' );
if ($courseenv{'nickname'}) {
$r->print('
"'.$courseenv{'nickname'}.'"
');
}
@@ -379,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);
@@ -400,13 +397,8 @@ my $image;
}
if ($target ne 'tex') {$r->print('
');} else {$r->print('\\\\');}
} else {
- # &Apache::lontemplate::send_message($r,$cnum,$cdom);
$r->print('
'.&mt('No personal information provided').'.
');
}
- if($target ne 'tex'){
- #$r->print('');
- #$r->print('
');
- }
if ($env{'request.course.id'}
&& &Apache::lonnet::allowed('srm',$env{'request.course.id'})
@@ -417,7 +409,7 @@ my $image;
$r->print('');
$r->print(&mt('Shared by course faculty and staff').&Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message"));
$r->print(' ');
-&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);
+ &Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);
$r->print('
');
&Apache::lontemplate::print_end_template($r);
@@ -426,9 +418,9 @@ my $image;
&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom);
}
}
- $r->print('
');
- $r->print('
');
if ($target ne 'tex') {
+ $r->print('
');
+ $r->print('');
if ($env{'form.popup'}) {
$r->print(''.&mt('Close window').'');
}
@@ -696,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) = @_;
@@ -754,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;
@@ -776,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 {
@@ -820,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;