version 1.125, 2009/04/15 10:49:30
|
version 1.132, 2009/05/14 10:01:20
|
Line 213 sub handler {
|
Line 213 sub handler {
|
'force_register' => $forceregister}; |
'force_register' => $forceregister}; |
if ($env{'form.popup'}) { |
if ($env{'form.popup'}) { |
$args->{'no_nav_bar'} = 1; |
$args->{'no_nav_bar'} = 1; |
|
} else { # Don't show breadcrumbs in popup window |
|
$args->{'bread_crumbs'} = [{href=>"/adm/$cdom/$cnum/aboutme",text=>"Personal Information Page"}]; |
} |
} |
$args->{'bread_crumbs'} = [{href=>"/adm/fhwfdev/$cnum/aboutme",text=>"Personal Information Page"}]; |
my $start_page = &Apache::loncommon::start_page('Personal Information Page',$rss_link,$args); |
my $start_page = |
|
&Apache::loncommon::start_page("Personal Data",$rss_link,$args); |
|
$r->print($start_page); |
$r->print($start_page); |
|
|
} |
#Print Privacy Note |
|
if ($allowed) { |
#Print Privacy Note |
$r->print('<div class="LC_info">' |
if ($allowed) { |
|
$r->print('<div class="LC_info">' |
|
.'<b>'.&mt('Privacy Note:').'</b> ' |
.'<b>'.&mt('Privacy Note:').'</b> ' |
.&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.') |
.&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.') |
.'</div>' |
.'</div>' |
Line 233 sub handler {
|
Line 231 sub handler {
|
#Print last modified |
#Print last modified |
|
|
my $lastmod; |
my $lastmod; |
if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { |
if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { |
$lastmod=$syllabus{'uploaded.lastmodified'}; |
$lastmod=$syllabus{'uploaded.lastmodified'}; |
$lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never')); |
$lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never')); |
$r->print('<div class="LC_info">'); |
$r->print('<div class="LC_info">'); |
$r->print(&mt('Last updated').': '.$lastmod . ''); |
$r->print(&mt('Last updated').': '.$lastmod . ''); |
$r->print('</div>'); |
$r->print('</div>'); |
|
} |
} |
} |
#Print Help Text |
#Print Help Text |
if ($target ne 'tex') { |
if ($target ne 'tex') { |
Line 248 sub handler {
|
Line 247 sub handler {
|
} |
} |
|
|
#----------------Print Functions |
#----------------Print Functions |
if ($target ne 'tex'){ |
if ($target ne 'tex') { |
$r->print(&Apache::lontemplate::start_functionslist()); |
$r->print(&Apache::lontemplate::start_functionslist()); |
if($allowed){ |
if ($allowed) { |
my $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}}); |
my $query_string = &build_query_string({'forcestudent' => '1','popup' => $env{'form.popup'}}); |
$r->print(&Apache::lontemplate::item_functionslist( |
$r->print(&Apache::lontemplate::item_functionslist( |
'<a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>' |
'<a href="'.$r->uri.$query_string.'">'.&mt('Show Public View').'</a>' |
Line 284 sub handler {
|
Line 283 sub handler {
|
if ($target ne 'tex') { |
if ($target ne 'tex') { |
$r->print('<div class="LC_ContentBoxSpecial">'); |
$r->print('<div class="LC_ContentBoxSpecial">'); |
$r->print('<h2 class="LC_hcell">'.&Apache::loncommon::plainname($cnum,$cdom).'</h2>'); |
$r->print('<h2 class="LC_hcell">'.&Apache::loncommon::plainname($cnum,$cdom).'</h2>'); |
$r->print('<blockquote>'); |
$r->print('<div class="LC_BoxPadding">' ); |
if ($courseenv{'nickname'}) { |
if ($courseenv{'nickname'}) { |
$r->print('<h2>"'.$courseenv{'nickname'}.'"</h2>'); |
$r->print('<h2>"'.$courseenv{'nickname'}.'"</h2>'); |
} |
} |
Line 379 my $image;
|
Line 378 my $image;
|
&Apache::lontemplate::print_aboutme_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus); |
&Apache::lontemplate::print_aboutme_content_template($r,$allowed,$target,\%syllabusfields,\%syllabus); |
#End Print Content |
#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); |
&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'); |
&Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_ContentBoxSpecial'); |
$r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom)); |
$r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom)); |
&Apache::lontemplate::print_end_template($r); |
&Apache::lontemplate::print_end_template($r); |
Line 400 my $image;
|
Line 398 my $image;
|
} |
} |
if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');} |
if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');} |
} else { |
} else { |
# &Apache::lontemplate::send_message($r,$cnum,$cdom); |
|
$r->print('<p>'.&mt('No personal information provided').'.</p>'); |
$r->print('<p>'.&mt('No personal information provided').'.</p>'); |
} |
} |
if($target ne 'tex'){ |
|
#$r->print('</blockquote>'); |
|
#$r->print('</div>'); |
|
} |
|
|
|
if ($env{'request.course.id'} |
if ($env{'request.course.id'} |
&& &Apache::lonnet::allowed('srm',$env{'request.course.id'}) |
&& &Apache::lonnet::allowed('srm',$env{'request.course.id'}) |
Line 417 my $image;
|
Line 410 my $image;
|
$r->print('<span class="LC_info">'); |
$r->print('<span class="LC_info">'); |
$r->print(&mt('Shared by course faculty and staff').&Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message")); |
$r->print(&mt('Shared by course faculty and staff').&Apache::loncommon::help_open_topic("Course_Face_To_Face_Records,Course_Critical_Message")); |
$r->print('</span> <p>'); |
$r->print('</span> <p>'); |
&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom); |
&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom); |
$r->print('</p>'); |
$r->print('</p>'); |
&Apache::lontemplate::print_end_template($r); |
&Apache::lontemplate::print_end_template($r); |
|
|
Line 426 my $image;
|
Line 419 my $image;
|
&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom); |
&Apache::lonmsgdisplay::disfacetoface($r,$cnum,$cdom); |
} |
} |
} |
} |
$r->print('</blockquote>'); |
|
$r->print('</div>'); |
|
if ($target ne 'tex') { |
if ($target ne 'tex') { |
|
$r->print('</div>'); |
|
$r->print('</div>'); |
if ($env{'form.popup'}) { |
if ($env{'form.popup'}) { |
$r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a>'); |
$r->print('<p><a href="javascript:window.close()">'.&mt('Close window').'</a>'); |
} |
} |
Line 696 sub portfolio_files {
|
Line 689 sub portfolio_files {
|
return $filecounts; |
return $filecounts; |
} |
} |
|
|
{ |
|
my $count=0; |
|
sub portfolio_table_start { |
|
$count=0; |
|
return '<table class="LC_aboutme_port">'; |
|
} |
|
sub portfolio_row_start { |
|
$count++; |
|
my $class = ($count%2)?'LC_odd_row' |
|
:'LC_even_row'; |
|
return '<tr class="'.$class.'">'; |
|
} |
|
} |
|
|
|
sub build_hierarchy { |
sub build_hierarchy { |
my ($r,$cdom,$cnum,$portaccess,$is_course,$filecounts,$mode,$access_info, |
my ($r,$cdom,$cnum,$portaccess,$is_course,$filecounts,$mode,$access_info, |
$allfileshash,$group) = @_; |
$allfileshash,$group) = @_; |
Line 754 sub build_hierarchy {
|
Line 733 sub build_hierarchy {
|
my $output; |
my $output; |
if ($mode eq 'listfiles') { |
if ($mode eq 'listfiles') { |
if ($filecounts->{'both'} > 0) { |
if ($filecounts->{'both'} > 0) { |
$output = &portfolio_table_start(); |
$output = &Apache::loncommon::start_data_table(); |
$output .= &parse_directory($r,0,$allfileshash,'',$is_course, |
$output .= &parse_directory($r,0,$allfileshash,'',$is_course, |
$group); |
$group); |
$output .= '</table>'; |
$output .= &Apache::loncommon::end_data_table(); |
} |
} |
} |
} |
return $output; |
return $output; |
Line 776 sub parse_directory {
|
Line 755 sub parse_directory {
|
((split('&',$_,2))[0],1) |
((split('&',$_,2))[0],1) |
} &Apache::lonnet::dirlist($portfolio_root.$path,$cdom,$cnum,$getpropath); |
} &Apache::lonnet::dirlist($portfolio_root.$path,$cdom,$cnum,$getpropath); |
foreach my $item (sort(keys(%{$currhash}))) { |
foreach my $item (sort(keys(%{$currhash}))) { |
$output .= &portfolio_row_start(); |
$output .= &Apache::loncommon::start_data_table_row(); |
$output .= '<td style="padding-left: '.($depth*25).'px">'; |
$output .= '<td style="padding-left: '.($depth*25).'px">'; |
if (ref($currhash->{$item}) eq 'HASH') { |
if (ref($currhash->{$item}) eq 'HASH') { |
my $title=&HTML::Entities::encode($item,'<>&"'); |
my $title=&HTML::Entities::encode($item,'<>&"'); |
$output .= '<img src="'.&Apache::loncommon::lonhttpdurl("/adm/lonIcons/navmap.folder.open.gif").'" alt="'.&mt('Folder').' '.$title.'" class="LC_icon" /> '.$title; |
$output .= '<img src="'.&Apache::loncommon::lonhttpdurl("/adm/lonIcons/navmap.folder.open.gif").'" alt="'.&mt('Folder').' '.$title.'" class="LC_icon" /> '.$title; |
$output .= '</td><td></td></tr>'; |
$output .= '</td><td> </td>' |
|
.&Apache::loncommon::end_data_table_row(); |
$output .= &parse_directory($r,$depth,$currhash->{$item}, |
$output .= &parse_directory($r,$depth,$currhash->{$item}, |
$path.'/'.$item,$is_course,$group); |
$path.'/'.$item,$is_course,$group); |
} else { |
} else { |
Line 820 sub parse_directory {
|
Line 800 sub parse_directory {
|
&Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.gif'). |
&Apache::loncommon::lonhttpdurl('/res/adm/pages/catalog.gif'). |
'" class="LC_icon" /></a>'; |
'" class="LC_icon" /></a>'; |
} |
} |
$output .= '</td></tr>'; |
$output .= '</td>' |
|
.&Apache::loncommon::end_data_table_row(); |
} |
} |
} |
} |
return $output; |
return $output; |