81 Commits

Author SHA1 Message Date
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 & 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
moodler
55e4b5f97d Some cleanups of the admin page to make it
- more explanatory
  - more expandable

Apologies for the lost muscle memories, but I think this
will work better in the long run.
2003-08-10 08:01:14 +00:00
moodler
d2b6ba704e Another big checkin.
This includes some significant cleanups to the new course categories
system.  The basic idea is that the categories/course browser is now
unified under one system, and admin features related to that have
all been moved into the browser (as little icons).

I'm much happier with this as a foundation that can scale and be
built upon.

Still to go:

  - searching
  - paging
  - polishing

Also in here are a lot of little cleanups around the place, such as
the initial setup process.
2003-08-07 16:01:31 +00:00
moodler
dd85cc8189 Fixed missing slashes 2003-07-30 05:21:24 +00:00
moodler
1f33691c86 Cleaned up the initial setup process. It looks a bit smoother now.
Hopefully this is also the end of the occasional errors we keep
hearing about to do with never getting to setup the admin user.
(I think admin/site.php had a redirect that didn't always work).

The setup process is now much better at "trapping" you until it's all done.
2003-05-06 15:58:20 +00:00
moodler
f0eec3b641 Whoops ... left and old line in there during the last fix 2003-04-28 02:43:18 +00:00
moodler
dc2590e587 Don't process $usernew->username if it doesn't exist (prevents normal users from editing profile). 2003-04-27 14:50:03 +00:00
paca70
1e22bc9c04 Conver usernames to lowercase for internal use. This prevent duplicate users
when using external authentication and posgresql.
2003-04-24 20:06:40 +00:00
moodler
de38e2621d More robust use of $_FILES['imagefile'] 2003-04-15 02:08:27 +00:00
moodler
ffb410df03 Sorry, Petri, but we need to undo these changes, because:
- they could break accounts in existing installations
  - strtolower can corrupt strings in multibyte languages

Is it really a problem that usernames are case sensitive on PostgreSQL?
2003-04-01 02:14:16 +00:00
paca70
b398d5ee2a Use always only lowercase version of username.
When using authentication module (ldap, smb, pop etc...) and postgres-database multiple moodle
users were created for usernames like 'Username' 'username' 'userName'
2003-03-31 17:05:52 +00:00
moodler
78e72ed16b Didn't quite finish the last patch of user -> usernew 2003-03-15 09:15:44 +00:00
moodler
e6829515b0 Bug fix from Ray Le Couteur ... alphanumeric check was checking old
username but not the new username
2003-03-15 08:26:00 +00:00
moodler
55271c3047 Removed save_session() - no longer needed 2003-02-27 02:43:34 +00:00
moodler
2c104c0152 Fixed redirection when user not completed yet in some instances when
using external authentication
2003-01-14 14:54:45 +00:00