Diff for /loncom/interface/loncommon.pm between versions 1.501 and 1.502

version 1.501, 2007/01/15 20:48:34 version 1.502, 2007/01/20 22:04:57
Line 2903  sub blockcheck { Line 2903  sub blockcheck {
         $uname = $env{'user.name'};          $uname = $env{'user.name'};
     }      }
   
     my ($startblock,$endblock);  
   
     # If uname and udom are for a course, check for blocks in the course.      # If uname and udom are for a course, check for blocks in the course.
   
     if (&Apache::lonnet::is_course($udom,$uname)) {      if (&Apache::lonnet::is_course($udom,$uname)) {
         my %records = &Apache::lonnet::dump('comm_block',$udom,$uname);          my %records = &Apache::lonnet::dump('comm_block',$udom,$uname);
         ($startblock,$endblock)=&get_blocks($setters,$activity,$udom,$uname);          my ($startblock,$endblock)=&get_blocks($setters,$activity,$udom,$uname);
         return ($startblock,$endblock);          return ($startblock,$endblock);
     }      }
   
       my $startblock = 0;
       my $endblock = 0;
     my %live_courses = &findallcourses(undef,$uname,$udom);      my %live_courses = &findallcourses(undef,$uname,$udom);
   
     # If uname is for a user, and activity is course-specific, i.e.,      # If uname is for a user, and activity is course-specific, i.e.,
Line 2973  sub blockcheck { Line 2973  sub blockcheck {
             if ($sec ne 'none') {              if ($sec ne 'none') {
                 $checkrole .= '/'.$sec;                  $checkrole .= '/'.$sec;
             }              }
             # Resource belongs to user other than current user.  
             # Assemble privs for that user, and check for 'evb' priv.    
             if ($otheruser) {              if ($otheruser) {
                 # Resource belongs to user other than current user.                  # Resource belongs to user other than current user.
                 # Assemble privs for that user, and check for 'evb' priv.                  # Assemble privs for that user, and check for 'evb' priv.
Line 3024  sub blockcheck { Line 3022  sub blockcheck {
   
         # Retrieve blocking times and identity of blocker for course          # Retrieve blocking times and identity of blocker for course
         # of specified user, unless user has 'evb' privilege.          # of specified user, unless user has 'evb' privilege.
           
         ($startblock,$endblock)=&get_blocks($setters,$activity,$cdom,$cnum);          my ($start,$end)=&get_blocks($setters,$activity,$cdom,$cnum);
           if (($start != 0) && 
               (($startblock == 0) || ($startblock > $start))) {
               $startblock = $start;
           }
           if (($end != 0)  &&
               (($endblock == 0) || ($endblock < $end))) {
               $endblock = $end;
           }
     }      }
     return ($startblock,$endblock);      return ($startblock,$endblock);
 }  }

Removed from v.1.501  
changed lines
  Added in v.1.502


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