File:
[LON-CAPA] /
loncom /
interface /
longroupchat.pm
Revision
1.6:
download - view:
text,
annotated -
select for diffs
Thu May 18 01:08:50 2006 UTC (18 years, 4 months ago) by
raeburn
Branches:
MAIN
CVS tags:
HEAD
&coursegroups() and &get_group_settings() moved to longroup.pm, which contains general utility functions for asking about groups. Also contains &group_changes() which is used to add/drop group memberships as a result of role changes, as determined by group settings for auto-add and auto-drop. 'none' and 'all' are now reserved words which may not be used as section or group names, so they can be used instead of _all and _none when specifying auto-add and auto-drop settings for all sections or no section roles.
1: # The LearningOnline Network
2: # "Group Chat Frame" Personal Information
3: #
4: # Copyright Michigan State University Board of Trustees
5: #
6: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
7: #
8: # LON-CAPA is free software; you can redistribute it and/or modify
9: # it under the terms of the GNU General Public License as published by
10: # the Free Software Foundation; either version 2 of the License, or
11: # (at your option) any later version.
12: #
13: # LON-CAPA is distributed in the hope that it will be useful,
14: # but WITHOUT ANY WARRANTY; without even the implied warranty of
15: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: # GNU General Public License for more details.
17: #
18: # You should have received a copy of the GNU General Public License
19: # along with LON-CAPA; if not, write to the Free Software
20: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21: #
22: # /home/httpd/html/adm/gpl.txt
23: #
24: # http://www.lon-capa.org/
25: #
26: package Apache::longroupchat;
27:
28: use strict;
29: use Apache::lonnet;
30: use Apache::loncommon;
31: use Apache::lonlocal;
32: use Apache::longroup;
33:
34: sub handler {
35: my ($r) = @_;
36: &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['group']);
37: my $group = $env{'form.group'};
38: my $grouptitle;
39: if (defined($group)) {
40: my $cnum=$env{'course.'.$env{'request.course.id'}.'.num'};
41: my $cdom=$env{'course.'.$env{'request.course.id'}.'.domain'};
42: my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum,$group);
43: if (%curr_groups) {
44: my %group_info =
45: &Apache::longroup::get_group_settings($curr_groups{$group});
46: $grouptitle = &mt('Group Chat:').' '.
47: &Apache::lonnet::unescape($group_info{description});
48: }
49: }
50:
51: my $start_page =
52: &Apache::loncommon::start_page($grouptitle,undef,
53: {'frameset' => 1,
54: 'add_entries' => {
55: 'rows' => "80,100,*",
56: 'border' => "0"},});
57: my $end_page =
58: &Apache::loncommon::end_page({'frameset' => 1});
59:
60: $r->print(<<"END");
61: $start_page
62: <frame name="chatacc" src="/adm/chatfetch?group=$group">
63: <frame name="chatpost" src="/adm/chat?group=$group">
64: <frame name="chatout" src="/adm/rat/empty.html">
65: $end_page
66: END
67:
68: }
69:
70: 1;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>