version 1.2, 2006/03/29 21:14:23
|
version 1.8, 2006/05/30 12:46:09
|
Line 1
|
Line 1
|
# The LearningOnline Network |
# The LearningOnline Network |
# "Group Chat Frame" Personal Information |
# "Group Chat Frame" Personal Information |
# |
# |
|
# $Id$ |
|
# |
# Copyright Michigan State University Board of Trustees |
# Copyright Michigan State University Board of Trustees |
# |
# |
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
Line 26
|
Line 28
|
package Apache::longroupchat; |
package Apache::longroupchat; |
|
|
use strict; |
use strict; |
|
use Apache::Constants qw(:common); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::longroup(); |
|
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA; |
|
|
|
|
sub handler { |
sub handler { |
my ($r) = @_; |
my ($r) = @_; |
Line 38 sub handler {
|
Line 45 sub handler {
|
if (defined($group)) { |
if (defined($group)) { |
my $cnum=$env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum=$env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cdom=$env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom=$env{'course.'.$env{'request.course.id'}.'.domain'}; |
my %curr_groups; |
my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum,$group); |
my $numgroups = &Apache::loncommon::coursegroups(\%curr_groups,$cdom, |
if (%curr_groups) { |
$cnum,$group); |
|
if ($numgroups) { |
|
my %group_info = |
my %group_info = |
&Apache::loncommon::get_group_settings($curr_groups{$group}); |
&Apache::longroup::get_group_settings($curr_groups{$group}); |
$grouptitle = &mt('Group Chat:').' '. |
$grouptitle = &mt('Group Chat:').' '. |
&Apache::lonnet::unescape($group_info{description}); |
&unescape($group_info{description}); |
} |
} |
} |
} |
my $html = &Apache::lonxml::xmlbegin(); |
|
my $head = &Apache::loncommon::head($grouptitle); |
&Apache::loncommon::content_type($r,'text/html'); |
|
$r->send_http_header; |
|
return OK if $r->header_only; |
|
my $start_page = |
|
&Apache::loncommon::start_page($grouptitle,undef, |
|
{'frameset' => 1, |
|
'add_entries' => { |
|
'rows' => "80,100,*", |
|
'border' => "0"},}); |
|
my $end_page = |
|
&Apache::loncommon::end_page({'frameset' => 1}); |
|
|
$r->print(<<"END"); |
$r->print(<<"END"); |
$html |
$start_page |
$head |
|
<frameset border="0" rows="80,100,*"> |
|
<frame name="chatacc" src="/adm/chatfetch?group=$group"> |
<frame name="chatacc" src="/adm/chatfetch?group=$group"> |
<frame name="chatpost" src="/adm/chat?group=$group"> |
<frame name="chatpost" src="/adm/chat?group=$group"> |
<frame name="chatout" src="/adm/rat/empty.html"> |
<frame name="chatout" src="/adm/rat/empty.html"> |
</frameset> |
$end_page |
</html> |
|
END |
END |
|
|
} |
} |