411 Commits

Author SHA1 Message Date
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
mjollnir_
ed040b1f2d Merged from MOODLE_14_STABLE: Recent course/scale optimisations 2004-11-22 05:22:20 +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
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
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
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
paca70
40869b2ead Prevent errors if lang/$lang/moodle.lib does not exists 2004-10-22 11:14:42 +00:00
stronk7
76e2bc3b77 Strip control chars when unzipping.
Merged from MOODLE_14_STABLE
2004-10-17 23:44:16 +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
stronk7
8d67a044b7 Added the optional showstatus parameter to unzip_file() to avoid
sending any output if desired.

Merged from MOODLE_14_STABLE
2004-10-16 16:33:40 +00:00
stronk7
7e6b7f8da2 Latest patches from skodak included in param functions.
Simple and double quotes are out now.
Full paths in unzip are now hidden too.

Please test it. It could have some pending changes yet!

And please, don't forget to move the floating tag in STABLE
when changes are done there!! It causes a lot of problems
when trying to merge later from STABLE to HEAD again.

Merged from MOODLE_14_STABLE.
2004-10-16 11:39:52 +00:00
paca70
f894a7914a auth_iscreator return now three posible values:
null = not supported (Dont change user status)
false =  user not creator
true = user is creator
2004-10-13 07:16:24 +00:00
stronk7
76dc1ad2cf Under Win32, we need backslashes in paths. Now it works!!
Merged from MOODLE_14_STABLE
2004-10-10 23:25:57 +00:00
stronk7
6cf2fe0336 Added some needed strings.
Merged from MOODLE_14_STABLE
2004-10-10 22:48:59 +00:00
stronk7
48eeac7963 Delete some debug info.
Merged from MOODLE_14_STABLE
2004-10-10 22:00:30 +00:00
stronk7
b3020784d6 Central unzip_file() function included:
- Supports both internal and external zip execution.
    - Displays the results of the execution.
    - All Petr's patched added.
    - External zip execution in Win32 supported.
Please TEST, TEST, TEST.

Merged from MOODLE_14_STABLE
2004-10-10 21:46:13 +00:00
stronk7
ef1e97c7ec Now the zip_files() function is working better:
- More checks are done
- Non existing files are out
- Both internal an external are supported and protected
- All Petr's patchs applied
- Included support to Win32 external zip.

TODO: Create a paralel unzip_file() function
      Use this functions in all the FileManager scripts

THOUGHT: External zip seems to work always adding files to
      zip file if it exists, where PclZip resets the file.
      Perhaps a rm (or delete) should be included in the
      command chain. Analyse it!!

Merged from MOODLE_14_STABLE
2004-10-10 01:07:47 +00:00
moodler
3af575075c Merged new stuff from stable 2004-10-08 06:11:17 +00:00
moodler
6d8f47d64f Checked in something that hadn't been 2004-10-08 06:06:03 +00:00
dhawes
761155628f Additional phpdoc comments for get_string and print_string functions - example usage added and argument types documented 2004-10-04 16:44:54 +00:00
moodler
7228f7963f Merged sesskey stuff from stable 2004-10-01 15:06:39 +00:00
moodler
e0d346ff91 Added optional_param and required_param just to get it on the plate 2004-10-01 12:09:52 +00:00
dhawes
2f87145ba2 Further documented new *SECS contants where they are declared as well as in each function that uses them 2004-09-29 18:56:50 +00:00
dhawes
da72d76d30 added '@access private' docblock tags to functions that should not be called directly 2004-09-28 16:40:26 +00:00
moodler
7ecd7c616d Merged parameter function from STABLE (and added phpdoc) 2004-09-28 15:41:36 +00:00
paca70
7a5672c90c Replaced time related "magic numbers" with constants, what are hopefully
more easier to read.
2004-09-28 05:53:08 +00:00
moodler
366dfa6090 New config variable $CFG->tracksessionip will force Moodle to always
check that the user's IP number never changes
2004-09-27 14:35:37 +00:00
moodler
ce791f885e Merged change from STABLE, to fix possible $auth variable problem 2004-09-27 12:52:25 +00:00
gustav_delius
7ecb19bba0 added explanation for format and visible fields in event table 2004-09-25 20:27:15 +00:00
moodler
e351205034 Merged SITEID check for require_login from stable 2004-09-25 15:23:10 +00:00
dhawes
89dcb99da2 More phpdoc work 2004-09-25 05:29:21 +00:00
dhawes
c6d15803f6 Additional phpdoc compatible comments added. 2004-09-25 01:29:37 +00:00
dhawes
8c3dba735b Added more phpdoc comments 2004-09-23 05:10:21 +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
dhawes
7cf1c7bd2b Additional phpdoc comments and fixes for bugs 1981 and 1984 2004-09-23 02:48:41 +00:00
dhawes
b0ccd3fb32 Conversion of double quoted string to single quoted literals. Also added some extra spacing around concatenated strings for easier reading. 2004-09-22 14:39:15 +00:00