File:  [LON-CAPA] / loncom / interface / loncommunicate.pm
Revision 1.27: download - view: text, annotated - select for diffs
Thu Feb 17 08:29:42 2005 UTC (19 years, 3 months ago) by albertel
Branches: MAIN
CVS tags: HEAD
- <html> -> &Apache::lonxml::xmlbegin, thus valid doctypes are now getting output, Yeah! StandardsCmpliance

- backing out the encoding changes for now

- some xhtml cleanups
- one icon -> lonhttpd

    1: # The LearningOnline Network
    2: # Communicate
    3: #
    4: # $Id: loncommunicate.pm,v 1.27 2005/02/17 08:29:42 albertel Exp $
    5: #
    6: # Copyright Michigan State University Board of Trustees
    7: #
    8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    9: #
   10: # LON-CAPA is free software; you can redistribute it and/or modify
   11: # it under the terms of the GNU General Public License as published by
   12: # the Free Software Foundation; either version 2 of the License, or
   13: # (at your option) any later version.
   14: #
   15: # LON-CAPA is distributed in the hope that it will be useful,
   16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18: # GNU General Public License for more details.
   19: #
   20: # You should have received a copy of the GNU General Public License
   21: # along with LON-CAPA; if not, write to the Free Software
   22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23: #
   24: # /home/httpd/html/adm/gpl.txt
   25: #
   26: # http://www.lon-capa.org/
   27: #
   28: ###
   29: 
   30: package Apache::loncommunicate;
   31: 
   32: use strict;
   33: use Apache::Constants qw(:common);
   34: use Apache::lonmsg();
   35: use Apache::loncommon;
   36: use Apache::lonlocal;
   37: 
   38: sub menu {
   39:     my $r=shift;
   40:     my %lt=&Apache::lonlocal::texthash(
   41: 'mnf' => 'Make New Folder',
   42: 'vcm' => 'View Critical Messages',
   43: 'smu' => 'Send Message to User(s)',
   44: 'bmc' => 'Broadcast Message to Course',
   45: 'dmu' => 'Distribute Messages from Uploaded File to Course',
   46: 'unr' => 
   47:      'User Notes, Records of Face-to-Face Discussions, and Critical Messages',
   48: 
   49: 'cbs' => 'Configure blocking of student communication during exams' 
   50: 
   51: );
   52:     my %help=();
   53:     foreach ('Course_Face_To_Face_Records,Course_Critical_Message',
   54: 	     'Course_Broadcast_Message') {
   55: 	$help{$_}=&Apache::loncommon::help_open_topic($_);
   56:     }
   57: # ------------------------------------------------------------------------ Menu
   58:    $r->print(<<END);
   59: <table cellspacing="10" cellpadding="2">
   60: <tr><td bgcolor="#FFFFAA"><form method="post" action="/adm/email">
   61: <input type="submit" value="$lt{'mnf'}" />
   62: <input type="text" size="15" name="newfolder" value="" />
   63: </form></td>
   64: <td bgcolor="#FFFFAA">
   65:   <b><a href="/adm/email?compose=individual">$lt{'smu'}</a></b>
   66: </td></tr>
   67: END
   68:     if (($ENV{'request.course.id'}) && 
   69:         (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) {
   70:         $r->print(<<END);
   71: <tr><td bgcolor="#FFFFAA">
   72:     <b><a href="/adm/email?compose=group">$lt{'bmc'}</a></b>$help{'Course_Broadcast_Message'}
   73: </td>
   74: <td bgcolor="#FFFFAA">
   75:   <b><a href="/adm/email?compose=upload">$lt{'dmu'}</a></b>
   76: </td></tr>
   77: <tr><td bgcolor="#FFFFAA">
   78: <b><a href="/adm/email?recordftf=query">$lt{'unr'}</a></b>$help{'Course_Face_To_Face_Records,Course_Critical_Message'}
   79: </td>
   80: <td bgcolor="#FFFFAA">
   81:   <b><a href="/adm/email?block=display">$lt{'cbs'}</a>
   82: </td></tr>
   83: END
   84:     }
   85:     $r->print('</table>');
   86: }
   87: 
   88: sub handler {
   89:     my $r = shift;
   90:     &Apache::loncommon::content_type($r,'text/html');
   91:     $r->send_http_header;
   92:     return OK if $r->header_only;
   93: #
   94: # Start document
   95: #
   96:     my $html=&Apache::lonxml::xmlbegin();
   97:     $r->print(<<END);
   98: $html
   99: <head>
  100: <title>The LearningOnline Network with CAPA</title>
  101: </head>
  102: END
  103: 
  104: # ----------------------------------------------------------------- Breadcrumbs
  105:     &Apache::lonhtmlcommon::clear_breadcrumbs();
  106:     &Apache::lonhtmlcommon::add_breadcrumb
  107:         ({href=>"/adm/communicate",
  108:           text=>"Communication/Messages",
  109:           faq=>12,bug=>'Communication Tools',});
  110: 
  111: # ---------------------------------------------------------------------- Header
  112:     &Apache::lonmsg::header($r);
  113:     &menu($r);
  114:     &Apache::lonmsg::disall($r,'new');
  115:     return OK;
  116: }
  117: 
  118: 1;
  119: __END__

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