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, false, $cm); if (isguest()) { error('Guest does not have access to chat rooms'); } if (!$cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $cm->id))) { print_header(); notice(get_string("activityiscurrentlyhidden")); } /// Check to see if groups are being used here if ($groupmode = groupmode($course, $cm)) { // Groups are being used if ($groupid = get_and_set_current_group($course, $groupmode, $groupid)) { if (!$group = get_record('groups', 'id', $groupid)) { error("That group (id $groupid) doesn't exist!"); } $groupname = ': '.$group->name; } else { $groupname = ': '.get_string('allparticipants'); } } else { $groupid = 0; $groupname = ''; } $strchat = get_string('modulename', 'chat'); // must be before current_language() in chat_login_user() to force course language!!! if (!$chat_sid = chat_login_user($chat->id, 'sockets', $groupid, $course)) { error('Could not log in to chat room!!'); } $params = "chat_sid=$chat_sid"; ?> <?php echo "$strchat: $course->shortname: ".format_string($chat->name,true)."$groupname" ?> chat_serverhost:$CFG->chat_serverport?win=chat&$params"; ?>" name="msg" scrolling="auto" noresize marginwidth="2" marginheight="0"> chat_serverhost:$CFG->chat_serverport?win=users&$params"; ?>" name="users" scrolling="auto" marginwidth="5" marginheight="5"> Sorry, this version of Moodle Chat needs a browser that handles frames.