mjollnir_ [Tue, 23 Nov 2004 01:05:11 +0000 (01:05 +0000)]
Merged from MOODlE_14_STABLE: Fix for invalid sql (for postgres) in cron cleanup of duplicate enrolments. Possibly soon to be overridden by a unique index
mjollnir_ [Tue, 23 Nov 2004 00:16:24 +0000 (00:16 +0000)]
Slight change to log page so that for > 5000 courses or users we don't straight off load the huge drop down menus but instead default to whatever is normally selected, with an option for 'More' to display the full drop down for either. Also includes an Martin L patch for sql query that brought postgres to it's knees (Martin L patch is destined for MOODLE_14_STABLE as well)
martinlanghoff [Mon, 22 Nov 2004 07:46:10 +0000 (07:46 +0000)]
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.
martinlanghoff [Mon, 22 Nov 2004 02:41:41 +0000 (02:41 +0000)]
Enrol/LDAP - initial commit, a bit rough around the edges.
This code is in production in a high-volume environment, so it has already proven to be reliable and scalable. Configuration is still tricky, and some corner cases may or may not be handled elegantly.
martinlanghoff [Mon, 22 Nov 2004 02:36:14 +0000 (02:36 +0000)]
Enrol/LDAP - DB Patches + version bump
These patches add an 'enrol' column to the user_students and user_teachers tables for the enrolment plugins to be able to keep track of source of the enrolments. Follows similar conventions to the user table with its 'auth' field.
This is a merge of the following patches:
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-187
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-192
mjollnir_ [Mon, 22 Nov 2004 01:40:18 +0000 (01:40 +0000)]
On enrol students to a course page, force searching if too many users to display (controlled by MAX_USERS_PER_PAGE - not previously used and bumped up to 1000 as a more reasonable limit) - trying to put 30,000 users in a drop down menu crashes some browsers
defacer [Fri, 19 Nov 2004 02:41:32 +0000 (02:41 +0000)]
Tweaked class MoodleBlock some. Removed a useless function (how did it get in here?)
and renamed handle_config(), print_config() to config_save(), config_print() for
consistency with the new instance_ functions().
defacer [Fri, 19 Nov 2004 02:32:48 +0000 (02:32 +0000)]
First version of the Developer Documentation: Blocks how-to.
Still a bit rough around the edges and definitely will see refining.
Almost killed me, though. I hope it turns out to be useful.
martinlanghoff [Thu, 18 Nov 2004 02:55:06 +0000 (02:55 +0000)]
Merged from MOODLE_14_STABLE moodle--eduforge--1.3.3--patch-335 Now memory_limit can be overriden by higher config settings from php.ini, commandline, httpd.conf, .htaccess
mjollnir_ [Thu, 18 Nov 2004 02:42:33 +0000 (02:42 +0000)]
Replaced prefix_ with CFG->prefix for DROP of indexes before creation because of being inside execute_sql rather than modify_database - exercise module
mjollnir_ [Thu, 18 Nov 2004 02:40:24 +0000 (02:40 +0000)]
Replaced prefix_ with CFG->prefix for DROP of indexes before creation because of being inside execute_sql rather than modify_database - dialogue module
mjollnir_ [Thu, 18 Nov 2004 02:35:42 +0000 (02:35 +0000)]
Replaced prefix_ with CFG->prefix for DROP of indexes before creation because of being inside execute_sql rather than modify_database - attendance module
mjollnir_ [Thu, 18 Nov 2004 02:33:49 +0000 (02:33 +0000)]
Replaced prefix_ with CFG->prefix for DROP of indexes before creation because of being inside execute_sql rather than modify_database - assignment module
martinlanghoff [Thu, 18 Nov 2004 02:31:53 +0000 (02:31 +0000)]
Merged from MOODLE_14_STABLE moodle--eduforge--1.3.3--patch-222 - SQL improvements\n Better SQL performance for get_courses() and get_courses_page() calls, specially from the categories page. This gives much better performance when browsing existing courses
mjollnir_ [Wed, 17 Nov 2004 06:57:28 +0000 (06:57 +0000)]
Merged from MOODLE_14_STABLE:
Fixes to fix_course_sortorder() and course/category.php pages. (martinlanghoff)
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-160
Minor fix: moodle would crash on high number of courses when doing course creation -- should be more scalable now
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-164
Fix a bug I have introduced in fix_course_sortorder() - v2
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-210
Fixed nested transaction in fix_course_sortorder()
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-215
Performance and memory usage fixes for re-sort courses function
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-268
Major performance and correctness improvements in the functions that move courses up and down, reorder by name, and in fix_course_sortorder(). All now assume course-sortorder is unique (this is enforced at the DB)
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-332
fix_coursesortorder() bugfixes and logic simplification
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-333
courses listing enhancements: bugfix on re-ordering, keep the right page on actions