Diff for /loncom/interface/lonfeedback.pm between versions 1.282 and 1.282.2.1

version 1.282, 2009/12/08 13:33:12 version 1.282.2.1, 2010/06/19 19:06:42
Line 48  use LONCAPA; Line 48  use LONCAPA;
   
 sub discussion_open {  sub discussion_open {
     my ($status,$symb)=@_;      my ($status,$symb)=@_;
   # Advanced roles can always discuss
     if ($env{'request.role.adv'}) { return 1; }      if ($env{'request.role.adv'}) { return 1; }
   # Get discussion closing date
       my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);
   # If it is defined and in the future, the instructor wants this discussion to be open
       if (defined($close) && $close ne '' && $close > time) {
           return 1;
       }
   # It was not explicitly open, check if the problem is available.
   # If the problem is not available, close the discussion
     if (defined($status) &&      if (defined($status) &&
  !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'          !($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
   || $status eq 'OPEN')) {            || $status eq 'OPEN')) {
  return 0;          return 0;
     }      }
     my $close=&Apache::lonnet::EXT('resource.0.discussend',$symb);  # The problem is available, but check if the instructor explictly closed discussion
     if (defined($close) && $close ne '' && $close < time) {      if (defined($close) && $close ne '' && $close < time) {
  return 0;          return 0;
     }      }
     return 1;      return 1;
 }  }

Removed from v.1.282  
changed lines
  Added in v.1.282.2.1


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