449 Commits

Author SHA1 Message Date
moodler
37dfb27974 Moved chat PAGE stuff out of core as an example 2005-02-09 16:44:35 +00:00
defacer
023c4bb737 A new constant for chat pages. 2005-02-09 15:26:43 +00:00
moodler
fb830a1b60 Merged isteacher fix from stable 2005-02-08 07:45:53 +00:00
mjollnir_
0bedb18792 Removing mdl_ in sync_metacourse 2005-02-08 03:39:40 +00:00
mjollnir_
bb64b51aa3 First cut of email to module (or core) processing.
This patch contains:

* email_to_user will set the envelope sender to a special bounce processing address (based on $CFG settings)
* email_to_user will accept (and set) a reply-to header, to be generated by the module calling the function.

* new functions:

	* generate_email_processing_address - ALWAYS use this to generate the reply-to header. reply-to header will look like this:

	(LIMIT: 64 chars total)
	prefix - EXACTLY four chars
	encodeded, packed, moduleid (0 for core) (2 chars)
	up to 42 chars for the modules to put anything they want it (can contain userid (or, eg for forum, postids to reply to), or anything really. 42 chars is ABSOLUTE LIMIT)
	16 char hash (half an md5) of the first part of the address, together with a site "secret"

	* moodle_process_email - any non-module email processing goes here (currently used for processing bounces)

* bounce handling:

	* config settings for bounce threshold and ratio (and whether to handle bounces at all)
	* if too many bounces occur against any given user, user_not_fully_set_up will force an email address change
	* associated functions (over_bounce_threshold, set_send_count, set_bounce_count)

* handling emails to noreply address (see below)

* new script - admin/process_email.php

	This script needs to be called from your mail program for anything starting with the 4 char prefix described above (and optionally, the noreply address)
	It will bounce emails to the noreplyaddress, with a friendly "this is not a real email address" message

	It will break down and unencode the email address into moduleid and validate the half md5 hash, and call $modname_process_email (if it exists). Arguments to these functions are: $modargs (any part of the email address that isn't the prefix, modid or the hash) and the contents of the email (read from STDIN).

* associated string changes/additions

* changes in config-dist.php to give clues as to how to set this up.

MODULE WRITERS!

take a look at new functions moodle_process_email and generate_email_processing_address  in moodlelib.php for ideas about how to

	* encode and unencode the arguments your module needs to do the processing
	* how to deal with multiple "actions" for any given module.

Martin Langhoff <martin@catalyst.net.nz> will be writing up some PROPER documentation, containing amongst other things config settings for different mail servers (this was developed against Postfix).  Feel free to email me with any feedback on the code or design, penny@catalyst.net.nz.  Or post on the developer fourm.
2005-02-08 02:57:14 +00:00
moodler
106137d877 Fixed PARAM_ALPHA 2005-02-07 02:13:18 +00:00
fiedorow
9ca3b4f313 Bypass enrolment if guest shortcut for courses that allow guests. 2005-02-05 16:40:38 +00:00
mjollnir_
ee1bef900a Fixing bug 2480 - meta course enrolment 2005-02-05 05:15:16 +00:00
defacer
756e182362 Enforcing the "email type" (text/HTML) user setting at core library level.
With well-written client code this should not be needed, but after getting
burned once I think it's a good idea to make it "smart".
2005-02-05 01:36:55 +00:00
skodak
01accf3efa PARAM_ALPHA now converts to lowercase; merged from MOODLE_14_STABLE 2005-02-03 22:53:49 +00:00
skodak
60ecca3a09 incorrect use of preg_quote(), add '/' to list of quoted chars - see man page; merged from MOODLE_14_STABLE 2005-02-03 19:37:11 +00:00
skodak
f24148ef0f new parameter cleaning PARAM_BOOL and PARAM_ALPHANUM, merged from MOODLE_14_STABLE 2005-02-03 18:14:45 +00:00
defacer
1319096389 Adding a useful mathematical shortcut. 2005-02-02 02:22:56 +00:00
defacer
8bd3fad303 I need those constants a bit more easily accessible. 2005-02-01 07:39:21 +00:00
defacer
fddbcf9c68 Fixing my buggy implementation of isteacherinanycourse().
This fixes bugs 2455, 2456 and maybe some others Eagle Eyes didn't have
the time to find. ;-)
2005-01-31 00:48:23 +00:00
moodler
92318548ce "enrol" field in user_students defaults to $CFG->enrol 2005-01-30 09:14:41 +00:00
defacer
31686aea4c Merged from STABLE:
Stopgap measure for the wrong behavior discussed in SC#87.
I believe this ensures the required behavior, but we may still change
it because it can be confusing...
2005-01-30 04:39:55 +00:00
skodak
14d6c233fb changes in file/path cleaning SC#84, merged from MOODLE_14_STABLE 2005-01-29 15:53:24 +00:00
moodler
865a6f2658 In confirmation emails, use fullname() 2005-01-29 04:54:17 +00:00
moodler
18f16d61ff Fixes notices when username doesn't exist 2005-01-28 16:59:43 +00:00
martinlanghoff
af4e9e5fd4 Merged from MOODLE_14_STABLE - Reverting validation in current_language() due to performance concerns. 2005-01-27 07:10:41 +00:00
martinlanghoff
b6c93894fb Merged from MOODLE_14_STABLE - Stronger validation of form data in user/edit, and validation of lang in current_language() -- closes SC#67 2005-01-27 03:51:33 +00:00
moodler
538a22102b Removed some THEME stuff 2005-01-25 17:39:55 +00:00
defacer
bb8bbc7457 Giving a name to ML's baby ;-)
No, seriously, defining a suitable named constant for PARAM_LOCALURL (SC#54)
2005-01-25 13:35:14 +00:00
martinlanghoff
7744ea12b0 Merged from MOODLE_14_STABLE - clean_param() now handles PARAM_URL 2005-01-25 06:09:39 +00:00
martinlanghoff
371a2ed0e5 Merged from MOODLE_14_STABLE - clean_param() now handles PARAM_HOST (old pending merge) 2005-01-25 06:08:06 +00:00
mjollnir_
5f37b628ae Update for meta courses. New table renamed from meta_course to course_meta (and upgrade script provided in mysql.php and postgres7.php) and new field in course table renamed from meta_course to metacourse. Associated changes in code. Please test me! 2005-01-25 04:33:02 +00:00
mjollnir_
b61efafba5 Initial checkin for new meta courses feature. Please test!
See http://moodle.org/mod/forum/discuss.php?d=17269 for description.
2005-01-24 22:21:28 +00:00
defacer
04280e857e Renamed set_user_sesskey() to just sesskey(). SC#74 2005-01-23 22:07:13 +00:00
defacer
9407d4563f According to the final comments in SC#65:
Made isteacher() require that the first parameter (course id) be
specified and non-empty. If it is empty, [i.e., 0, which was used to
simulate what has now become isteacherinanycourse()], then the return
value IS correct but a warning is printed on screen. This should allow
us to track down any such calls in legacy modules without breaking Moodle.

The correct way to check for teacher status in ANY course is now to
call isteacherinanycourse().
2005-01-23 21:38:01 +00:00
moodler
108adee2ff User preferences were not getting set! 2005-01-23 02:30:15 +00:00
defacer
1a33f699b2 Merging fix for bug 2264 & improvements from MOODLE_14_STABLE 2005-01-12 11:40:46 +00:00
defacer
9f1f6dafa4 Added some COMMENTED experimental code in make_timestamp (behavior doesn't
change at all), and one more optional parameter.

Changed usergetdate() to work with gmdate() instead of gmstrftime().

Small update of the PHPdoc info for get_current_group().
2005-01-12 11:17:18 +00:00
stronk7
dc0426bd83 Take out some double-slashes (//) in paths to langfiles and
included one more file_exists() check to avoid tons of
warnings when looking for files under dataroot mainly.
2005-01-11 12:24:37 +00:00
moodler
2765411a34 New and upgraded sites will be given a default .htaccess file in their
dataroot directory SC#64
2005-01-10 15:26:43 +00:00
moodler
d0dc2b989c Moodle now supports language packs found under dataroot/lang (they
take priority over all other locations).

Later we can add support to download language packs from within Moodle,
and edit/manage new packs more easily.
2005-01-10 14:11:13 +00:00
moodler
13af52a6d3 When using set_user_preference on other people, don't change the preference in $USER 2005-01-06 12:50:03 +00:00
moodler
e608dddda5 Message windows now popup from any page 2004-12-30 12:54:22 +00:00
moodler
d99bab2d1d Some changes that may help on safe mode ... see bug 2093
The new directory permissions maintain group mode better,
and the manual chown is now removed to prevent safe mode
from getting upset.
2004-12-26 14:45:39 +00:00
moodler
089e9eae78 Added trick to allow sesskey to be ignored in certain cases
(helps with XHTML testing)
2004-12-22 02:54:47 +00:00
defacer
86f092d25e New "Calendar" section in Admin -> Configuration.
Includes preliminary support for DST!
Includes "admin sees all events or only own?" setting (bug 1972)

WARNING: Modified moodlelib.php to explicitly specify NOT-DST when
calling mktime() and gmmktime(). This is essential since we don't want
PHP to second-guess us for the DST matters, but... it may affect existing
code?
2004-12-15 07:14:41 +00:00
moodler
4ed533dfaf Added a function to add a user to a group 2004-12-14 08:05:49 +00:00
moodler
f9f4d999fe Merged recent fixes to FULLME in stable 2004-12-12 06:49:26 +00:00
moodler
6b94a807d2 Merged new MOODLE_INTERNAL constant from stable, used to prevent
direct access to some scripts
2004-12-12 04:33:13 +00:00
defacer
070e261647 Fixed set_user_preference to make changes immediately available ($user was lowercased)
Updated all user preferences functions to behave well even if $USER or $USER->id is not defined
2004-12-01 21:47:02 +00:00
moodler
957b51989c After agreeing to site policy, you get redirected back to where you
were going.

Also, guests get asked to agree for EVERY SESSION.
2004-11-29 06:22:12 +00:00
moodler
027a160469 New feature: Site Policy Agreements.
If the admin specifies a Policy Agreement (via URL in the config variables)
then each user is required to see and agree to that document once before
continuing.

To get everyone to see it again (on an update, say) one just needs to issue:

   UPDATE user SET policyagreed = 0
2004-11-29 05:30:36 +00:00
martinlanghoff
9530c61dbf Merge from MOODLE_14_STABLE
raise_memory() now uses get_real_size(), duplicate function return_bytes() removed.

Issue discussed in 2202 (http://moodle.org/bugs/bug.php?op=show&bugid=2202).
Also seen as arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-424
2004-11-24 03:56:39 +00:00
julmis
361855e6e7 Adding support for Mac OS X Camino browsers see bug #2176 2004-11-22 18:38:33 +00:00
martinlanghoff
b36a8fc4f5 Auth/LDAP
Bugfix - value truncation to fit Moodle database
- Added truncate_userinfo() to cleanup data coming from external auth
- Fixed auth_user_create() to truncate user info as appropriate

Auth_ldap_user_sync
- created external script that calls the function
- much faster update strategy on postgres and mysql: auth_sync_users now to uses bulk inserts into a temp table, and then use LEFT JOINs and plain old SELECTs to determine what users it has to insert.
- we now loop over smaller sets of data -- we are still memory-bound, but (a) it'll be easy to use LIMIT to manage that and (b) memory use is much lower now in all cases.
- postgres: phased commits in auth_user_sync() for the batch user upload phase
- Several feature and performance enhancements:
  - if a value is removed from ldap, it will be cleared from moodle
  - no-op updates (where the data does not change) are skipped
  - if a user disappears and then reappears in LDAP in two separate calls to auth_user_sync(),the account will be marked deleted and then be revived. before, the account would have been deleted and created anew.

Multi-source ldap values:

The LDAP auth module now accepts a comma separated set of LDAP field names. When creating or updating a user record, auth/ldap will retrieve all the relevant fields. The right-most values overwrites all the others.

This is particularly useful when updating the user's email address from an LDAP source, which may contain the email address in one of several fields (traditionally: mail, mailForwardingAddress, mailAlternateAddress).

If a value is updated and is set to update external auth and this field is using this multi-source ldap configuration, the auth/ldap module will retrieve the old value, find which field it was sourced from, and update that field in LDAP. If it fails to find the original source of the value, it will log it in error_log.


Log of patchsets applied:
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-131
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-137
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-139
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-172
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-173
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-189
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-190
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-208
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-212
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-216
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-279
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-282
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-287
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-294
2004-11-22 07:46:10 +00:00