course,'','','','','id,theme,lang')) { error('incorrect course id'); } //Get the user theme and enough info to be used in chat_format_message() which passes it along to if (!$USER = get_record('user','id',$chatuser->userid)) { // no optimisation here, it would break again in future! error('User does not exist!'); } $USER->description = ''; //Setup course, lang and theme course_setup($course); $courseid = $chatuser->course; if (!$cm = get_coursemodule_from_instance('chat', $chatuser->chatid, $courseid)) { error('Course Module ID was incorrect'); } if ($beep) { $message->chatid = $chatuser->chatid; $message->userid = $chatuser->userid; $message->groupid = $chatuser->groupid; $message->message = "beep $beep"; $message->system = 0; $message->timestamp = time(); if (!insert_record('chat_messages', $message)) { error('Could not insert a chat message!'); } $chatuser->lastmessageping = time(); // A beep is a ping ;-) } $chatuser->lastping = time(); set_field('chat_users', 'lastping', $chatuser->lastping, 'id', $chatuser->id ); $refreshurl = "users.php?chat_sid=$chat_sid"; /// Get list of users if (!$chatusers = chat_get_users($chatuser->chatid, $chatuser->groupid, $cm->groupingid)) { print_error('errornousers', 'chat'); } ob_start(); ?> Refresh link'; echo '
'; echo "id&course=$courseid','user$chatuser->id','');\" href=\"$CFG->wwwroot/user/view.php?id=$chatuser->id&course=$courseid\">"; print_user_picture($chatuser->id, 0, $chatuser->picture, false, false, false); echo ' | ';
echo ' ';
echo fullname($chatuser).' |