Diff for /loncom/interface/lonaboutme.pm between versions 1.57 and 1.62

version 1.57, 2006/10/23 18:48:46 version 1.62, 2007/05/02 01:33:48
Line 57  sub handler { Line 57  sub handler {
       'No user information available');        'No user information available');
         return OK;          return OK;
     } else {      } else {
         $is_course = &check_for_course($cdom,$cnum);          $is_course = &Apache::lonnet::is_course($cdom,$cnum);
     }      }
   
 # --------------------------------------------------------- The syllabus fields  # --------------------------------------------------------- The syllabus fields
Line 74  sub handler { Line 74  sub handler {
 # ----------------------------------------------- Available Portfolio file display   # ----------------------------------------------- Available Portfolio file display 
     if (($target ne 'tex') && ($action eq 'portfolio')) {      if (($target ne 'tex') && ($action eq 'portfolio')) {
         &display_portfolio_header($r,$is_course);          &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());          $r->print(&Apache::loncommon::end_page());
         return OK;          return OK;
     }      }
Line 125  sub handler { Line 131  sub handler {
          '&quot;</h2>');           '&quot;</h2>');
     }      }
     if ($target ne 'tex') {      if ($target ne 'tex') {
  $r->print('<h3>'.$Apache::lonnet::domaindescription{$cdom}.'</h3>'.   $r->print('<h3>'.&Apache::lonnet::domain($cdom,'description').'</h3>'.
   '<p>'.&Apache::loncommon::messagewrapper('Send me a message',$cnum,$cdom).'</p>'.&Apache::lonrss::advertisefeeds($cnum,$cdom));    '<p>'.&Apache::loncommon::messagewrapper('Send me a message',$cnum,$cdom).'</p>'.&Apache::lonrss::advertisefeeds($cnum,$cdom));
     } else {      } 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 %syllabus=&Apache::lonnet::dump('aboutme',$cdom,$cnum);
     my $allowed=0;      my $allowed=0;
Line 230  sub handler { Line 236  sub handler {
                  $r->print('<br /><textarea cols="80" rows="6" name="'.$field.'">'.                   $r->print('<br /><textarea cols="80" rows="6" name="'.$field.'">'.
    &HTML::Entities::encode($syllabus{$field},'"&<>').     &HTML::Entities::encode($syllabus{$field},'"&<>').
            '</textarea><input type="submit" name="storesyl" value="'.             '</textarea><input type="submit" name="storesyl" value="'.
    &mt('Store').'" />');     &mt('Save').'" />');
       }        }
   }    }
        }         }
Line 629  sub parse_directory { Line 635  sub parse_directory {
     return $output;      return $output;
 }  }
   
 sub check_for_course {  
     my ($cdom,$cnum) = @_;  
     my %courses = &Apache::lonnet::courseiddump($cdom,'.',1,'.','.',$cnum,undef,  
                                                 undef,'.');  
     if (exists($courses{$cdom.'_'.$cnum})) {  
         return 1;  
     }  
     return 0;  
 }  
   
 1;  1;
 __END__  __END__

Removed from v.1.57  
changed lines
  Added in v.1.62


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>