File:
[LON-CAPA] /
loncom /
interface /
loncommunicate.pm
Revision
1.29:
download - view:
text,
annotated -
select for diffs
Fri May 20 17:00:40 2005 UTC (19 years, 4 months ago) by
albertel
Branches:
MAIN
CVS tags:
version_2_1_X,
version_2_1_3,
version_2_1_2,
version_2_1_1,
version_2_1_0,
version_2_0_X,
version_2_0_99_1,
version_2_0_2,
version_2_0_1,
version_2_0_0,
version_1_99_3,
version_1_99_2,
version_1_99_1_tmcc,
version_1_99_1,
version_1_99_0,
HEAD
- if in a sec only boradcast to that sec
1: # The LearningOnline Network
2: # Communicate
3: #
4: # $Id: loncommunicate.pm,v 1.29 2005/05/20 17:00:40 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: use Apache::lonnet;
38:
39: sub menu {
40: my $r=shift;
41: my %lt=&Apache::lonlocal::texthash(
42: 'mnf' => 'Make New Folder',
43: 'vcm' => 'View Critical Messages',
44: 'smu' => 'Send Message to User(s)',
45: 'bmc' => 'Broadcast Message to Course',
46: 'dmu' => 'Distribute Messages from Uploaded File to Course',
47: 'unr' =>
48: 'User Notes, Records of Face-to-Face Discussions, and Critical Messages',
49:
50: 'cbs' => 'Configure blocking of student communication during exams'
51:
52: );
53: my %help=();
54: foreach ('Course_Face_To_Face_Records,Course_Critical_Message',
55: 'Course_Broadcast_Message') {
56: $help{$_}=&Apache::loncommon::help_open_topic($_);
57: }
58: # ------------------------------------------------------------------------ Menu
59: $r->print(<<END);
60: <table cellspacing="10" cellpadding="2">
61: <tr><td bgcolor="#FFFFAA"><form method="post" action="/adm/email">
62: <input type="submit" value="$lt{'mnf'}" />
63: <input type="text" size="15" name="newfolder" value="" />
64: </form></td>
65: <td bgcolor="#FFFFAA">
66: <b><a href="/adm/email?compose=individual">$lt{'smu'}</a></b>
67: </td></tr>
68: END
69: if (($env{'request.course.id'}) &&
70: (
71: &Apache::lonnet::allowed('srm',$env{'request.course.id'}) ||
72: &Apache::lonnet::allowed('srm',$env{'request.course.id'}.'/'.$env{'request.course.sec'})
73: )) {
74: $r->print(<<END);
75: <tr><td bgcolor="#FFFFAA">
76: <b><a href="/adm/email?compose=group">$lt{'bmc'}</a></b>$help{'Course_Broadcast_Message'}
77: </td>
78: <td bgcolor="#FFFFAA">
79: <b><a href="/adm/email?compose=upload">$lt{'dmu'}</a></b>
80: </td></tr>
81: <tr><td bgcolor="#FFFFAA">
82: <b><a href="/adm/email?recordftf=query">$lt{'unr'}</a></b>$help{'Course_Face_To_Face_Records,Course_Critical_Message'}
83: </td>
84: <td bgcolor="#FFFFAA">
85: <b><a href="/adm/email?block=display">$lt{'cbs'}</a>
86: </td></tr>
87: END
88: }
89: $r->print('</table>');
90: }
91:
92: sub handler {
93: my $r = shift;
94: &Apache::loncommon::content_type($r,'text/html');
95: $r->send_http_header;
96: return OK if $r->header_only;
97: #
98: # Start document
99: #
100: my $html=&Apache::lonxml::xmlbegin();
101: $r->print(<<END);
102: $html
103: <head>
104: <title>The LearningOnline Network with CAPA</title>
105: </head>
106: END
107:
108: # ----------------------------------------------------------------- Breadcrumbs
109: &Apache::lonhtmlcommon::clear_breadcrumbs();
110: &Apache::lonhtmlcommon::add_breadcrumb
111: ({href=>"/adm/communicate",
112: text=>"Communication/Messages",
113: faq=>12,bug=>'Communication Tools',});
114:
115: # ---------------------------------------------------------------------- Header
116: &Apache::lonmsg::header($r);
117: &menu($r);
118: &Apache::lonmsg::disall($r,'new');
119: return OK;
120: }
121:
122: 1;
123: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>