Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/chat/gui_header_js/jsupdated.php File Reference

Go to the source code of this file.

Enumerations

enum  CHAT_MAX_CLIENT_UPDATES
enum  NO_MOODLE_COOKIES
enum  NO_OUTPUT_BUFFERING

Variables

 $chat_sid = required_param('chat_sid', PARAM_ALPHANUM)
 $chat_lasttime = optional_param('chat_lasttime', 0, PARAM_INT)
 $chat_lastrow = optional_param('chat_lastrow', 1, PARAM_INT)
 $chat_lastid = optional_param('chat_lastid', 0, PARAM_INT)
 $url = new moodle_url('/mod/chat/gui_header_js/jsupdated.php', array('chat_sid'=>$chat_sid))
if(!$chatuser=$DB->get_record('chat_users',
array('sid'=> $chat_sid))) if(!$course=$DB->
get_record('course', array('id'=>
$chatuser->course))) if(!$USER=$DB->
get_record('user', array('id'=>
$chatuser->userid))) $USER 
description = ''
 $stylesheetshtml = ''
 required stylesheets
 $refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdated.php?chat_sid=$chat_sid&chat_lasttime=$chat_lasttime&chat_lastrow=$chat_newrow&chat_lastid=$chat_lastid"
print n
print print location href = '$refreshurl'

Enumeration Type Documentation

jsupdated.php - notes by Martin Langhoff <martin@catalyst.net.nz>

This is an alternative version of jsupdate.php that acts as a long-running daemon. It will feed/stall/feed JS updates to the client. From the module configuration select "Stream" updates.

The client connection is not forever though. Once we reach CHAT_MAX_CLIENT_UPDATES, it will force the client to re-fetch it.

This buys us all the benefits that chatd has, minus the setup, as we are using apache to do the daemon handling.

Definition at line 19 of file jsupdated.php.

Definition at line 20 of file jsupdated.php.

Definition at line 21 of file jsupdated.php.


Variable Documentation

$chat_lastid = optional_param('chat_lastid', 0, PARAM_INT)

Definition at line 33 of file jsupdated.php.

$chat_lastrow = optional_param('chat_lastrow', 1, PARAM_INT)

Definition at line 32 of file jsupdated.php.

$chat_lasttime = optional_param('chat_lasttime', 0, PARAM_INT)

Definition at line 31 of file jsupdated.php.

$chat_sid = required_param('chat_sid', PARAM_ALPHANUM)

Definition at line 30 of file jsupdated.php.

for ($n=0;$n<=CHAT_MAX_CLIENT_UPDATES;$n++) $refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdated.php?chat_sid=$chat_sid&chat_lasttime=$chat_lasttime&chat_lastrow=$chat_newrow&chat_lastid=$chat_lastid"

Definition at line 88 of file jsupdated.php.

$stylesheetshtml = ''

required stylesheets

Definition at line 82 of file jsupdated.php.

$url = new moodle_url('/mod/chat/gui_header_js/jsupdated.php', array('chat_sid'=>$chat_sid))

Definition at line 35 of file jsupdated.php.

if (!$chatuser=$DB->get_record('chat_users', array('sid'=> $chat_sid))) if (!$course=$DB->get_record('course', array('id'=> $chatuser->course))) if (!$USER=$DB->get_record('user', array('id'=> $chatuser->userid))) $USER description = ''

Definition at line 61 of file jsupdated.php.

print print location href = '$refreshurl'

Definition at line 237 of file jsupdated.php.

print print n n

Definition at line 235 of file jsupdated.php.

 All Data Structures Namespaces Files Functions Variables Enumerations