145 Commits

Author SHA1 Message Date
defacer
b030458bee Make very sure that the submitted edit form actually tries to submit a
locked field before deciding to complain.

This may be fixing a bug reported at
http://moodle.org/mod/forum/discuss.php?d=16511, awaiting feedback.
2005-05-01 17:17:06 +00:00
mchurch
fe0a76782f If a user sets their 'Track read/unread posts' personal profile setting to
'No', delete all of their read records.
2005-04-25 00:56:19 +00:00
moodler
a8021f5641 Slight timezone cleanups 2005-04-11 08:01:58 +00:00
moodler
19626cf0a9 Handle forcetimezone correctly (99) 2005-04-10 18:24:06 +00:00
defacer
02a5309439 If $CFG->forcetimezone is not empty, don't allow users to change the timezone from
their profiles, and instead show a disabled menu with the forced timezone selected.

Also, fixed a get_string (reading from wrong lang file).
2005-04-09 09:36:47 +00:00
defacer
02c2881b40 The user Timezone setting now allows both trivial and non-trivial timezones.
I fervently hope we haven't left any hidden "unupdated" code that breaks with this.
2005-04-08 20:28:19 +00:00
moodler
aed2aee4ea Trim all user data 2005-04-08 02:24:09 +00:00
moodler
0e72da1a04 optional_param was being called wrong 2005-04-04 03:42:01 +00:00
defacer
0ed442f85c DST presets -> timezones 2005-03-23 01:54:45 +00:00
moodler
f9a0ea699c New user tabs from Shane and myself ... these bring together the
profile interface a little better.

There is also a new feature for showing all posts from a user, as well
as all discussions from a user.
2005-03-20 12:02:14 +00:00
moodler
04981917cd Other admins cannot edit the primary admin account 2005-03-18 12:11:35 +00:00
moodler
766d2bf3b3 Added user fields for Skype, AIM, Yahoo, and MSN messengers. :-)
If anyone knows good links+images to use for AIM, Yahoo and MSN let me know
2005-03-05 05:57:10 +00:00
gustav_delius
6f07ab6444 Updated calls to get_string() for some strings that were moved to lang/en/admin.php 2005-02-24 08:49:32 +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
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
b77c41c103 Removed some THEME colours 2005-01-25 13:43:09 +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
stronk7
1066e0dc62 Changed some conditions against the $USER variable
to work fine under PHP5.

Bug 2053
(http://moodle.org/bugs/bug.php?op=show&bugid=2053)

Merged from MOODLE_14_STABLE
2004-10-06 16:52:24 +00:00
moodler
1a86eccccd Closed hole when using userid information from form data (merged from STABLE) 2004-09-27 13:26:06 +00:00
moodler
e41ddc4b02 user id and course id are both now optional 2004-09-25 12:53:35 +00:00
moodler
6eb3e776fc Bugfixes for my recent checkin 2004-09-23 04:15:19 +00:00
moodler
a3f1f815a9 OK, finished the fixes I wanted to add to the recent LDAP changes
for user field locking and forcing of password changing

  - Locked user fields always apply (for any authentication method).
    Currently these can only be defined in the LDAP auth screen
    but later these can be brought out as part of the generic
    interface for defining user fields and their behaviour.

  - Fields are now locked using Javascript and will work for any
    user fields that exist (list is not hard coded anymore).

  - Admins can always edit locked fields.

  - Admins can always force a password change.  The checkbox reflects
    the current status of this, and the admin can UNSET the checkbox
    if they want.  It is no longer necessary for the admin to change
    the old password for this to take effect, either.
2004-09-23 03:56:53 +00:00
gustav_delius
8f0cd6ef0f Resolved problems with previous replacement of
& to &amp; and fixed redirect() to entity encode the
inut where needed.
Julian Sedding
2004-09-21 11:41:58 +00:00
moodler
d35757eb25 Merged/cleaned changes from MOODLE_15_LDAP to HEAD ...
please don't use the MOODLE_15_LDAP branch any more.
2004-09-20 09:08:57 +00:00
mjollnir_
9603814743 Small bug fixes for upload class.
These patches are maintained in an publicly accessible Arch repository, see: http://lists.eduforge.org/cgi-bin/archzoom.cgi/arch-eduforge@catalyst.net.nz--2004-MIRROR/moodle--eduforge--1.3.3

Index of arch patches in this commit:

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-75
    2004-09-17 03:19:50 GMT
    Penny Leach <penny@catalyst.net.nz>
    bug fix for upload class related to optional file uploads (like in user/edit.php)
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-76
    2004-09-17 03:23:17 GMT
    Penny Leach <penny@catalyst.net.nz>
    bug fix for upload class related to optional file uploads (like in user/edit.php)
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-77
    2004-09-17 03:42:10 GMT
    Penny Leach <penny@catalyst.net.nz>
    more fixes for upload class

Full logs:

Revision: moodle--eduforge--1.3.3--patch-75
Archive: arch-eduforge@catalyst.net.nz--2004
Creator: Penny Leach <penny@catalyst.net.nz>
Date: Fri Sep 17 15:19:50 NZST 2004
Standard-date: 2004-09-17 03:19:50 GMT
Modified-files: lib/uploadlib.php user/edit.php
New-patches: arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-75
Summary: bug fix for upload class related to optional file uploads (like in user/edit.php)
Keywords:

Revision: moodle--eduforge--1.3.3--patch-76
Archive: arch-eduforge@catalyst.net.nz--2004
Creator: Penny Leach <penny@catalyst.net.nz>
Date: Fri Sep 17 15:23:17 NZST 2004
Standard-date: 2004-09-17 03:23:17 GMT
Modified-files: lib/uploadlib.php
New-patches: arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-76
Summary: bug fix for upload class related to optional file uploads (like in user/edit.php)
Keywords:

Revision: moodle--eduforge--1.3.3--patch-77
Archive: arch-eduforge@catalyst.net.nz--2004
Creator: Penny Leach <penny@catalyst.net.nz>
Date: Fri Sep 17 15:42:10 NZST 2004
Standard-date: 2004-09-17 03:42:10 GMT
Modified-files: lang/en/moodle.php lib/uploadlib.php
New-patches: arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-77
Summary: more fixes for upload class
Keywords:
2004-09-17 04:21:41 +00:00
gustav_delius
839f2456bb XHTML compliance
- fixed (hopefully) all <img> tags
- global replace on <br> to <br />
- &amp; in URLs
- got the forum module XHTML compliant
Julian Sedding
2004-09-16 17:13:57 +00:00
mjollnir_
81d425b43c Integration of new centralised upload code with user profile, and group profile, as well as an enhancement to upload class to be configured to be silent.
These patches are maintained in an publicly accessible Arch repository, see: http://lists.eduforge.org/cgi-bin/archzoom.cgi/arch-eduforge@catalyst.net.nz--2004-MIRROR/moodle--eduforge--1.3.3

Index of arch patches in this commit:

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-66
    2004-09-16 00:03:41 GMT
    Penny Leach <penny@catalyst.net.nz>
    changes to upload class to be silent if we want it to be, integration with editing user profile and group profile (which meant changes in lib/gdlib.php as well as course/group-edit and group.php and user/edit.html and edit.php


Full logs:

Revision: moodle--eduforge--1.3.3--patch-66
Archive: arch-eduforge@catalyst.net.nz--2004
Creator: Penny Leach <penny@catalyst.net.nz>
Date: Thu Sep 16 12:03:41 NZST 2004
Standard-date: 2004-09-16 00:03:41 GMT
Modified-files: course/group-edit.html course/group.php
    lib/gdlib.php lib/uploadlib.php user/edit.html
    user/edit.php
New-patches: arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-66
Summary: changes to upload class to be silent if we want it to be, integration with editing user profile and group profile (which meant changes in lib/gdlib.php as well as course/group-edit and group.php and user/edit.html and edit.php
Keywords:
2004-09-16 00:16:48 +00:00
moodler
f971d5021e XHTML tidy up 2004-09-07 10:18:52 +00:00
moodler
357b5286b8 HTML tidy up 2004-09-07 08:54:43 +00:00
moodler
031c49fabb HTML code tidy up 2004-09-07 08:05:25 +00:00
moodler
85a1d4c9bc Made the check for allowable emails into a new function 2004-09-06 15:21:22 +00:00
moodler
21f0148566 Two new config variables allow certain email addresses to be allowed or not. 2004-09-06 04:38:40 +00:00
moodler
6acfbb4303 Merged slashes fix for clean_text from STABLE 2004-08-28 07:59:41 +00:00
gustav_delius
87f3a895f7 Removed the requirement that the admin has to enter a user desription when creating a new account, see bug 778 2004-05-30 21:55:44 +00:00
stronk7
9d05e26118 Now firstname and lastname fields are trimmed before saving them to db.
This should close Bug 1235
(http://moodle.org/bugs/bug.php?op=show&bugid=1235)
2004-05-15 22:18:53 +00:00
moodler
c9ca1fa5a1 A new option (off by default) will remove restrictions on usernames.
$CFG->extendedusernamechars
2004-05-15 07:30:31 +00:00
moodler
ec67cbf237 User pictures can now be deleted - interface is improved a little 2004-05-01 14:34:21 +00:00
moodler
1aacb5033d Make sure new picture is saved to DB even when form has errors 2004-04-30 04:44:47 +00:00
moodler
36c34ab6f6 Allow some European characters in the username bug 1249 2004-04-27 08:24:04 +00:00
moodler
7721c69499 save_user_image ---> save_profile_image so it works for groups too 2004-02-10 14:24:36 +00:00
moodler
ab39445640 Restrict certain users from changing profile 2004-01-30 08:29:35 +00:00
moodler
999beee0b6 Clean all data in user profile 2004-01-14 13:31:28 +00:00
moodler
951b22a829 Completely got rid of user/lib.php
- print_user() went to weblib.php and got tidied up

  - The graphics functions went to lib/gdlib.php

See Bug 922
2004-01-10 16:41:29 +00:00
moodler
deae201fc6 Fixed missing bracket 2004-01-03 15:41:15 +00:00
moodler
ea229804e1 Added an error message to catch some cases of sessions not working 2004-01-02 14:11:21 +00:00
moodler
003296c476 Fixed a typo (not using $CFG->admin) 2003-12-16 05:31:52 +00:00
moodler
5fde0ca615 Use the new fullname function 2003-11-19 16:15:56 +00:00
moodler
5833a6c8eb The list of countries has finally been moved into the language packs
so it can be translated.

There is now a new function get_list_of_countries() which will return a
sorted array of countries in the best current language.

get_string("AU", "countries")   will also work if needed
2003-09-26 08:04:48 +00:00
moodler
ecac660cd6 Use the new is_internal_auth function 2003-09-22 14:01:45 +00:00
moodler
521d04cf97 Stripslashes off data before adding them to current USER session record 2003-08-30 06:19:44 +00:00