Diff for /loncom/interface/lonfeedback.pm between versions 1.302 and 1.303

version 1.302, 2010/09/21 04:18:50 version 1.303, 2010/11/19 20:32:38
Line 732  END Line 732  END
      $group,$crstype);       $group,$crstype);
                 }                  }
             } else {              } else {
         $discussion.=                   if (&Apache::lonnet::allowed('pch',$env{'request.course.id'}.
     &postingform_display($mode,$ressymb,$now,$subject,                      ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
  $comment,$outputtarget,$attachnum,  
  $currnewattach,$currdelold,'',$crstype);              $discussion.= 
           &postingform_display($mode,$ressymb,$now,$subject,
        $comment,$outputtarget,$attachnum,
        $currnewattach,$currdelold,'',$crstype);
                   } else {
                       $discussion.= '<span class="LC_feedback_link">'.
                                     &mt('This discussion is closed.').'</span>';
                   }
             }              }
  }   }
           if (!(&discussion_open($status)) && ($outputtarget ne 'tex')) {
               $discussion.= '<span class="LC_feedback_link">'.
                             &mt('This discussion is closed.').'</span>';
           }
     } elsif ($outputtarget ne 'tex') {      } elsif ($outputtarget ne 'tex') {
         $discussion.='<div class="LC_feedback_link">';          $discussion.='<div class="LC_feedback_link">';
         if (&discussion_open($status) &&          if (&discussion_open($status) &&
Line 2618  ENDNOREDIRTWO Line 2629  ENDNOREDIRTWO
 }  }
   
 sub screen_header {  sub screen_header {
     my ($feedurl,$symb) = @_;      my ($feedurl,$symb,$group) = @_;
     my $crscontent = &mt('Question/Comment/Feedback about course content');      my $crscontent = &mt('Question/Comment/Feedback about course content');
     my $crspolicy = &mt('Question/Comment/Feedback about course policy');      my $crspolicy = &mt('Question/Comment/Feedback about course policy');
     my $contribdisc = &mt('Contribution to course discussion of resource');      my $contribdisc = &mt('Contribution to course discussion of resource');
Line 2674  sub screen_header { Line 2685  sub screen_header {
             $realsymb=&Apache::lonnet::symbread($filename);              $realsymb=&Apache::lonnet::symbread($filename);
         }          }
         if (!$blocked && &discussion_open(undef,$realsymb) &&           if (!$blocked && &discussion_open(undef,$realsymb) && 
     &Apache::lonnet::allowed('pch',      (&Apache::lonnet::allowed('pch',
      $env{'request.course.id'}.        $env{'request.course.id'}.
      ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {        ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')) || (($group ne '') && (&check_group_priv($group,'pgd') eq 'ok')))) {
     $discussoptions='<label><input type="radio" name="discuss" value="nonanon" checked="checked" /> '.      $discussoptions='<label><input type="radio" name="discuss" value="nonanon" checked="checked" /> '.
  $contribdisc.   $contribdisc.
         '</label><br /><label><input type="radio" name="discuss" value="anon" /> '.          '</label><br /><label><input type="radio" name="discuss" value="anon" /> '.
Line 2815  sub send_msg { Line 2826  sub send_msg {
 }  }
   
 sub adddiscuss {  sub adddiscuss {
     my ($symb,$email,$anon,$attachmenturl,$subject)=@_;      my ($symb,$email,$anon,$attachmenturl,$subject,$group)=@_;
     my $status='';      my $status='';
     my $realsymb;      my $realsymb;
     if ($symb=~/^bulletin___/) {      if ($symb=~/^bulletin___/) {
Line 2824  sub adddiscuss { Line 2835  sub adddiscuss {
  $realsymb=&Apache::lonnet::symbread($filename);   $realsymb=&Apache::lonnet::symbread($filename);
     }      }
     if (&discussion_open(undef,$realsymb) &&      if (&discussion_open(undef,$realsymb) &&
  &Apache::lonnet::allowed('pch',$env{'request.course.id'}.   (&Apache::lonnet::allowed('pch',$env{'request.course.id'}.
         ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {           ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')) || 
            ($group ne '' && &check_group_priv($group,'pgd')))) {
   
     my %contrib=('message'      => $email,      my %contrib=('message'      => $email,
                  'sendername'   => $env{'user.name'},                   'sendername'   => $env{'user.name'},
Line 3870  ENDREDIR Line 3882  ENDREDIR
                   return OK;                    return OK;
               }                }
           }            }
   my $options=&screen_header($feedurl,$symb);    my $options=&screen_header($feedurl,$symb,$group);
   if ($options) {    if ($options) {
       &mail_screen($r,$feedurl,$options,$symb,$attachmax{'text'});        &mail_screen($r,$feedurl,$options,$symb,$attachmax{'text'});
   } else {    } else {
Line 3952  ENDREDIR Line 3964  ENDREDIR
   my $subject = &clear_out_html($env{'form.subject'});    my $subject = &clear_out_html($env{'form.subject'});
   my $anonmode=($env{'form.discuss'} eq 'anon' || $env{'form.anondiscuss'} );    my $anonmode=($env{'form.discuss'} eq 'anon' || $env{'form.anondiscuss'} );
   $typestyle.=&adddiscuss($symb,$message,$anonmode,$attachmenturl,    $typestyle.=&adddiscuss($symb,$message,$anonmode,$attachmenturl,
   $subject);    $subject,$group);
   $numpost++;    $numpost++;
       }        }
   

Removed from v.1.302  
changed lines
  Added in v.1.303


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