289 Commits

Author SHA1 Message Date
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
moodler
a9fd72322a Reverting some recent date-related changes 2005-02-18 13:43:40 +00:00
defacer
3ffa665bc1 More robust handling of DST status for the user profile. 2005-02-18 03:42:28 +00:00
defacer
7b91e4fd11 Our nice compatibility hack with the language strings means
that some strftime() rebels need patching up...
2005-02-18 01:52:21 +00:00
defacer
4d71c956a8 Adding user profile option for DST.
Also some tabs to spaces.
2005-02-17 21:29:05 +00:00
defacer
80e556ce8a Removing inline styles from table, giving class="formtable"
Removing valign="top" from trs
Changing td align="right" to th
Double quotes to single
2005-02-17 21:16:35 +00:00
moodler
20fde7b1f9 If the user needs to set up their account on logging in, then remember the
URL they wanted so they get there after setting up their account.


bug 2565
2005-02-17 06:15:22 +00:00
defacer
ccfd6c83f3 Fix for bug 2550:
Users cannot see their own profile if course is set to separate groups and
the user is not a member of any group.

Patch provided by cdu@somerville.qld.edu.au, slightly modified
2005-02-15 16:02:18 +00:00
gustav_delius
ec99b88e97 $isteacheredit was not defined 2005-02-13 13:23:46 +00:00
gustav_delius
eb58929bbb Added string 'counteditems' to allow better translation of things like "8 students", see bug 2530 2005-02-13 11:22:48 +00:00
moodler
32e2b30209 This more or less completes the PHP side of the 1.5 themes
Added $user->theme and $course->theme choices, controlled by admin
variables on the main config variables page.

By default this is all turned off, since multiple themes can be
a little disorienting.

A hidden feature is session themes ... you can change the theme
on any page by passing theme=xxxx as a parameter.  By default this
requires sesskey (so that people don't change theme on each other),
but this security can be switched off using a hidden variable
$CFG->allowthemechangeonurl = true;   Good for quick tests.
2005-02-10 10:28:27 +00:00
moodler
e5b02a0878 Fixed a notice 2005-02-10 05:12:27 +00:00
moodler
f8c883ce78 FIxed a notice 2005-02-09 14:45:19 +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
moodler
333f44dab0 Handle longtimenosee of zero 2005-02-07 01:23:44 +00:00
defacer
1610aa4916 Rewriting "!$course->category" to "$course->id == SITEID" to make it clear. 2005-02-05 02:08:25 +00:00
moodler
cdf3925518 Messaging can now be completely disabled using $CFG->messaging 2005-01-31 07:11:42 +00:00
defacer
2107c1f721 Changing the inline centering with an id. 2005-01-31 01:20:43 +00:00
defacer
af04e86a78 Removing deprecated <font> and <center>. 2005-01-31 01:03:41 +00:00
defacer
40d4f7362a Removing <font> tags. I didn't add any styles because there was no
visible difference in text size after the removal.
2005-01-31 01:00:21 +00:00
defacer
686fafc187 Bugfix: don't revert to full details display when clicking on the sorting
links in the table headers. Remain in the display mode you were before.
2005-01-31 00:56:00 +00:00
moodler
ebb906d9da Prevent message window on site policy page 2005-01-30 04:52:13 +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
gustav_delius
ea2d8d8a27 fixed bug in paging bar on participants list 2005-01-24 17:40:47 +00:00
defacer
9407d4563f According to the final comments in SC#65:
Made isteacher() require that the first parameter (course id) be
specified and non-empty. If it is empty, [i.e., 0, which was used to
simulate what has now become isteacherinanycourse()], then the return
value IS correct but a warning is printed on screen. This should allow
us to track down any such calls in legacy modules without breaking Moodle.

The correct way to check for teacher status in ANY course is now to
call isteacherinanycourse().
2005-01-23 21:38:01 +00:00
moodler
2fc1b1feb8 Add messaging buttons to the user profile 2004-12-28 13:49:44 +00:00
defacer
54598fb04e The user editing screen and the change password screen didn't play very
well with debug = on. In fact the change password screen didn't play at all.

Made a few small changes to fix notices and now everything works OK.
Added a missing language string.

*****************
This problem may very well exist in MOODLE_14_STABLE too! Unfortunately I
don't have access to a 1.4 checkout right now, so it will have to wait.
*****************
2004-12-16 17:26:29 +00:00
skodak
e7f927a0fc new handling of uploaded files, please TEST, TEST, TEST 2004-12-14 18:57:51 +00:00
moodler
59b39c7380 Tweaks to the policy form (wider iframe and added a proper question to answer) 2004-11-29 08:10:37 +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
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
moodler
f20ff20449 Merged fix from STABLE to hide hidden teachers in a course with separate groups 2004-11-11 08:10:01 +00:00
skodak
a7668713dd merged from MOODLE_14_STABLE:
initialized $image and moved filemtime after file_exists
2004-11-04 09:34:27 +00:00
moodler
c6c558d785 Merged in changes for lastaccess on site level from stable 2004-10-27 06:01:20 +00:00
paca70
e09ecb0604 Allow password changes with standard password change dialog if
$CFG->{'auth_'.$USER->auth.'_stdchangepassword'} is true.
2004-10-10 06:26:29 +00:00
moodler
3f3a1b360f Main admin can never change their own authentication method from "manual" 2004-10-08 13:15:13 +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
09e8a2f8e8 Changes for XHTML and accessibility compliance 2004-09-23 11:01:22 +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
paca70
c29890b5d8 Some cleanups 2004-09-21 13:20:13 +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
7c7d9120c2 Tidied up some XHTML 2004-09-21 10:52:55 +00:00
paca70
4bde37a18e Removed $user_external and annd isset() around editlocks 2004-09-21 06:09:09 +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