course)) { error("Could not find the course this belongs to!"); } if (!$cm = get_coursemodule_from_instance("chat", $chat->id, $course->id)) { error("Course Module ID was incorrect"); } require_login($course->id); if (isguest()) { error("Guest does not have access to chat rooms"); } /// 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, $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 = ''; } if (!$chat_sid = chat_login_user($chat->id, "header_js", $currentgroup)) { error("Could not log in to chat room!!"); } 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"); ?> <?php echo "$strchat: $course->shortname: $chat->name$groupname" ?> Sorry, this version of Moodle Chat needs a browser that handles frames.