File:  [LON-CAPA] / loncom / interface / longroupchat.pm
Revision 1.10: download - view: text, annotated - select for diffs
Tue Feb 24 18:20:49 2009 UTC (15 years, 3 months ago) by hauer
Branches: MAIN
CVS tags: version_2_9_X, version_2_9_99_0, version_2_9_1, version_2_9_0, version_2_8_99_1, version_2_8_99_0, version_2_12_X, version_2_11_X, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, version_2_11_2_uiuc, version_2_11_2_msu, version_2_11_2_educog, version_2_11_2, version_2_11_1, version_2_11_0_RC3, version_2_11_0_RC2, version_2_11_0_RC1, version_2_11_0, version_2_10_X, version_2_10_1, version_2_10_0_RC2, version_2_10_0_RC1, version_2_10_0, loncapaMITrelate_1, language_hyphenation_merge, language_hyphenation, bz6209-base, bz6209, bz5969, bz2851, PRINT_INCOMPLETE_base, PRINT_INCOMPLETE, HEAD, GCI_3, GCI_2, BZ5971-printing-apage, BZ5434-fox, BZ4492-merge, BZ4492-feature_horizontal_radioresponse
edited:
live chatroom => chat room
chatroom => chat room
chatrooms => chat rooms
chatroom => Chatroom (in german translation)
Chat room => Chat Room (headlines)

# The LearningOnline Network
# "Group Chat Room Frame" Personal Information
#
# $Id: longroupchat.pm,v 1.10 2009/02/24 18:20:49 hauer Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#
package Apache::longroupchat;

use strict;
use Apache::Constants qw(:common);
use Apache::lonnet;
use Apache::loncommon();
use Apache::lonlocal;
use Apache::longroup();
use lib '/home/httpd/lib/perl/';
use LONCAPA;
 

sub handler {
    my ($r) = @_;
    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['group']);
    my $group = $env{'form.group'};
    my $grouptitle;
    if (defined($group)) {
        my $cnum=$env{'course.'.$env{'request.course.id'}.'.num'};
        my $cdom=$env{'course.'.$env{'request.course.id'}.'.domain'};
        my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum,$group);
        if (%curr_groups) {
            my %group_info = 
		&Apache::longroup::get_group_settings($curr_groups{$group});
            $grouptitle = &mt('Group Chat Room:').' '.
		&unescape($group_info{description});
        }
    }

    &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");
$start_page
<frame name="chatacc" src="/adm/chatfetch?group=$group">
<frame name="chatpost" src="/adm/chat?group=$group">
<frame name="chatout" src="/adm/rat/empty.html">
$end_page
END
    return OK;
}

1;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.