237 Commits

Author SHA1 Message Date
stronk7
d96466d29f Moving from lastIP to lastip everywhere. Bug 5763.
(http://moodle.org/bugs/bug.php?op=show&bugid=5763)

Merged from MOODLE_16_STABLE
2006-06-09 10:04:43 +00:00
skodak
2c3432e684 fixed problem when set both loginhttps and https in wwwroot, closes bug #5507 and #3848; merged from MOODLE_16_STABLE 2006-05-15 21:36:46 +00:00
martinlanghoff
274f009184 mod/chat - fix another instance where empty $USER->lastIP was affecting us
The original commit was:

mod/chat - use empty value instead of erroring out if $USER->lastIP and getremoteaddr() don't yield any interesting value

Sometimes we can't get any useful IP for the user -- and this may even be a
valid situation. So fudge an empty value -- the DB needs it as the IP field
is NOT NULL.
2006-05-02 05:20:35 +00:00
vyshane
fccaec1f5b Inserts for log_display. 2006-04-24 08:43:29 +00:00
toyomoyo
4dca83214b new format for log_display 2006-04-24 08:00:51 +00:00
toyomoyo
7e7d06f30b changing new format for log_display 2006-04-24 07:58:53 +00:00
skodak
d2b23346c9 block editing now uses PARAM_BOOL 2006-04-23 20:58:06 +00:00
martinlanghoff
f83edcb114 mod/chat - use empty value instead of erroring out if $USER->lastIP and getremoteaddr() don't yield any interesting value
Sometimes we can't get any useful IP for the user -- and this may even be a
valid situation. So fudge an empty value -- the DB needs it as the IP field
is NOT NULL.
2006-04-19 21:22:36 +00:00
martinlanghoff
930413b133 mod/chat: Normal method - introducing "Stream" updates.
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 (currently 1000), 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.

Chat still defaults to the normal update method, which is now
optimised to take advantage of keepalives -- so this change is
safe. The instructions in the config page also indicate that this
mode may not be well supported everywhere. It hasn't been
tested on IIS for starters.

In terms of relative cost -- if each hit on jsupdate.php incurs
on ~20 db queries and delivers one update to the client, each hit
on jsupdate takes ~20 queries, and then roughly 2~3 queries to
serve each of the next 1000 updates. On busy sites, the difference
is huge.

There is still room for enhancements in both keepalive and stream
update methods. I am pretty sure we can trim DB queries more.
2006-04-19 02:20:48 +00:00
martinlanghoff
d13ef2fbdc mod/chat - cope with missing $USER->lastIP
$USER->lastIP is sometimes not set properly during login, fetch it if we can
or error out clearly -- we won't be able to login the user to the chat if
we don't have an IP address to match him/her against.
2006-04-18 22:40:56 +00:00
moodler
5379d24992 A little HTML hint since styles are not working here for me somehow 2006-04-18 07:28:44 +00:00
moodler
78c98892d1 More efficient chat listings (less database calling) 2006-04-18 07:14:21 +00:00
martinlanghoff
a6d1886fa5 mod/chat: Normal method -- collate 2 SELECTs into one
We really don't need to ask about the user table _twice_ here. Just ask for the
right fields, and done.
2006-04-17 21:06:28 +00:00
martinlanghoff
46c859760c mod/chat: Normal method -- faster, lighter DB updates
Use set_field() keyed on PK instead of update_record() or set_field()
keyed on non-PKs.
2006-04-17 21:05:51 +00:00
martinlanghoff
c5e817f02c mod/chat - Normal method - users pane only uses keepalive when refreshing fast
To avoid wasting server resources, user's pane now only uses keepalive
when the refresh is lower than apache's timeout.
2006-04-17 21:05:17 +00:00
martinlanghoff
6169ea259a mod/chat - Normal method now supports HTTP Keep-Alive - users pane
User's pane now also uses keepalives -- if the refresh freq is below
the disconnect timeout, then it is a win. Otherwise it wastes memory
at the server end.
2006-04-17 21:04:47 +00:00
martinlanghoff
dfd1d9e272 mod/chat - Normal method now support HTTP Keep-Alive
By using output buffering, we now support HTTP Keep-Alive, which means
that each client gets tightly bound to a single apache child - this means
that we get

 + lower resource usage on the webserver
 + _much_ lower resource usage on webserver and dbserver if pconnects are used
 + a good case for further caching (memcache/mmcache)

Using ab via localhost or fast LAN using keepalives is actually slower from the
client perspective -- still lighter on the server. Via slower links (DSL/modem)
the responses are faster.
2006-04-17 21:04:19 +00:00
martinlanghoff
4d5525c650 mod/chat: make http-chat more database friendly and change msg insertion to use POST
+ we are now more conservative in the fields it asks from the db
+ also more conservative with upates to chat_users
+ messages are now added via POST requests instead of GET
2006-04-17 21:03:44 +00:00
moodler
16ad40e145 Fix for chat character sets bug 5010 2006-04-16 16:01:40 +00:00
stronk7
1b1858d260 htmlentities() to s() 2006-04-11 16:09:52 +00:00
stronk7
2070370cfa Typo. 2006-03-28 23:31:12 +00:00
moodler
0eda0a46b2 Fixed a typo 2006-03-24 14:44:55 +00:00
moodler
a2a3733666 iFIx up some styles for the MyMoodle overview 2006-03-15 04:01:10 +00:00
patrickslee
9ca0187e16 Chat module support for my moodle page 2006-03-14 22:28:28 +00:00
patrickslee
cb8229d0a8 UTF8 migration - now supporting PostgreSQL 2006-03-10 03:43:33 +00:00
skodak
107e7612b5 short php tags once more 2006-03-07 21:46:34 +00:00
skodak
38b7336ed1 short php tags 2006-03-07 21:35:13 +00:00
toyomoyo
f841494c62 see changes for admin/utfdbmigrate.php 2006-02-24 08:20:13 +00:00
toyomoyo
7b5aa1b725 case sensitive IP 2006-02-23 03:16:28 +00:00
moodler
136b6ab33f changed to use utfconvert function 2006-01-31 02:15:21 +00:00
moodler
f6691427d9 Added default values where needed for columns in the MySQL creation script mysql.sql.
Added default values to migrate2utf8.xml, for any varchar and text field types, if the default values for these fields were not defined as '' in the MySQL table creation script.

Committed by vyshane
2006-01-17 07:37:29 +00:00
mjollnir_
f90666aa5c Abstracted a bit of the restore procedure to allow for silent restoring.
Added new function, import_backup_file_silently
Changed everything that prints stuff to check for a constant first.
Backup_flush checks a different constant, this is so that output can still
get flushed to the browser when necessary but not print <li>s everywhere.
Please test this!
2006-01-15 21:09:13 +00:00
mjollnir_
1ecea97679 Granular backup & restore:
This patch allows the much requested selection of individual instances of modules within a course to backup and restore.
It needs A LOT of testing and probably some prettyifying too.
2006-01-13 03:45:31 +00:00
mjollnir_
0f4e83c173 Fixing up a problem in chat login - ip address is lastip not lastIP - member variables are case sensitive 2006-01-13 03:09:24 +00:00
toyomoyo
7c5406967d some bug fixes 2006-01-12 02:39:13 +00:00
toyomoyo
c8ee027b0e added 2 fields in xml, addindex and dropindex, and bug fixes 2006-01-11 01:46:22 +00:00
toyomoyo
1e4d9ff6dc utf8 migration support scripts 2006-01-09 06:06:49 +00:00
stronk7
b49f9e8932 And chat is using current_charset() too.
Merged from MOODLE_16_UTF8. Abandoning the branch.
2006-01-05 16:31:29 +00:00
defacer
970f144ef4 A slight improvement for my last edit, which could trigger a small bug.
I should go out and drink more often, it helps debugging! ;-)
2005-10-25 01:55:21 +00:00
defacer
72989350be Fix for bug 3794:
Times in chat messages are now displayed correctly to all users, with each
user's timezone and DST status taken into account.
2005-10-24 17:30:56 +00:00
stronk7
aa5c32fda7 Extended theme support to the chat window. Bug 3376.
(http://moodle.org/bugs/bug.php?op=show&bugid=3376)

Merged from MOODLE_15_STABLE
2005-09-10 22:57:21 +00:00
mjollnir_
f3221af9e5 Initial checkin of stats (from processing the log table).
I will write up some information about it for the developers wiki.
2005-09-01 04:14:31 +00:00
patrickslee
4e980e5a92 Mass cleanup of bad postgres upgrade scripts(merged from 15_stable) 2005-08-15 23:17:58 +00:00
stronk7
fcd01e4571 Now chat-talk log actions are restored properly.
Part of bug 3582.
(http://moodle.org/bugs/bug.php?op=show&bugid=3852)

Merged from MOODLE_15_STABLE
2005-08-03 18:28:56 +00:00
moodler
f5e1319ec3 Merged SC139 from stable 2005-07-12 08:00:51 +00:00
defacer
281d70ac2d Merging from STABLE:
Three improvements:

1. $nomoodlecookie = true. I just found out about this undocumented(?) hack(?)
   in lib/setup.php which is the perfect way to suppress some warnings. We
   don't need a session cookie for the chatd.

2. If allow_call_time_pass_reference is Off, socket_getpeername can't work.

3. Suppress "call time pass by reference is deprecated" messages for
   socket_getpeername, we don't have any choice here.
2005-07-08 03:51:38 +00:00
stronk7
25ef0370d5 Improved automatic relinking in backup and restore. Credits go to skodak.
Complete refactoring of the system that was really awful (my fault!).
Now everything is in its place and working like a charm, making things really
easier to be implemented and amplied. Bug 3678
(http://moodle.org/bugs/bug.php?op=show&bugid=3678)
(http://moodle.org/mod/forum/discuss.php?d=26530)

Note: Everything is merged from stable but the quiz module because it has
other changes not merged for now. I've skyped a message to Gustav about it.

Merged from MOODLE_15_STABLE
2005-07-04 18:56:03 +00:00
stronk7
894ff63f8f Tabs are out 2005-05-16 22:22:31 +00:00
defacer
380bf7a6d3 Simply usertimezone(), baby! ;-) 2005-04-27 03:44:52 +00:00
moodler
b35e1a9ab9 No chat for you! (guests) 2005-04-25 19:10:14 +00:00