Diff for /loncom/interface/lonmsg.pm between versions 1.96 and 1.100

version 1.96, 2004/03/31 05:24:00 version 1.100, 2004/05/10 22:39:51
Line 172  sub unpackagemsg { Line 172  sub unpackagemsg {
        }         }
     }      }
     if ($content{'attachmenturl'}) {      if ($content{'attachmenturl'}) {
        my ($fname,$ft)=($content{'attachmenturl'}=~/\/(\w+)\.(\w+)$/);         my ($fname)=($content{'attachmenturl'}=~m|/([^/]+)$|);
        if ($notoken) {         if ($notoken) {
    $content{'message'}.='<p>'.&mt('Attachment').': <tt>'.$fname.'.'.$ft.'</tt>';     $content{'message'}.='<p>'.&mt('Attachment').': <tt>'.$fname.'</tt>';
        } else {         } else {
    $content{'message'}.='<p>'.&mt('Attachment').': <a href="'.     &Apache::lonnet::allowuploaded('/adm/msg',
        &Apache::lonnet::tokenwrapper($content{'attachmenturl'}).    $content{'attachmenturl'});
        '"><tt>'.$fname.'.'.$ft.'</tt></a>';     $content{'message'}.='<p>'.&mt('Attachment').
          ': <a href="'.$content{'attachmenturl'}.'"><tt>'.
          $fname.'</tt></a>';
        }         }
     }      }
     return %content;      return %content;
Line 205  sub sendemail { Line 207  sub sendemail {
     my $msg = new Mail::Send;      my $msg = new Mail::Send;
     $msg->to($to);      $msg->to($to);
     $msg->subject('[LON-CAPA] '.$subject);      $msg->subject('[LON-CAPA] '.$subject);
     if (my $fh = $msg->open('smtp',Server => 'localhost')) {      if (my $fh = $msg->open()) {
  print $fh $body;   print $fh $body;
  $fh->close;   $fh->close;
     }      }
Line 911  ENDUPLOAD Line 913  ENDUPLOAD
   
 sub disfacetoface {  sub disfacetoface {
     my ($r,$user,$domain)=@_;      my ($r,$user,$domain)=@_;
       my $target=$ENV{'form.grade_target'};
     unless ($ENV{'request.course.id'}) { return; }      unless ($ENV{'request.course.id'}) { return; }
     unless (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {      unless (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
  return;   return;
Line 944  $content{'sendername'}.'@'. Line 947  $content{'sendername'}.'@'.
      }       }
     # Check to see if there were any messages.      # Check to see if there were any messages.
     if ($result eq '') {      if ($result eq '') {
         $r->print("<p><b>".&mt("No notes, face-to-face discussion records, or critical messages in this course.")."</b></p>");   if ($target ne 'tex') { 
       $r->print("<p><b>".&mt("No notes, face-to-face discussion records, or critical messages in this course.")."</b></p>");
    } else {
       $r->print('\textbf{'.&mt("No notes, face-to-face discussion records, or critical messages in this course.").'}\\\\');
    }
     } else {      } else {
        $r->print($result);         $r->print($result);
     }      }

Removed from v.1.96  
changed lines
  Added in v.1.100


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