Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.32 and 1.36

version 1.32, 2006/06/22 14:53:15 version 1.36, 2006/06/30 02:05:22
Line 883  ENDUPLOAD Line 883  ENDUPLOAD
        my $studentsel = &discourse();         my $studentsel = &discourse();
        $r->print($studentsel);         $r->print($studentsel);
     }      }
       if ($env{'form.displayedcrit'}) {
    $r->print('<input type="hidden" name="displayedcrit" value="true" />');
       }
     $r->print('</form>'.      $r->print('</form>'.
       &Apache::lonfeedback::generate_preview_button('compemail','message').        &Apache::lonfeedback::generate_preview_button('compemail','message').
       &Apache::lonhtmlcommon::htmlareaselectactive('message'));        &Apache::lonhtmlcommon::htmlareaselectactive('message'));
Line 976  $content{'sendername'}.':'. Line 979  $content{'sendername'}.':'.
      }       }
     # Check to see if there were any messages.      # Check to see if there were any messages.
     if ($result eq '') {      if ($result eq '') {
         my $lctype = 'course';          my $lctype = lc(&Apache::loncommon::course_type());
         if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {  
             $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});  
         }  
  if ($target ne 'tex') {    if ($target ne 'tex') { 
     $r->print("<p><b>".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."</b></p>");      $r->print("<p><b>".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."</b></p>");
  } else {   } else {
Line 1012  sub facetoface { Line 1012  sub facetoface {
  $r->print('Not allowed');   $r->print('Not allowed');
  return;   return;
     }      }
     my $crstype = 'Course';      my $crstype = &Apache::loncommon::course_type();
     my $leaders = 'faculty and staff';      my $leaders = ($crstype eq 'Group') ? 'coordinators and leaders'
     if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {                                          : 'faculty and staff';
         $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};  
         $leaders = 'coordinators and leaders';  
     }  
     &printheader($r,      &printheader($r,
  '/adm/email?recordftf=query',   '/adm/email?recordftf=query',
  "User Notes, Face-to-Face, Critical Messages, Broadcast Messages");   "User Notes, Face-to-Face, Critical Messages, Broadcast Messages");
Line 1092  sub examblock { Line 1089  sub examblock {
  $r->print('Not allowed');   $r->print('Not allowed');
  return;   return;
     }      }
     my $usertype = 'students';      my $usertype = (&Apache::loncommon::course_type() eq 'Group') ? 'members'
     if ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Group') {                                                            : 'students';
         $usertype = 'members';  
     }  
     my %lt=&Apache::lonlocal::texthash(      my %lt=&Apache::lonlocal::texthash(
             'comb' => 'Communication Blocking',              'comb' => 'Communication Blocking',
             'cbds' => 'Communication blocking during scheduled exams',              'cbds' => 'Communication blocking during scheduled exams',
Line 1431  sub displaymessage { Line 1426  sub displaymessage {
     my $startblock = 0;      my $startblock = 0;
     my $endblock = 0;      my $endblock = 0;
     my $numblocked = 0;      my $numblocked = 0;
     my $crstype = 'Course';      my $crstype = &Apache::loncommon::course_type();
     if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) {  
         $crstype = $env{'course.'.$env{'request.course.id'}.'.type'};  
     }  
   
 # info to generate "next" and "previous" buttons and check if message is blocked  # info to generate "next" and "previous" buttons and check if message is blocked
     &blockcheck(\%setters,\$startblock,\$endblock);      &blockcheck(\%setters,\$startblock,\$endblock);
Line 1652  sub sendoffmail { Line 1644  sub sendoffmail {
     &statuschange($msgid,'replied',$folder);      &statuschange($msgid,'replied',$folder);
  }   }
   
  my $to = $env{'form.selectedusers.forminput'};   my @to =
       &Apache::loncommon::get_env_multiple('form.selectedusers.forminput');
  my $mode = $env{'form.sendmode'};   my $mode = $env{'form.sendmode'};
   
  my %toaddr;   my %toaddr;
  if ($to) {   if (@to) {
     foreach my $dest (@$to) {      foreach my $dest (@to) {
  my ($user,$domain) = split(/:/, $dest);   my ($user,$domain) = split(/:/, $dest);
  if (($user ne '') && ($domain ne '')) {   if (($user ne '') && ($domain ne '')) {
     my $address = $user.":".$domain; # How the code below expects it.      my $address = $user.":".$domain; # How the code below expects it.
Line 1906  sub handler { Line 1899  sub handler {
  &compout($r,'',$env{'form.replyto'},undef,undef,$folder,$dismode);   &compout($r,'',$env{'form.replyto'},undef,undef,$folder,$dismode);
     } elsif ($env{'form.confirm'}) {      } elsif ($env{'form.confirm'}) {
  &printheader($r,'','Confirmed Receipt');   &printheader($r,'','Confirmed Receipt');
    my $replying = 0;
  foreach (keys %env) {   foreach (keys %env) {
     if ($_=~/^form\.rec\_(.*)$/) {      if ($_=~/^form\.rec\_(.*)$/) {
  $r->print('<b>'.&mt('Confirming Receipt').':</b> '.   $r->print('<b>'.&mt('Confirming Receipt').':</b> '.
Line 1916  sub handler { Line 1910  sub handler {
  $r->print('<b>'.&mt('Confirming Receipt').':</b> '.   $r->print('<b>'.&mt('Confirming Receipt').':</b> '.
   &Apache::lonmsg::user_crit_received($msgid).'<br>');    &Apache::lonmsg::user_crit_received($msgid).'<br>');
  &compout($r,'','','',$msgid);   &compout($r,'','','',$msgid);
    $replying = 1;
     }      }
  }   }
  &discrit($r);   if (!$replying) {
       &discrit($r);
    }
     } elsif ($env{'form.critical'}) {      } elsif ($env{'form.critical'}) {
  &printheader($r,'','Displaying Critical Messages');   &printheader($r,'','Displaying Critical Messages');
  &discrit($r);   &discrit($r);
Line 2012  sub handler { Line 2009  sub handler {
       $env{'form.subject'},        $env{'form.subject'},
       $env{'form.message'},'/adm/communicate','public');        $env{'form.message'},'/adm/communicate','public');
  }   }
  &disall($r,($folder?$folder:$dismode));   if (!$env{'form.displayedcrit'}) {
       &disall($r,($folder?$folder:$dismode));
    }
     } elsif ($env{'form.newfolder'}) {      } elsif ($env{'form.newfolder'}) {
  &printheader($r,'','New Folder');   &printheader($r,'','New Folder');
  &makefolder($env{'form.newfolder'});   &makefolder($env{'form.newfolder'});

Removed from v.1.32  
changed lines
  Added in v.1.36


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