mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preliminary support for groups in Chat.
It's not well tested yet - I'm hoping to do some testing on moodle.org with some real people and get this refined enough for the Beta release later today.
- Loading branch information
moodler
committed
Feb 24, 2004
1 parent
4c17698
commit 84a2fdd
Showing
13 changed files
with
162 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,71 @@ | ||
<?php | ||
|
||
require_once('../../../config.php'); | ||
require_once('../lib.php'); | ||
require_once('../../../config.php'); | ||
require_once('../lib.php'); | ||
|
||
require_variable($id); | ||
require_variable($id); | ||
optional_variable($groupid); | ||
|
||
if (!$chat = get_record("chat", "id", $id)) { | ||
error("Could not find that chat room!"); | ||
} | ||
if (!$chat = get_record("chat", "id", $id)) { | ||
error("Could not find that chat room!"); | ||
} | ||
|
||
if (!$course = get_record("course", "id", $chat->course)) { | ||
error("Could not find the course this belongs to!"); | ||
} | ||
|
||
require_login($course->id); | ||
|
||
if (isguest()) { | ||
error("Guest does not have access to chat rooms"); | ||
} | ||
|
||
if (!$course = get_record("course", "id", $chat->course)) { | ||
error("Could not find the course this belongs to!"); | ||
} | ||
/// Check to see if groups are being used here | ||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used | ||
if ($currentgroup = get_and_set_current_group($course->id, $groupmode, $groupid)) { | ||
if (!$group = get_record('groups', 'id', $currentgroup)) { | ||
error("That group (id $currentgroup) doesn't exist!"); | ||
} | ||
$groupname = ': '.$group->name; | ||
} else { | ||
$groupname = ': '.get_string('allparticipants'); | ||
} | ||
} else { | ||
$currentgroup = false; | ||
$groupname = ''; | ||
} | ||
|
||
require_login($course->id); | ||
if (!$chat_sid = chat_login_user($chat->id, "header_js")) { | ||
error("Could not log in to chat room!!"); | ||
} | ||
|
||
if (isguest()) { | ||
error("Guest does not have access to chat rooms"); | ||
} | ||
|
||
if (!$chat_sid = chat_login_user($chat->id, "header_js")) { | ||
error("Could not log in to chat room!!"); | ||
} | ||
|
||
$strchat = get_string("modulename", "chat"); | ||
if ($currentgroup !== false) { | ||
$params = "chat_enter=true&chat_sid=$chat_sid&groupid=$currentgroup"; | ||
} else { | ||
$params = "chat_enter=true&chat_sid=$chat_sid"; | ||
} | ||
|
||
$strchat = get_string("modulename", "chat"); | ||
|
||
|
||
?> | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> | ||
<html> | ||
<head> | ||
<title> | ||
<?php echo "$strchat: $course->shortname: $chat->name" ?> | ||
<?php echo "$strchat: $course->shortname: $chat->name$groupname" ?> | ||
</title> | ||
</head> | ||
<frameset cols="*,200" border="5" framespacing="no" frameborder="yes" marginwidth="2" marginheight="1"> | ||
<frameset rows="0,0,*,40" border="0" framespacing="no" frameborder="no" marginwidth="2" marginheight="1"> | ||
<frame src="../empty.php" NAME="empty" scrolling="no" marginwidth="0" marginheight="0"> | ||
<frame src="jsupdate.php?chat_sid=<?php echo $chat_sid; ?>&chat_enter=true" scrolling="no" marginwidth="0" marginheight="0"> | ||
<frame src="jsupdate.php?<?php echo $params ?>" scrolling="no" marginwidth="0" marginheight="0"> | ||
<frame src="chatmsg.php" NAME="msg" scrolling="auto" marginwidth="2" marginheight="1"> | ||
<frame src="chatinput.php?chat_sid=<?php echo $chat_sid; ?>" name="input" scrolling="no" marginwidth="2" marginheight="1"> | ||
<frame src="chatinput.php?<?php echo $params ?>" name="input" scrolling="no" marginwidth="2" marginheight="1"> | ||
</frameset> | ||
<frame src="../users.php?chat_sid=<?php echo $chat_sid; ?>&chat_enter=true" name="users" scrolling="auto" marginwidth="5" marginheight="5"> | ||
<frame src="../users.php?<?php echo $params ?>" name="users" scrolling="auto" marginwidth="5" marginheight="5"> | ||
</frameset> | ||
<noframes> | ||
Sorry, this version of ARSC needs a browser that understands framesets. We have a Lynx friendly version too. | ||
Sorry, this version of Moodle Chat needs a browser that handles frames. | ||
</noframes> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.