Annotation of loncom/interface/loncommunicate.pm, revision 1.24
1.1 www 1: # The LearningOnline Network
2: # Communicate
3: #
1.24 ! www 4: # $Id: loncommunicate.pm,v 1.23 2004/09/10 06:38:24 www Exp $
1.7 albertel 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: #
1.20 www 28: ###
29:
1.1 www 30: package Apache::loncommunicate;
31:
32: use strict;
33: use Apache::Constants qw(:common);
1.2 www 34: use Apache::lonmsg();
1.11 www 35: use Apache::loncommon;
1.16 www 36: use Apache::lonlocal;
1.1 www 37:
1.21 www 38: sub menu {
39: my $r=shift;
40: my %lt=&Apache::lonlocal::texthash(
1.23 www 41: 'mnf' => 'Make New Folder',
1.16 www 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',
1.24 ! www 48:
1.22 raeburn 49: 'cbs' => 'Configure blocking of student communication during exams'
50:
1.16 www 51: );
1.18 www 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: }
1.23 www 57: my $folderlist=&Apache::lonmsg::folderlist();
1.20 www 58: # ------------------------------------------------------------------------ Menu
1.9 matthew 59: $r->print(<<END);
1.23 www 60: $folderlist
61: <form method="post" action="/adm/email">
62: <input type="submit" value="$lt{'mnf'}" />
63: <input type="text" size="15" name="newfolder" value="" />
64: </form>
1.9 matthew 65: <table cellspacing="10" cellpadding="2">
66: <tr><td bgcolor="#FFFFAA">
1.16 www 67: <b><a href="/adm/email?compose=individual">$lt{'smu'}</a></b>
1.9 matthew 68: </td></tr>
69: END
1.4 www 70: if (($ENV{'request.course.id'}) &&
71: (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) {
1.9 matthew 72: $r->print(<<END);
73: <tr><td bgcolor="#FFFFAA">
1.18 www 74: <b><a href="/adm/email?compose=group">$lt{'bmc'}</a></b>$help{'Course_Broadcast_Message'}
1.9 matthew 75: </td></tr>
76: <tr><td bgcolor="#FFFFAA">
1.16 www 77: <b><a href="/adm/email?compose=upload">$lt{'dmu'}</a></b>
1.9 matthew 78: </td></tr>
1.13 www 79: <tr><td bgcolor="#FFFFAA">
1.18 www 80: <b><a href="/adm/email?recordftf=query">$lt{'unr'}</a></b>$help{'Course_Face_To_Face_Records,Course_Critical_Message'}
1.13 www 81: </td></tr>
1.22 raeburn 82: <tr><td bgcolor="#FFFFAA">
83: <b><a href="/adm/email?block=display">$lt{'cbs'}</a>
84: </td></tr>
1.9 matthew 85: END
1.4 www 86: }
1.9 matthew 87: $r->print('</table>');
1.21 www 88: }
89:
90: sub handler {
91: my $r = shift;
92: &Apache::loncommon::content_type($r,'text/html');
93: $r->send_http_header;
94: return OK if $r->header_only;
95: #
96: # Start document
97: #
98: $r->print(<<END);
99: <html>
100: <head>
101: <title>The LearningOnline Network with CAPA</title>
102: </head>
103: END
104:
105: # ----------------------------------------------------------------- Breadcrumbs
106: &Apache::lonhtmlcommon::clear_breadcrumbs();
107: &Apache::lonhtmlcommon::add_breadcrumb
108: ({href=>"/adm/communicate",
109: text=>"Communication/Messages",
110: faq=>12,bug=>'Communication Tools',});
111:
112: # ---------------------------------------------------------------------- Header
113: &Apache::lonmsg::header($r);
114: &menu($r);
1.24 ! www 115: &Apache::lonmsg::disnew($r);
1.1 www 116: return OK;
1.2 www 117: }
1.1 www 118:
119: 1;
120: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>