Diff for /loncom/interface/lonfeedback.pm between versions 1.370.2.5.2.1 and 1.372

version 1.370.2.5.2.1, 2021/12/31 20:39:00 version 1.372, 2016/03/23 02:19:09
Line 44  use HTML::LCParser(); Line 44  use HTML::LCParser();
 #use HTML::Tidy::libXML;  #use HTML::Tidy::libXML;
 use Apache::lonspeller();  use Apache::lonspeller();
 use Apache::longroup;  use Apache::longroup;
 use Archive::Zip qw( :ERROR_CODES );  use Cwd;
 use LONCAPA qw(:DEFAULT :match);  use LONCAPA;
   
 sub discussion_open {  sub discussion_open {
     my ($status,$symb)=@_;      my ($status,$symb)=@_;
Line 118  sub list_discussion { Line 118  sub list_discussion {
             $outputtarget = 'export';              $outputtarget = 'export';
         }          }
     }      }
     my ($nofooter,$nodisclink,$nofdbklink);  
     if (not &discussion_visible($status)) {      if (not &discussion_visible($status)) {
         if ($mode ne 'board') {          if ($mode ne 'board') {
             ($nofooter,$nodisclink,$nofdbklink) = &check_menucoll();              &Apache::lonenc::check_encrypt(\$ressymb); 
             if ($nofooter || $nofdbklink) {              return '<br /><div class="LC_feedback_link">'.&send_message_link($ressymb)."</div>";
                 return '<br />';  
             } else {  
                 &Apache::lonenc::check_encrypt(\$ressymb);  
                 return '<br /><div class="LC_feedback_link">'.&send_message_link($ressymb)."</div>";  
             }  
         }          }
     }      }
     if ($group ne '' && $mode eq 'board') {      if ($group ne '' && $mode eq 'board') {
Line 136  sub list_discussion { Line 130  sub list_discussion {
         }          }
     }      }
   
     unless ($outputtarget eq 'export') {      my ($blocked,$blocktext) = 
         ($nofooter,$nodisclink,$nofdbklink) = &check_menucoll();          &Apache::loncommon::blocking_status('boards');
     }      if ($blocked) {
           $blocktext = '<br /><div class="LC_feedback_link"><span class="LC_feedback_link">'.$blocktext."</span>";
     unless ($nofooter) {          &Apache::lonenc::check_encrypt(\$ressymb);
         my ($blocked,$blocktext) =           if ($mode ne 'board') {
             &Apache::loncommon::blocking_status('boards');              $blocktext.=&send_message_link($ressymb).'</div>';
         if ($blocked) {          }else{
             my $footer = '<br /><div class="LC_feedback_link">';              $blocktext.="</div>";
             unless ($nodisclink) {  
                 $footer .= '<span class="LC_feedback_link">'.$blocktext.'</span>';  
             }  
             &Apache::lonenc::check_encrypt(\$ressymb);  
             if ($mode ne 'board') {  
                 unless ($nofdbklink) {  
                     $footer.=&send_message_link($ressymb);  
                 }  
             }  
             $footer.='</div>';  
             return $footer;  
         }          }
           return $blocktext; 
     }      }
   
     my @bgcols = ("LC_disc_old_item","LC_disc_new_item");      my @bgcols = ("LC_disc_old_item","LC_disc_new_item");
Line 690  END Line 674  END
                                              $newpostsflag,$group,                                               $newpostsflag,$group,
                                              $prevread,$markondisp,$seehidden);                                               $prevread,$markondisp,$seehidden);
             $discussion .= "</table></form>\n";              $discussion .= "</table></form>\n";
         }          } 
         if ($outputtarget eq 'export') {          if ($outputtarget eq 'export') {
             if ($manifestok) {              if ($manifestok) {
                 while ($currdepth > 0) {                  while ($currdepth > 0) {
Line 712  END Line 696  END
   
 #Create zip file in prtspool  #Create zip file in prtspool
   
                     if (($env{'user.name'} =~ /^$match_username$/)                      my $imszipfile = '/prtspool/'.
                         && ($env{'user.domain'} =~ /^$match_domain$/)) {                      $env{'user.name'}.'_'.$env{'user.domain'}.'_'.
                         my $now = time();                           time.'_'.rand(1000000000).'.zip';
                         my $imszipfile = '/prtspool/'.                      my $cwd = &getcwd(); 
                                       join('_',$env{'user.name'},$env{'user.domain'},$now).                      my $imszip = '/home/httpd/'.$imszipfile;
                                       '_'.rand(1000000000).'.zip';                      chdir $tempexport;
                         my $zip = Archive::Zip->new();                      open(OUTPUT, "zip -r $imszip *  2> /dev/null |");
                         $zip->addTree($tempexport);                      close(OUTPUT);
                         my $imszip = '/home/httpd/'.$imszipfile;                      chdir $cwd;
                         if ($zip->writeToFileNamed($imszip) == AZ_OK) {                      $discussion .= &mt('Download the zip file from [_1]Discussion Posting Archive[_2]',
                             $discussion .= &mt('Download the zip file from [_1]Discussion Posting Archive[_2]',  
                                            '<a href="'.$imszipfile.'">','</a>').'<br />';                                             '<a href="'.$imszipfile.'">','</a>').'<br />';
                         } else {                      if ($copyresult) {
                             $discussion .=  &mt('Failed to create zip file').'<br />';                          $discussion .= '<span class="LC_error">'.
                         }                                         &mt('The following errors occurred during export:').
                         if ($copyresult) {                                         '</span><br />'.$copyresult;
                             $discussion .= '<span class="LC_error">'.  
                                            &mt('The following errors occurred during export:').  
                                            '</span><br />'.$copyresult;  
                         }  
                     } else {  
                         $discussion .= '<p class="LC_error">'.  
                                        &mt('Unfortunately you will not be able to retrieve an archive of the discussion posts at this time, because there was a problem creating the zip file.').'</p>';  
                     }                      }
                 }                  }
             } else {              } else {
Line 790  END Line 766  END
                           &mt('This discussion is closed.').'</span>';                            &mt('This discussion is closed.').'</span>';
         }          }
     } elsif ($outputtarget ne 'tex') {      } elsif ($outputtarget ne 'tex') {
         unless ($nofooter) {          $discussion.='<div class="LC_feedback_link">';
             $discussion.='<div class="LC_feedback_link">';          if (&discussion_open($status) &&
             unless ($nodisclink) {              &Apache::lonnet::allowed('pch',
                 if (&discussion_open($status) &&             $env{'request.course.id'}.
                     &Apache::lonnet::allowed('pch',          ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
                    $env{'request.course.id'}.              $discussion.= &send_feedback_link($ressymb);
                 ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {              if ($env{'request.role.adv'}) {
                     $discussion.= &send_feedback_link($ressymb);                  my $close = &Apache::lonnet::EXT('resource.0.discussend',$ressymb);
                     if ($env{'request.role.adv'}) {                  my $canvote = &Apache::lonnet::EXT('resource.0.discussvote',$ressymb);
                         my $close = &Apache::lonnet::EXT('resource.0.discussend',$ressymb);                  if (defined($close) && $close ne '' && $close < time) {
                         my $canvote = &Apache::lonnet::EXT('resource.0.discussvote',$ressymb);                      if ($canvote eq 'notended') {
                         if (defined($close) && $close ne '' && $close < time) {                          $discussion .= '&nbsp;'.&mt('(Posting and voting closed for [_1] roles)',
                             if ($canvote eq 'notended') {                                                      &Apache::lonnet::plaintext('st',$crstype));
                                 $discussion .= '&nbsp;'.&mt('(Posting and voting closed for [_1] roles)',                      } else {
                                                             &Apache::lonnet::plaintext('st',$crstype));                          $discussion .= '&nbsp;'.&mt('(Closed for [_1] roles)',
                             } else {                                                      &Apache::lonnet::plaintext('st',$crstype));
                                 $discussion .= '&nbsp;'.&mt('(Closed for [_1] roles)',  
                                                             &Apache::lonnet::plaintext('st',$crstype));  
                             }  
                         }  
                     }                      }
         } else {  
                     $discussion.= '<span class="LC_feedback_link">'.&mt('This discussion is closed.').'</span>';  
                 }                  }
             }              }
             unless ($nofdbklink) {   } else {
         $discussion.= &send_message_link($ressymb);              $discussion.= '<span class="LC_feedback_link">'.&mt('This discussion is closed.').'</span>';
             }  
             $discussion.='</div>';  
         }          }
    $discussion.= &send_message_link($ressymb).'</div>';
     }      }
     return $discussion;      return $discussion;
 }  }
   
 sub check_menucoll {  
     my ($nofooter,$nodisclink,$nofdbklink);  
     my ($menucoll,$deeplinkmenu,$menuref) = &Apache::loncommon::menucoll_in_effect();  
     if ($menucoll) {  
         if (ref($menuref) eq 'HASH') {  
             if ($menuref->{'foot'} eq 'n') {  
                 $nofooter = 1;  
             } else {  
                 unless ($menuref->{'disc'}) {  
                     $nodisclink = 1;  
                 }  
                 unless ($menuref->{'fdbk'}) {  
                     $nofdbklink = 1;  
                 }  
             }  
         }  
     }  
     return ($nofooter,$nodisclink,$nofdbklink);  
 }  
   
 sub can_see_hidden {  sub can_see_hidden {
     my ($mode,$ressymb,$feedurl,$group,$cdom,$cnum,$crs) = @_;      my ($mode,$ressymb,$feedurl,$group,$cdom,$cnum,$crs) = @_;
     my $seehidden;      my $seehidden;
Line 898  sub send_feedback_link { Line 847  sub send_feedback_link {
                  &discussion_link($ressymb,                   &discussion_link($ressymb,
                     '<img alt="" class="LC_noBorder" src="'.                      '<img alt="" class="LC_noBorder" src="'.
                     &Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').                      &Apache::loncommon::lonhttpdurl('/adm/lonMisc/chat.gif').
                     '" /><span class="LC_menubuttons_inline_text">'.&mt('Post Discussion').'</span>',                      '" border="0" /><span class="LC_menubuttons_inline_text">'.&mt('Post Discussion').'</span>',
                     'replydisc').                      'replydisc').
            '</span>';             '</span>';
 }  }
Line 909  sub send_message_link { Line 858  sub send_message_link {
                  &discussion_link($ressymb,                   &discussion_link($ressymb,
                     '<img alt="" class="LC_noBorder" src="'.                      '<img alt="" class="LC_noBorder" src="'.
                     &Apache::loncommon::lonhttpdurl('/res/adm/pages/feedback.png').                      &Apache::loncommon::lonhttpdurl('/res/adm/pages/feedback.png').
                     '" /><span class="LC_menubuttons_inline_text">'.&mt('Send Feedback').'</span>',                      '" border="0" /><span class="LC_menubuttons_inline_text">'.&mt('Send Feedback').'</span>',
                     'sendmessageonly').                      'sendmessageonly').
                  '</span>';                   '</span>';
     return $output;      return $output;
Line 1003  sub postingform_display { Line 952  sub postingform_display {
             }              }
         }          }
     }      }
       my $postanon;
       if (&Apache::lonnet::allowed('pac',$env{'request.course.id'}.
          ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
           $postanon = '<input type="submit" name="anondiscuss" value="'.$lt{'poan'}.'" />';
       }
     $postingform .= (<<ENDDISCUSS);      $postingform .= (<<ENDDISCUSS);
 <form action="/adm/feedback" method="post" name="mailform" enctype="multipart/form-data"> <input type="submit" name="discuss" value="$lt{'podi'}" />  <form action="/adm/feedback" method="post" name="mailform" enctype="multipart/form-data"> <input type="submit" name="discuss" value="$lt{'podi'}" />
 <input type="submit" name="anondiscuss" value="$lt{'poan'}" /> <input type="hidden" name="symb" value="$ressymb" />  $postanon<input type="hidden" name="symb" value="$ressymb" />
 <input type="hidden" name="sendit" value="true" />  <input type="hidden" name="sendit" value="true" />
 <input type="hidden" name="timestamp" value="$now" />  <input type="hidden" name="timestamp" value="$now" />
 <a name="newpost"></a>  <a name="newpost"></a>
Line 1336  sub build_posting_display { Line 1290  sub build_posting_display {
                                 if (&editing_allowed($escsymb.':::'.$idx,$group)) {                                  if (&editing_allowed($escsymb.':::'.$idx,$group)) {
                                     if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {                                      if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {
                                         $sender.=' '.                                          $sender.=' '.
                                          &discussion_link($ressymb,&mt('Edit'),'editdisc',$idx,$$newpostsflag,$prevread,&group_args($group));                                           &discussion_link($symb,&mt('Edit'),'editdisc',$idx,$$newpostsflag,$prevread,&group_args($group));
                                         unless ($seehidden) {                                          unless ($seehidden) {
                                             my $grpargs = &group_args($group);                                              my $grpargs = &group_args($group);
                                             $sender.=" <a href=\"javascript:verifydelete('studentdelete','$escsymb','$idx','$$newpostsflag','$prevread','$grpargs')";                                              $sender.=" <a href=\"javascript:verifydelete('studentdelete','$escsymb','$idx','$$newpostsflag','$prevread','$grpargs')";
Line 1348  sub build_posting_display { Line 1302  sub build_posting_display {
             if ($hiddens{$idx}) {              if ($hiddens{$idx}) {
                                         unless ($studenthidden) {                                          unless ($studenthidden) {
                             $sender.=' '.                              $sender.=' '.
                                             &discussion_link($ressymb,&mt('Make Visible'),'unhide',$idx,$$newpostsflag,$prevread,&group_args($group));                                              &discussion_link($symb,&mt('Make Visible'),'unhide',$idx,$$newpostsflag,$prevread,&group_args($group));
                                         }                                          }
             } else {              } else {
                                         $sender.=' '.                                          $sender.=' '.
                                          &discussion_link($ressymb,&mt('Hide'),'hide',$idx,$$newpostsflag,$prevread,&group_args($group));                                           &discussion_link($symb,&mt('Hide'),'hide',$idx,$$newpostsflag,$prevread,&group_args($group));
             }              }
                                     my $grpargs = &group_args($group);                                      my $grpargs = &group_args($group);
             $sender.=               $sender.= 
Line 1391  sub build_posting_display { Line 1345  sub build_posting_display {
                                 if (($group ne '') &&                                   if (($group ne '') && 
                                     (&check_group_priv($group,'pgd') eq 'ok')) {                                      (&check_group_priv($group,'pgd') eq 'ok')) {
                                      $sender.=' '.                                       $sender.=' '.
                                          &discussion_link($ressymb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread,&group_args($group));                                           &discussion_link($symb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread,&group_args($group));
                                 } elsif (&Apache::lonnet::allowed('pch',                                   } elsif (&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'}:''))) {
              $sender.=' '.               $sender.=' '.
                                          &discussion_link($ressymb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread);                                           &discussion_link($symb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread);
                                 }                                  }
                             }                              }
             if ($viewgrades) {              if ($viewgrades) {
Line 1564  sub build_posting_display { Line 1518  sub build_posting_display {
                                     if ($userlikes{$idx}) {                                      if ($userlikes{$idx}) {
                                         $$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsup_gray.png" alt="'.&mt('You like this posting').'" />';                                          $$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsup_gray.png" alt="'.&mt('You like this posting').'" />';
                                     } else {                                      } else {
                                         $$discussionitems[$idx].='&nbsp;'.&discussion_link($ressymb,'<img border="0" src="/res/adm/pages/thumbsup.png" alt="'.&mt('Like').'" />','like',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Like this posting"));                                          $$discussionitems[$idx].='&nbsp;'.&discussion_link($symb,'<img border="0" src="/res/adm/pages/thumbsup.png" alt="'.&mt('Like').'" />','like',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Like this posting"));
                                     }                                      }
                                     if ($userunlikes{$idx}) {                                      if ($userunlikes{$idx}) {
                                         $$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsdown_gray.png" alt="'.&mt('You unlike this posting').'" />';                                          $$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsdown_gray.png" alt="'.&mt('You unlike this posting').'" />';
                                     } else {                                      } else {
                                         $$discussionitems[$idx].='&nbsp;'.&discussion_link($ressymb,'<img border="0" src="/res/adm/pages/thumbsdown.png" alt="'.&mt('Unlike').'" />','unlike',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Unlike this posting"));                                          $$discussionitems[$idx].='&nbsp;'.&discussion_link($symb,'<img border="0" src="/res/adm/pages/thumbsdown.png" alt="'.&mt('Unlike').'" />','unlike',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Unlike this posting"));
                                     }                                      }
                                 }                                  }
                             }                              }
Line 1587  sub build_posting_display { Line 1541  sub build_posting_display {
                                 $$discussionitems[$idx] .= '&nbsp;&nbsp;'.&mt('This post has been edited by the author.');                                  $$discussionitems[$idx] .= '&nbsp;&nbsp;'.&mt('This post has been edited by the author.');
                                 if ($seehidden) {                                  if ($seehidden) {
                                     $$discussionitems[$idx] .= '&nbsp;&nbsp;'.                                      $$discussionitems[$idx] .= '&nbsp;&nbsp;'.
                                          &discussion_link($ressymb,&mt('Display all versions'),'allversions',$idx,$$newpostsflag,$prevread,&group_args($group));                                           &discussion_link($symb,&mt('Display all versions'),'allversions',$idx,$$newpostsflag,$prevread,&group_args($group));
                                 }                                  }
                                 $$discussionitems[$idx].='<br/>'.&mt('Earlier version(s) were posted on: ');                                  $$discussionitems[$idx].='<br/>'.&mt('Earlier version(s) were posted on: ');
                                 if ($contrib{$idx.':history'} =~ m/:/) {                                  if ($contrib{$idx.':history'} =~ m/:/) {
Line 1819  sub mail_screen { Line 1773  sub mail_screen {
   
   my %lt = &Apache::lonlocal::texthash(    my %lt = &Apache::lonlocal::texthash(
             'myqu' => 'Question/comment/feedback:',              'myqu' => 'Question/comment/feedback:',
               'title' => 'Title',
             'reta' => 'Retained attachments',              'reta' => 'Retained attachments',
             'atta' => 'Attachment',              'atta' => 'Attachment',
            );             );
   if ($env{'form.editdisc'} || $env{'form.replydisc'}){    if($env{'form.editdisc'} || $env{'form.replydisc'}){
       $lt{'myqu'} = &mt('Post Discussion');      %lt = &Apache::lonlocal::texthash(
               'myqu' => 'Post Discussion',
       );
   }    }
   my $restitle = &get_resource_title($caller_symb,$feedurl);    my $restitle = &get_resource_title($caller_symb,$feedurl);
   my $quote='';    my $quote='';
Line 2098  END Line 2055  END
     } else {      } else {
         $r->print(<<END);          $r->print(<<END);
 <p>  <p>
 $lt{'atta'} $attachmaxtext: <input type="file" name="attachment" class="LC_flUpload" />  $lt{'atta'} $attachmaxtext: <input type="file" name="attachment" class="flUpload" />
 <input type="hidden" id="LC_free_space" value="131072" />  <input type="hidden" id="free_space" value="131072" />
 </p>  </p>
 END  END
     }      }
Line 2110  END Line 2067  END
         $r->print('<input type="hidden" name="ref" value="'.$env{'form.ref'}.'" />');          $r->print('<input type="hidden" name="ref" value="'.$env{'form.ref'}.'" />');
     }      }
     $r->print(<<END);      $r->print(<<END);
 <input type="hidden" name="sendit" value="1" />  <input type="hidden" name="sendit" value="1" /><br /><br />
 <input type="button" value="$send" onclick='gosubmit();' />  <input type="button" value="$send" onclick='gosubmit();' />
 </form>  </form>
 END  END
Line 2985  sub screen_header { Line 2942  sub screen_header {
       $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 '') && ($symb =~ m{^bulletin___\d+___adm/wrapper/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard$}) && (&check_group_priv($group,'pgd') eq 'ok')))) {              (($group ne '') && ($symb =~ m{^bulletin___\d+___adm/wrapper/adm/\Q$cdom\E/\Q$cnum\E/\d+/bulletinboard$}) && (&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>'; 
  $anoncontrib.              if (&Apache::lonnet::allowed('pac',$env{'request.course.id'}.
  ' <i>('.$namevis.')</i></label> '.                 ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
  '<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>';          $discussoptions .= '<br /><label><input type="radio" name="discuss" value="anon" /> '.
                      $anoncontrib.
                      ' <i>('.$namevis.')</i></label> '.
                      '<a href="/adm/preferences?action=changescreenname">'.&mt('Change Screenname').'</a>';
               }
             my $blockblog = &Apache::loncommon::blocking_status('blogs');              my $blockblog = &Apache::loncommon::blocking_status('blogs');
             if (!$blockblog) {              if (!$blockblog) {
                 $discussoptions.= &add_blog_checkbox($crstype);                  $discussoptions.= &add_blog_checkbox($crstype);
Line 3213  sub adddiscuss { Line 3174  sub adddiscuss {
     if (($symb) && ($email)) {      if (($symb) && ($email)) {
         my $now = time;          my $now = time;
         if ($env{'form.editdisc'}) {          if ($env{'form.editdisc'}) {
             $contrib{'ip'}=&Apache::lonnet::get_requestor_ip();              $contrib{'ip'}=$ENV{'REMOTE_ADDR'};
             $contrib{'host'}=$Apache::lonnet::perlvar{'lonHostID'};              $contrib{'host'}=$Apache::lonnet::perlvar{'lonHostID'};
             $contrib{'timestamp'} = $now;              $contrib{'timestamp'} = $now;
             $contrib{'history'} = '';              $contrib{'history'} = '';
Line 3547  sub modify_attachments { Line 3508  sub modify_attachments {
    document.modattachments.action = document.modattachments.origpage.value;     document.modattachments.action = document.modattachments.origpage.value;
    document.modattachments.submit();     document.modattachments.submit();
  }   }
 </script>  </script> 
 <script type="text/javascript" src="/res/adm/includes/file_upload.js"></script>  <script type="text/javascript" src="/res/adm/includes/file_upload.js"></script>
 END  END
   
Line 3590  END Line 3551  END
     $r->print('<b>'.$subject.'</b>');      $r->print('<b>'.$subject.'</b>');
     $r->print(&Apache::lonhtmlcommon::row_closure());      $r->print(&Apache::lonhtmlcommon::row_closure());
     $r->print(&Apache::lonhtmlcommon::row_title($lt{'adda'}));      $r->print(&Apache::lonhtmlcommon::row_title($lt{'adda'}));
     $r->print('<input type="file" name="addnewattach" class="LC_flUpload" />'      $r->print('<input type="file" name="addnewattach" class="flUpload" />'
         .'<input type="hidden" id="LC_free_space" value="131072" />'          .'<input type="hidden" id="free_space" value="131072" />'
         .'<input type="button" name="upload" value="Upload" '          .'<input type="button" name="upload" value="Upload" '
         .'onclick="this.form.submit()" />  '.$attachmaxtext);          .'onclick="this.form.submit()" />  '.$attachmaxtext);
     if(($idx)||(ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)){      if(($idx)||(ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)){
Line 4583  ENDREDIR Line 4544  ENDREDIR
   ($env{'request.course.id'} && ($feedurl!~m:^/adm:))    ($env{'request.course.id'} && ($feedurl!~m:^/adm:))
   ||    ||
   ($env{'request.course.id'} && ($symb=~/^bulletin\_\_\_/))    ($env{'request.course.id'} && ($symb=~/^bulletin\_\_\_/))
           ||  
           (($env{'request.course.id'}) && ($feedurl =~ /ext\.tool$/))  
   ) {    ) {
   &Apache::loncommon::content_type($r,'text/html');    &Apache::loncommon::content_type($r,'text/html');
   $r->send_http_header;    $r->send_http_header;
Line 4686  ENDREDIR Line 4645  ENDREDIR
      && $env{'form.discuss'} !~ /^(?:author|question|course|policy)/)       && $env{'form.discuss'} !~ /^(?:author|question|course|policy)/)
    || $env{'form.anondiscuss'} ne '') {     || $env{'form.anondiscuss'} ne '') {
   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;
             if (&Apache::lonnet::allowed('pac',$env{'request.course.id'}.
                ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
         $anonmode=($env{'form.discuss'} eq 'anon' || $env{'form.anondiscuss'} );
             }
   $typestyle.=&adddiscuss($symb,$message,$anonmode,$attachmenturl,    $typestyle.=&adddiscuss($symb,$message,$anonmode,$attachmenturl,
   $subject,$group);    $subject,$group);
   $numpost++;    $numpost++;

Removed from v.1.370.2.5.2.1  
changed lines
  Added in v.1.372


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