Diff for /loncom/interface/lonsupportreq.pm between versions 1.104 and 1.106

version 1.104, 2022/01/18 21:41:31 version 1.106, 2024/07/15 17:12:40
Line 466  ENDJS Line 466  ENDJS
             my $numtitles = @codetitles;              my $numtitles = @codetitles;
             if ($numtitles == 0) {              if ($numtitles == 0) {
                 $output .= $html_lt{'enin'}.':                   $output .= $html_lt{'enin'}.': 
                   <input type="text" name="coursecode" size="15" value="" />'."\n";                    <input type="text" name="coursecode" size="15" value="'.&HTML::Entities::encode($ccode,'\'"&<>').'" />'."\n";
             } else {              } else {
                 my @standardnames = &Apache::loncommon::get_standard_codeitems();                  my @standardnames = &Apache::loncommon::get_standard_codeitems();
                 my $lasttitle = $numtitles;                  my $lasttitle = $numtitles;
Line 762  sub print_request_receipt { Line 762  sub print_request_receipt {
                  secn        => 'Section',                   secn        => 'Section',
                  warn        => 'Warning: Problem with support e-mail address',                   warn        => 'Warning: Problem with support e-mail address',
                  your        => 'Your support request contained the following information',                   your        => 'Your support request contained the following information',
                    belo        => 'Below is your support request which could not be sent',
                    ifyk        => 'If you know an IT support address for your institution, you could copy this information and send it to that email address.',
                  sect        => 'section',                   sect        => 'section',
                  info        => 'Information supplied',                   info        => 'Information supplied',
                  adin        => 'Additional information recorded',                   adin        => 'Additional information recorded',
Line 990  END Line 992  END
   
     my $message;      my $message;
     if (!$bad_email) {      if (!$bad_email) {
         $message = &Apache::lonhtmlcommon::confirm_success(          $message = &mt('A support request has been sent to [_1]','<tt>'.$to.'</tt>');
             &mt('A support request has been sent to [_1]','<tt>'.$to.'</tt>'));  
     } else {      } else {
         $message = &Apache::lonhtmlcommon::confirm_success(          $message = $lt{'warn'}.'<br />';
             $lt{'warn'}.'<br />'          if ($to eq '') {
            .&mt('As the e-mail address provided for this LON-CAPA server ([_1]) does not appear to be a valid e-mail address, your support request has [_2]not[_3] been sent to the LON-CAPA support staff or administrator at your institution.','<tt>'.$to.'</tt>','<b>','</b>')              $message .= &mt('For this LON-CAPA server no e-mail address has been configured to receive support requests, so your support request has [_1]not[_2] been sent to the LON-CAPA support staff or administrator at your institution.','<b>','</b>');
            .' '.&mt('Instead a copy has been sent to the LON-CAPA support team at Michigan State University.'),1);           } else {
         $to = 'helpdesk@lon-capa.org';              $message .= &mt('As the e-mail address provided for this LON-CAPA server ([_1]) does not appear to be a valid e-mail address, your support request has [_2]not[_3] been sent to the LON-CAPA support staff or administrator at your institution.','<tt>'.$to.'</tt>','<b>','</b>');
           }
     }      }
     $r->print(&Apache::loncommon::confirmwrapper($message));      $r->print(&Apache::loncommon::confirmwrapper(&Apache::lonhtmlcommon::confirm_success($message,$bad_email)));
   
     if ($reqemail ne '') {      if ($reqemail ne '') {
         $from = $reqemail;          $from = $reqemail;
Line 1126  END Line 1128  END
         }          }
     }      }
   
     # Compose and send a MIME email      if ($bad_email) {
     &Apache::loncommon::mime_email($from,'',$to,$subject,$supportmsg,$cc_string,          $r->print('<b>'.$lt{'belo'}.'</b><br />'.
                                    $bcc,$attachmentpath,$fname,$attachment_text);                    $lt{'ifyk'}.'<br /><br />'."\n");
       } else {
           # Compose and send a MIME email
           &Apache::loncommon::mime_email($from,'',$to,$subject,$supportmsg,$cc_string,
                                          $bcc,$attachmentpath,$fname,$attachment_text);
           $r->print('<b>'.$lt{'your'}.'</b>:<br /><br />'."\n");
       }
     if ($attachmentpath =~ m|$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+|) {      if ($attachmentpath =~ m|$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+|) {
         unlink($attachmentpath);          unlink($attachmentpath);
     }      }
     $r->print('<b>'.$lt{'your'}.'</b>:<br /><br />'."\n");  
     $r->print('<div style="width:620px;">'.      $r->print('<div style="width:620px;">'.
               &Apache::lonhtmlcommon::start_pick_box().                &Apache::lonhtmlcommon::start_pick_box().
               &Apache::lonhtmlcommon::row_title($lt{'info'},undef,'LC_oddrow_value')."\n".$displaymsg."\n".                &Apache::lonhtmlcommon::row_title($lt{'info'},undef,'LC_oddrow_value')."\n".$displaymsg."\n".

Removed from v.1.104  
changed lines
  Added in v.1.106


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