Diff for /loncom/interface/lonaboutme.pm between versions 1.146 and 1.149

version 1.146, 2010/03/29 12:21:38 version 1.149, 2012/10/04 13:41:10
Line 121  sub handler { Line 121  sub handler {
                     $r->print('\noindent{\large\textbf{'.&mt('No user personal information page available').'}}\\\\\\\\');                      $r->print('\noindent{\large\textbf{'.&mt('No user personal information page available').'}}\\\\\\\\');
                 } else {                  } else {
                     $r->print(&Apache::loncommon::start_page("Personal Information Page"));                      $r->print(&Apache::loncommon::start_page("Personal Information Page"));
                     $r->print('<h2>'.&mt('No user personal information page available') .'</h2>'.                      $r->print('<p class="_LC_info">'.&mt('No user personal information page available') .'</p>'.
                         &mt('This is a result of one of the following:').'<ul>'.                          &mt('This is a result of one of the following:').'<ul>'.
                         '<li>'.&mt('The administrator of this domain has disabled personal information page functionality for this specific user.').'</li>'.                          '<li>'.&mt('The administrator of this domain has disabled personal information page functionality for this specific user.').'</li>'.
                         '<li>'.&mt('The domain has been configured to disable, by default, personal information page functionality for all users in the domain.').'</li>'.                          '<li>'.&mt('The domain has been configured to disable, by default, personal information page functionality for all users in the domain.').'</li>'.
Line 409  sub handler { Line 409  sub handler {
         }          }
         if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');}          if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');}
     } else {      } else {
         $r->print('<p>'.&mt('No personal information provided').'.</p>');          $r->print('<p class="LC_info">'.&mt('No personal information provided').'.</p>');
     }      }
   
     if ($env{'request.course.id'}      if ($env{'request.course.id'}
Line 452  sub in_course { Line 452  sub in_course {
         $cdom = $env{'course.'.$cid.'.domain'};          $cdom = $env{'course.'.$cid.'.domain'};
         $cnum = $env{'course.'.$cid.'.num'};          $cnum = $env{'course.'.$cid.'.num'};
     }      }
     my %roles = &Apache::lonnet::dump('roles',$udom,$uname);      my $typesref;
     my @course_roles = grep(m{^/\Q$cdom\E/\Q$cnum\E[/_]}, keys(%roles));      if ($type eq 'all') {
     return 0 if (!@course_roles);          $typesref = ['active','previous','future'];
     return 1 if ($type eq 'any');      } elsif ($type eq 'previous' || $type eq 'future') {
     my $now = time();          $typesref = [$type];
     foreach my $role (@course_roles) {      }
         my (undef,$role_end,$role_start)=split(/\_/,$roles{$role});      my %roles = &Apache::lonnet::get_my_roles($uname,$udom,'userroles',
         my $status = 'active';                                               $typesref,undef,[$cdom]);
         if ($role_start > 0 && $now < $role_start) {      my ($tmp) = keys(%roles);
             $status = 'future';      return 0 if ($tmp =~ /^(con_lost|error|no_such_host)/i);
         }      my @course_roles = grep(/^\Q$cnum\E:\Q$cdom\E:/, keys(%roles));
         if ($role_end > 0 && $now > $role_end) {      if (@course_roles > 0) {
             $status = 'previous';          return 1;
         }  
         return 1 if ($status eq $type);  
     }      }
     return 0;      return 0;
 }  }
Line 779  sub parse_directory { Line 777  sub parse_directory {
     my $portfolio_root = &Apache::portfolio::get_portfolio_root($cdom,$cnum,      my $portfolio_root = &Apache::portfolio::get_portfolio_root($cdom,$cnum,
                                                                 $group);                                                                  $group);
     my $getpropath = 1;      my $getpropath = 1;
     my %dirlist = map {      my ($listref,$listerror) =
         ((split('&',$_,2))[0],1)          &Apache::lonnet::dirlist($portfolio_root.$path,$cdom,$cnum,$getpropath);
     } &Apache::lonnet::dirlist($portfolio_root.$path,$cdom,$cnum,$getpropath);      my %dirlist;
       if (ref($listref) eq 'ARRAY') {
           %dirlist = map { ((split('&',$_,2))[0],1) } @{$listref};
       }
     foreach my $item (sort(keys(%{$currhash}))) {      foreach my $item (sort(keys(%{$currhash}))) {
         $output .= &Apache::loncommon::start_data_table_row();          $output .= &Apache::loncommon::start_data_table_row();
         $output .= '<td style="padding-left: '.($depth*25).'px">';          $output .= '<td style="padding-left: '.($depth*25).'px">';

Removed from v.1.146  
changed lines
  Added in v.1.149


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