Diff for /loncom/interface/lonfeedback.pm between versions 1.42 and 1.43

version 1.42, 2003/03/29 22:50:22 version 1.43, 2003/03/30 21:58:17
Line 105  sub mail_screen { Line 105  sub mail_screen {
 </head>  </head>
 $bodytag  $bodytag
 <h2><tt>$feedurl</tt></h2>  <h2><tt>$feedurl</tt></h2>
 <form action="/adm/feedback" method=post name=mailform>  <form action="/adm/feedback" method="post" name="mailform"
   enctype="multipart/form-data">
 <input type=hidden name=postdata value="$feedurl">  <input type=hidden name=postdata value="$feedurl">
 Please check at least one of the following feedback types:  Please check at least one of the following feedback types:
 $options<hr>  $options<hr>
Line 339  sub feedback_available { Line 340  sub feedback_available {
 }  }
   
 sub send_msg {  sub send_msg {
   my ($feedurl,$email,$citations,%to)=@_;    my ($feedurl,$email,$citations,$attachmenturl,%to)=@_;
   my $status='';    my $status='';
   my $sendsomething=0;    my $sendsomething=0;
   foreach (keys %to) {    foreach (keys %to) {
     if ($_) {      if ($_) {
       my $declutter=&Apache::lonnet::declutter($feedurl);        my $declutter=&Apache::lonnet::declutter($feedurl);
       unless (&Apache::lonmsg::user_normal_msg(split(/\:/,$_),        unless (&Apache::lonmsg::user_normal_msg(split(/\:/,$_),
                'Feedback ['.$declutter.']',$email,$citations,$feedurl)=~/ok/) {                 'Feedback ['.$declutter.']',$email,$citations,$feedurl,
                   $attachmenturl)=~/ok/) {
  $status.='<br>Error sending message to '.$_.'<br>';   $status.='<br>Error sending message to '.$_.'<br>';
       } else {        } else {
  $sendsomething++;   $sendsomething++;
Line 382  sub adddiscuss { Line 384  sub adddiscuss {
                    $ENV{'environment.middlename'}.' '.                     $ENV{'environment.middlename'}.' '.
                                    $ENV{'environment.lastname'}.' '.                                     $ENV{'environment.lastname'}.' '.
                                    $ENV{'enrironment.generation'},                                     $ENV{'enrironment.generation'},
                  'attachment'   => $attachmenturl);                   'attachmenturl'=> $attachmenturl);
     if ($anon) {      if ($anon) {
  $contrib{'anonymous'}='true';   $contrib{'anonymous'}='true';
     }      }
Line 565  sub handler { Line 567  sub handler {
       my $attachmenturl='';        my $attachmenturl='';
       if ($ENV{'form.attachment.filename'}) {        if ($ENV{'form.attachment.filename'}) {
   unless (length($ENV{'form.attachment'})>131072) {    unless (length($ENV{'form.attachment'})>131072) {
       $attachmenturl=&Apache::lonnet::userfileupload('attachment',1);        $attachmenturl=&Apache::lonnet::userfileupload('attachment');
   }    }
       }        }
 # Filter HTML out of message (could be nasty)  # Filter HTML out of message (could be nasty)
Line 579  sub handler { Line 581  sub handler {
       my ($typestyle,%to) = &decide_receiver($feedurl);        my ($typestyle,%to) = &decide_receiver($feedurl);
   
 # Actually send mail  # Actually send mail
       my ($status,$numsent)=&send_msg($feedurl,$email,$citations,%to);        my ($status,$numsent)=&send_msg($feedurl,$email,$citations,
             $attachmenturl,%to);
   
 # Discussion? Store that.  # Discussion? Store that.
   

Removed from v.1.42  
changed lines
  Added in v.1.43


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