Diff for /loncom/interface/lonmsg.pm between versions 1.87 and 1.88

version 1.87, 2004/03/01 01:19:51 version 1.88, 2004/03/01 02:21:57
Line 949  sub facetoface { Line 949  sub facetoface {
     unless (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {      unless (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
  return;   return;
     }      }
       &Apache::lonhtmlcommon::add_breadcrumb
    ({href=>'/adm/dropadd?recordftf=query',
     text=>"User Notes, Face-to-Face, Critical Messages",
    faq=>12,bug=>'Communication Tools'});
       &header($r);
 # from query string  # from query string
   
     if ($ENV{'form.recname'}) { $ENV{'form.recuname'}=$ENV{'form.recname'}; }      if ($ENV{'form.recname'}) { $ENV{'form.recuname'}=$ENV{'form.recname'}; }
     if ($ENV{'form.recdom'}) { $ENV{'form.recdomain'}=$ENV{'form.recdom'}; }      if ($ENV{'form.recdom'}) { $ENV{'form.recdomain'}=$ENV{'form.recdom'}; }
   
Line 960  sub facetoface { Line 966  sub facetoface {
     my $domform = &Apache::loncommon::select_dom_form($defdom,'recdomain');      my $domform = &Apache::loncommon::select_dom_form($defdom,'recdomain');
     my $stdbrws = &Apache::loncommon::selectstudent_link      my $stdbrws = &Apache::loncommon::selectstudent_link
  ('stdselect','recuname','recdomain');   ('stdselect','recuname','recdomain');
       my %lt=&Apache::lonlocal::texthash('user' => 'Username',
          'dom' => 'Domain',
          'head' => 'User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course',
          'subm' => 'Retrieve discussion and message records',
          'newr' => 'New Record (record is visible to course faculty and staff)',
          'post' => 'Post this Record');
     $r->print(<<"ENDTREC");      $r->print(<<"ENDTREC");
 <h3>User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course</h3>  <h3>$lt{'head'}</h3>
 <form method="post" action="/adm/email" name="stdselect">  <form method="post" action="/adm/email" name="stdselect">
 <input type="hidden" name="recordftf" value="retrieve" />  <input type="hidden" name="recordftf" value="retrieve" />
 <table>  <table>
 <tr><td>Username:</td><td><input type=text size=12 name=recuname value="$ENV{'form.recuname'}"></td>  <tr><td>$lt{'user'}:</td><td><input type="text" size="12" name="recuname" value="$ENV{'form.recuname'}" /></td>
 <td rowspan="2">  <td rowspan="2">
 $stdbrws  $stdbrws
 <input type="submit" value="Retrieve discussion and message records"></td>  <input type="submit" value="$lt{'subm'}" /></td>
 </tr>  </tr>
 <tr><td>Domain:</td>  <tr><td>$lt{'dom'}:</td>
 <td>$domform</td></tr>  <td>$domform</td></tr>
 </table>  </table>
 </form>  </form>
Line 982  ENDTREC Line 994  ENDTREC
            &user_normal_msg_raw(             &user_normal_msg_raw(
             $ENV{'course.'.$ENV{'request.course.id'}.'.num'},              $ENV{'course.'.$ENV{'request.course.id'}.'.num'},
             $ENV{'course.'.$ENV{'request.course.id'}.'.domain'},              $ENV{'course.'.$ENV{'request.course.id'}.'.domain'},
             'Record ['.$ENV{'form.recuname'}.':'.$ENV{'form.recdomain'}.']',              &mt('Record').
        ' ['.$ENV{'form.recuname'}.':'.$ENV{'form.recdomain'}.']',
     $ENV{'form.newrecord'});      $ENV{'form.newrecord'});
         }          }
         $r->print('<h3>'.&Apache::loncommon::plainname($ENV{'form.recuname'},          $r->print('<h3>'.&Apache::loncommon::plainname($ENV{'form.recuname'},
Line 994  ENDTREC Line 1007  ENDTREC
 <input name="recuname" value="$ENV{'form.recuname'}" type="hidden" />  <input name="recuname" value="$ENV{'form.recuname'}" type="hidden" />
 ENDRHEAD  ENDRHEAD
         $r->print(<<ENDBFORM);          $r->print(<<ENDBFORM);
 <hr />New Record (record is visible to course faculty and staff)<br />  <hr />$lt{'newr'}<br />
 <textarea name="newrecord" cols="80" rows="10" wrap="hard"></textarea>  <textarea name="newrecord" cols="80" rows="10" wrap="hard"></textarea>
 <br />  <br />
 <input type="hidden" name="recordftf" value="post" />  <input type="hidden" name="recordftf" value="post" />
 <input type="submit" value="Post this record" />  <input type="submit" value="$lt{'post'}" />
 </form>  </form>
 ENDBFORM  ENDBFORM
     }      }
 }  }
   
   # ================================================================== The Header
   
   sub header {
       my ($r,$baseurl)=@_;
       $r->print('<html><head><title>Communication and Messages</title>');
       if ($baseurl) {
    $r->print("<base href=\"http://$ENV{'SERVER_NAME'}/$baseurl\" />");
       }
       $r->print(&Apache::loncommon::studentbrowser_javascript().'</head>'.
         &Apache::loncommon::bodytag('Communication and Messages'));
           $r->print(&Apache::lonhtmlcommon::breadcrumbs
                     (undef,'Communication and Messages'));
   
   }
   
 # ===================================================================== Handler  # ===================================================================== Handler
   
 sub handler {  sub handler {
Line 1024  sub handler { Line 1052  sub handler {
     $sqs='&sortedby='.$ENV{'form.sortedby'};      $sqs='&sortedby='.$ENV{'form.sortedby'};
 # ------------------------------------------------------ They checked for email  # ------------------------------------------------------ They checked for email
     &Apache::lonnet::put('email_status',{'recnewemail'=>0});      &Apache::lonnet::put('email_status',{'recnewemail'=>0});
   
   # ----------------------------------------------------------------- Breadcrumbs
   
       &Apache::lonhtmlcommon::clear_breadcrumbs();
       &Apache::lonhtmlcommon::add_breadcrumb
           ({href=>"/adm/communicate",
             text=>"Communication/Messages",
             faq=>12,bug=>'Communication Tools',});
   
 # --------------------------------------------------------------- Render Output  # --------------------------------------------------------------- Render Output
     if (!$ENV{'form.display'}) {  
  $r->print('<html><head><title>EMail and Messaging</title>'.  
   &Apache::loncommon::studentbrowser_javascript().'</head>'.  
   &Apache::loncommon::bodytag('EMail and Messages').  
   &Apache::loncommon::help_open_faq(12).  
   &Apache::loncommon::help_open_bug('Communication Tools'));  
     }  
     if ($ENV{'form.display'}) {      if ($ENV{'form.display'}) {
  my $msgid=$ENV{'form.display'};   my $msgid=$ENV{'form.display'};
  &statuschange($msgid,'read');   &statuschange($msgid,'read');
Line 1052  sub handler { Line 1083  sub handler {
  my $number_of_messages = scalar(@messages); #subtract 1 for last index   my $number_of_messages = scalar(@messages); #subtract 1 for last index
 # start output  # start output
  $r->print('<html><head><title>EMail and Messaging</title>');   $r->print('<html><head><title>EMail and Messaging</title>');
  if (defined($content{'baseurl'})) {  
     $r->print("<base href=\"http://$ENV{'SERVER_NAME'}/$content{'baseurl'}\" />");  
  }  
  $r->print(&Apache::loncommon::studentbrowser_javascript().   $r->print(&Apache::loncommon::studentbrowser_javascript().
   '</head>'.    '</head>'.
   &Apache::loncommon::bodytag('EMail and Messages').    &Apache::loncommon::bodytag('EMail and Messages').

Removed from v.1.87  
changed lines
  Added in v.1.88


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