354 Commits

Author SHA1 Message Date
skodak
eef868d17d major whitespace cleanup - fixed trailng whitespace in new files and admin area 2006-09-20 21:00:45 +00:00
skodak
03f5a0f87c major whitespace cleanup - fixed \r\n line-ending 2006-09-20 19:46:52 +00:00
skodak
21b6db6eff added capabilty risks into access.php and GUI for define role and override; minor fixes for capability types in forum 2006-09-18 21:32:49 +00:00
moodler
fdb1cf2cc1 FIxed to use the new debugging function 2006-09-18 09:13:04 +00:00
thompson697
163ff97e84 Complete work on Roll Forwards - Restore from previous semester (MDL-5532)
* Add fields to restore form to enable changes to Short Name, Full Name and Start Date
* Start Date offset added to Restore process
* Created Restorelog file in Course files area
* Activity Modules use offset to change dates
* Activity Modules write changes to Restorelog
2006-09-13 13:19:39 +00:00
moodler
0f9602085b Small bump for guest role fix 2006-09-12 08:22:14 +00:00
moodler
8d158ed44f Reload the guest role using new defaults 2006-09-12 07:10:49 +00:00
moodler
00adf177ad Changed some default permissions for the guest role 2006-09-12 05:58:42 +00:00
toyomoyo
1c45e42e3c adding capabilities 2006-09-11 08:56:23 +00:00
toyomoyo
f9a59efa64 adding some capabilities 2006-08-29 08:43:59 +00:00
moodler
0468976c9a SWEEPING CLEANUP
The API was changed slightly so that has_capability now takes the
whole $context object (we almost always have it anyway)

The $kill thing was removed.   If you want to assert a capability
then use:

    require_capability('capname', $context);

with optional variables to modify the error message

Misc bugs here and there also removed and code tidied
2006-08-14 05:55:40 +00:00
moodler
dabfd0ed85 Removed tabs 2006-08-09 13:45:49 +00:00
skodak
f9d5371b28 new function get_coursemodule_from_id() is now used for obtaining of valid $cm from coursemodule id SC#283 2006-08-08 22:09:55 +00:00
stronk7
14e1b02e68 Initial XMLDB schema for chat tables. Using FKs where they are obvious. 2006-08-08 16:59:35 +00:00
moodler
bbbf2d4015 ROLES AND PERMISSIONS - FIRST CHECK-IN
=======================================

WARNING:  DEV IS CURRENTLY VERY UNSTABLE.

This is a mega-checkin of the new Roles system.   A lot of changes have
been made in core and modules.

Currently there are a lot of rough edges and known problems.  We are
working hard on these .. .the reason for getting this into HEAD at this
stage is enable us to move faster (our branch was diverging from HEAD
too much).

Please keep an eye on http://docs.moodle.org/en/Roles for current status
and information for developers on how to use the new Roles system.
2006-08-08 05:13:06 +00:00
skodak
be933850a7 Bug #6176 - locale setting on config variables page not functioning correctly; merged from MOODLE_16_STABLE 2006-07-30 10:39:21 +00:00
martinlanghoff
07b76bad6a chat: Prevent user from submitting a 2nd message before his 1st is received.
Some users reported that mod/chat was silently dropping some messages. The
user's browser may not be able to keep up with the rate at which he submits
chat messages. This update keeps things sane.

Merged from MOODLE_16_STABLE

Author: Donal McMullan <donal@catalyst.net.nz>
2006-07-12 02:29:12 +00:00
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