--- loncom/interface/lonaboutme.pm 2006/09/21 15:50:10 1.56 +++ loncom/interface/lonaboutme.pm 2008/01/16 12:19:39 1.66 @@ -1,7 +1,7 @@ # The LearningOnline Network # "About Me" Personal Information # -# $Id: lonaboutme.pm,v 1.56 2006/09/21 15:50:10 albertel Exp $ +# $Id: lonaboutme.pm,v 1.66 2008/01/16 12:19:39 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -57,7 +57,7 @@ sub handler { 'No user information available'); return OK; } else { - $is_course = &check_for_course($cdom,$cnum); + $is_course = &Apache::lonnet::is_course($cdom,$cnum); } # --------------------------------------------------------- The syllabus fields @@ -74,7 +74,13 @@ sub handler { # ----------------------------------------------- Available Portfolio file display if (($target ne 'tex') && ($action eq 'portfolio')) { &display_portfolio_header($r,$is_course); - &display_portfolio_files($r,$is_course); + my ($blocked,$blocktext) = + &Apache::loncommon::blocking_status('port',$cnum,$cdom); + if (!$blocked) { + &display_portfolio_files($r,$is_course); + } else { + $r->print($blocktext); + } $r->print(&Apache::loncommon::end_page()); return OK; } @@ -108,8 +114,9 @@ sub handler { # --------------------------------------- There is such a user, get environment my %courseenv=&Apache::lonnet::dump('environment',$cdom,$cnum); if ($target ne 'tex') { + my $rss_link = &Apache::lonrss::rss_link($cnum,$cdom); my $start_page = - &Apache::loncommon::start_page("Personal Information",undef, + &Apache::loncommon::start_page("Personal Information", $rss_link, {'function' => $forcestudent, 'domain' => $cdom, 'force_register' => @@ -125,10 +132,10 @@ sub handler { '"'); } if ($target ne 'tex') { - $r->print('
'.&Apache::loncommon::messagewrapper('Send me a message',$cnum,$cdom).'
'.&Apache::lonrss::advertisefeeds($cnum,$cdom)); + $r->print(''.&Apache::loncommon::messagewrapper(&mt('Send me a message'),$cnum,$cdom).'
'.&Apache::lonrss::advertisefeeds($cnum,$cdom)); } else { - $r->print('\textbf{'.$Apache::lonnet::domaindescription{$cdom}.'}\\\\'); + $r->print('\textbf{'.&Apache::lonnet::domain($cdom,'description').'}\\\\'); } my %syllabus=&Apache::lonnet::dump('aboutme',$cdom,$cnum); my $allowed=0; @@ -144,7 +151,7 @@ sub handler { $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.'). '
'. - &Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'Show Public View'. + &Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'
'.&mt('Show Public View').''. &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'
'); } elsif ($privleged && $target ne 'tex') { my $query_string = &build_query_string({'forceedit' => '1',}); @@ -171,12 +178,12 @@ sub handler { } } if (($allowed) && ($env{'form.storesyl'})) { - foreach (keys %syllabusfields) { - my $field=$env{'form.'.$_}; + foreach my $syl_field (keys(%syllabusfields)) { + my $field=$env{'form.'.$syl_field}; $field=~s/\s+$//s; $field=&Apache::lonfeedback::clear_out_html($field, $env{'user.adv'}); - $syllabus{$_}=$field; + $syllabus{$syl_field}=$field; } $syllabus{'uploaded.lastmodified'}=time; &Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum); @@ -200,18 +207,18 @@ sub handler { if ($allowed) { $r->print( ''. '