Commit graph

11453 commits

Author SHA1 Message Date
mjollnir_
f1f2c12527 Merged from MOODLE_14_STABLE: Update log_display to use postgres friendly concat functions for firstname lastname 2004-11-23 03:53:41 +00:00
mjollnir_
1604a0fc2b Merged from MOODLE_14_STABLE: More small sql tweaks to avoid invalid postgres sql 2004-11-23 02:05:47 +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
mjollnir_
ed040b1f2d Merged from MOODLE_14_STABLE: Recent course/scale optimisations 2004-11-22 05:22:20 +00:00
mjollnir_
b565bbdfe2 Merged from MOODLE_14_STABLE: Fixes in datalib and backuplib for postgres invalid sql 2004-11-22 04:24:30 +00:00
mjollnir_
a967637614 Merged from MOODLE_14_STABLE: modify_database function change - if no ; in single line sql strings, add it 2004-11-22 04:11:07 +00:00
martinlanghoff
911378628f Fixed typo in index name 2004-11-22 02:58:23 +00:00
martinlanghoff
6e8ca9837e Enrol/LDAP - enrol_student() and add_teacher() now populate the 'enrol' field. 2004-11-22 02:38:31 +00:00
martinlanghoff
5cd796869e 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
2004-11-22 02:36:14 +00:00
moodler
72b9f333b9 Merged fix for hiding unneeded sections in course navmenu 2004-11-21 06:28:17 +00:00
defacer
0fa6d31143 Removed a useless space :) 2004-11-20 19:44:28 +00:00
martinlanghoff
c95aa089a8 Merged from MOODLE_14_STABLE: Fixing handling of empty memory_limit for PHP without memory_limit (mostly Windows binaries) 2004-11-20 10:38:43 +00:00
skodak
d52d5a8e85 merged from MOODLE_14_STABLE; updated parameter cleaning, preparation for new file.php SC#5 2004-11-19 21:28:29 +00:00
moodler
75169b06c4 FIxed the call to forum_add_user that was breaking student enrollment 2004-11-18 06:40:11 +00:00
moodler
1734f08ea4 In execute_sql, if feedback is not required then don't even show the
ADOdb feedback.  Makes those careful DROPs look less frightening!  :-)
2004-11-18 03:36:52 +00:00
mjollnir_
275c630a4a Replaced prefix_ with CFG->prefix for DROP of indexes before creation because of being inside execute_sql rather than modify_database - main tables 2004-11-18 02:55:33 +00:00
martinlanghoff
bce7197321 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 2004-11-18 02:55:06 +00:00
martinlanghoff
2b49ae96a6 Merged from MOODLE_14_STABLE moodle--eduforge--1.3.3--patch-305 - Postgres SQL bugfix for instance_is_visible() 2004-11-18 02:37:52 +00:00
martinlanghoff
6315b1c8b6 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 2004-11-18 02:31:53 +00:00
mjollnir_
ffa5f71b4b Merged from MOODLE_14_STABLE:
Add a unique key to guarantee that course,sortorder is unique. Allows fix_course_sortorder and ordering operations to be much faster. (martinlanghoff)

Plus more indexes for user table (mjollnir_)

arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-231
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-236
2004-11-17 07:47:03 +00:00
mjollnir_
17f3e7d05b Merge from MOODLE_14_STABLE: Indexes on faux foreign keys and often used fields, one more set and version bump to come. 2004-11-17 07:09:08 +00:00
mjollnir_
ba87a4daf5 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
2004-11-17 06:57:28 +00:00
mjollnir_
1ed5abc877 Merge from MOODLE_14_STABLE: moodle--eduforge--1.3.3--patch-207(partial) + moodle--eduforge--1.3.3--patch-408 - added begin_sql() and commit_sql() (martinlanghoff) 2004-11-17 05:31:21 +00:00
moodler
bb043e3843 Fixing up any references to obsolete language pack ma_nt 2004-11-15 09:34:04 +00:00
defacer
6b853ff4c7 Oops... fix for the fix :-) 2004-11-12 18:47:39 +00:00
defacer
5715e97bce Fixed a warning which appears if you move a block to a
position which doesn't currently have any blocks.
2004-11-12 18:44:54 +00:00
defacer
c8e0b57900 Pages/blocks code updates:
NEW: The code now supports dynamically plugging your own Pages and block position
identifiers into Moodle without messing with the main libraries at all.

UPDATE: Many functions in blocklib now use pass-by-reference for speed.

UPDATE: Class MoodlePage has been made more presentable and robust.
2004-11-12 18:39:25 +00:00
dhawes
e0134f842c added comments and some spacing cleanup 2004-11-10 16:43:57 +00:00
defacer
f032aa7a5f MAJOR CHANGES:
--------------

Brand-new pagelib.php at your disposal! It slices, it dices, it makes your coffee.
It still doesn't understand women... Read the comments in pagelib.php for a first
impression. Feedback highly encouraged!

Blocks code has undergone significant changes to work with Pages. Flexibility is its
middle name, since I think (without having tried it) that adding e.g. a third
placeholder for "center" blocks in courses, with full support for moving around etc,
will now take about 15 lines of new or edited code. If you are not impressed yet, I
suggest watching a documentary on solar physics. :P

MINOR CHANGES:
--------------

Added instance_allow_config() in the blocks class hierarchy to supplement per-instance
configuration options. You can override it to return true and thus get configuration
amenities without allowing multiple instances.

Minor polishing to comments and documentation (whatever caught my eye was game).

Tightened up some code here and there by utilizing all the new features.

BUGFIXES:
---------

A bug in restore_execute.html caused hidden blocks to not be restored at all.
2004-11-08 19:36:07 +00:00
moodler
80711843ef Copied from stable 2004-11-04 16:58:30 +00:00
moodler
379c6084bd Added sesskey to some buttons 2004-11-04 16:58:00 +00:00
moodler
9b74055f4b Merged pathinfo fix from stable 2004-11-04 07:00:12 +00:00
moodler
d491049d2e Merged from stable 2004-11-03 02:02:15 +00:00
gustav_delius
cdef00de3e Merged from STABLE. Fixed a bug that allowed teachers to upload images of arbitrary size 2004-10-30 22:51:12 +00:00
defacer
21fca825f2 Merging Martin's removal of the <style> allowed tag to HEAD. I tagged the
other version as MERGED, too.
2004-10-29 17:17:57 +00:00
defacer
89a5baaba1 Major cleanups (removed things no longer used by the new backup).
Microsoft must surely be jealous (do more with less).

Fixed a bug: if somehow the block weights in a page become discontinuous,
moving things up and down will slowly improve the situation until it's back
to normal again. It would just fail without notice before.

Fixed a bug: you could add multiple instances from a block that didn't
allow it if, after adding the first, you just hit Refresh in your browser.

Fixed a typo: missing / inside filepath
2004-10-29 16:56:59 +00:00
gustav_delius
2f3b54ae54 Put back call to forum_add_student in enrol_student() that Martin took out by mistake in revision 1.355 2004-10-26 19:53:48 +00:00
moodler
20b57d6aac Fixed minor JS bug in printing out editor configuration 2004-10-26 08:43:41 +00:00
moodler
2a003a903c Changes in the way optgroups are handled for XHTML compatibility 2004-10-26 07:42:08 +00:00
moodler
ccc62c6e42 Fixed typo ... bug 2124 2004-10-25 15:25:58 +00:00
dhawes
a9c75a9caf fix to allow instance configuration for blocks that allow multiple but have been set by the local admin to only display one instance per page 2004-10-25 03:20:02 +00:00
dhawes
27ec21a0f6 some quote cleanup and some spacing added 2004-10-24 15:51:25 +00:00
paca70
40869b2ead Prevent errors if lang/$lang/moodle.lib does not exists 2004-10-22 11:14:42 +00:00
defacer
9b4b78fd6a Da monster-commit of blocks version 2!
Code based on the work of Daryl Hawes for the blog module. Thanks, Daryl!

Please test the hell out of it as it's sure to have issues that need to be
ironed out.
2004-10-19 21:04:28 +00:00
moodler
169fc66a15 Merged small speed improvements from STABLE 2004-10-18 06:00:26 +00:00
stronk7
76e2bc3b77 Strip control chars when unzipping.
Merged from MOODLE_14_STABLE
2004-10-17 23:44:16 +00:00
stronk7
261dac37a6 Now Editor's FileManager is using central zip and unzip functions.
NOTE: What is the courseimages.php file, I haven't tested it because
I didn't find how to do it!

Merged from MOODLE_14_STABLE
2004-10-17 23:11:14 +00:00
stronk7
a095707760 Small change in condition...
Merged from MOODLE_14_STABLE
2004-10-17 22:36:03 +00:00
stronk7
1c1520c5bb Included some filename transformations to work like info-zip.
Directory traversal protection added.

Working under Win32, MacOS X and BSD (and rest of Unix, I hope).

Patch file from Petr. Thanks!

Merger from MOODLE_14_STABLE
2004-10-17 22:28:53 +00:00