2
include("../config.inc.php");
3
include("../functions.inc.php");
2
require_once('../../../config.php');
3
require_once('../lib.php');
6
optional_variable($groupid, -1);
8
if (!$chat = get_record('chat', 'id', $id)) {
9
error('Could not find that chat room!');
12
if (!$course = get_record('course', 'id', $chat->course)) {
13
error('Could not find the course this belongs to!');
16
if (!$cm = get_coursemodule_from_instance('chat', $chat->id, $course->id)) {
17
error('Course Module ID was incorrect');
20
require_login($course->id);
23
error('Guest does not have access to chat rooms');
26
/// Check to see if groups are being used here
27
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
28
if ($currentgroup = get_and_set_current_group($course, $groupmode, $groupid)) {
29
if (!$group = get_record('groups', 'id', $currentgroup)) {
30
error("That group (id $currentgroup) doesn't exist!");
32
$groupname = ': '.$group->name;
34
$groupname = ': '.get_string('allparticipants');
37
$currentgroup = false;
41
if (!$chat_sid = chat_login_user($chat->id, 'sockets', $currentgroup)) {
42
error("Could not log in to chat room!!");
45
if ($currentgroup !== false) {
46
$params = "chat_enter=true&chat_sid=$chat_sid&groupid=$currentgroup";
48
$params = "chat_enter=true&chat_sid=$chat_sid&groupid=0";
51
$strchat = get_string("modulename", "chat");
5
56
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
9
<?php echo $arsc_parameters["title"]; ?>
60
<?php echo "$strchat: $course->shortname: $chat->name$groupname" ?>
12
<frameset cols="193,*" border="0" framespacing="no" frameborder="0" marginwidth="2" marginheight="1">
13
<frame src="../shared/roomlist.php?arsc_sid=<?php echo $arsc_sid; ?>" name="roomlist" scrolling="auto" noresize marginwidth="0" marginheight="0">
14
<frameset cols="*,120" border="0" framespacing="no" frameborder="0" marginwidth="2" marginheight="1">
15
<frameset rows="1,*,40" border="1" framespacing="no" frameborder="0" marginwidth="2" marginheight="1">
16
<frame src="../shared/empty.php" NAME="empty" scrolling="no" noresize marginwidth="0" marginheight="0">
17
<frame src="http://<?php echo $arsc_parameters["socketserver_adress"].":".$arsc_parameters["socketserver_port"]; ?>/?arsc_sid=<?php echo $arsc_sid; ?>" NAME="msg" scrolling="auto" noresize marginwidth="2" marginheight="0">
18
<frame src="chatinput.php?arsc_sid=<?php echo $arsc_sid; ?>" name="input" scrolling="no" noresize marginwidth="2" marginheight="1">
20
<frame src="../shared/userlist.php?arsc_sid=<?php echo $arsc_sid; ?>&arsc_enter=true" name="users" scrolling="auto" noresize marginwidth="2" marginheight="2">
63
<frameset cols="*,200" border="5" framespacing="no" frameborder="yes" marginwidth="2" marginheight="1">
64
<frameset rows="0,*,40" border="0" framespacing="no" frameborder="no" marginwidth="2" marginheight="1">
65
<frame src="empty.php" name="empty" scrolling="auto" noresize marginwidth="2" marginheight="0">
66
<frame src="<?php echo "http://$CFG->chat_serverhost:$CFG->chat_serverport?win=chat&$params"; ?>" NAME="msg" scrolling="auto" noresize marginwidth="2" marginheight="0">
67
<frame src="chatinput.php?<?php echo $params ?>" name="input" scrolling="no" marginwidth="2" marginheight="1">
69
<frame src="<?php echo "http://$CFG->chat_serverhost:$CFG->chat_serverport?win=users&$params"; ?>" name="users" scrolling="auto" marginwidth="5" marginheight="5">
71
<frame src="../users.php?<?php echo $params ?>" name="users" scrolling="auto" marginwidth="5" marginheight="5">
24
Sorry, this version of ARSC needs a browser that understands framesets. But we have a lynx-friendly version too.
75
Sorry, this version of Moodle Chat needs a browser that handles frames.