598 Commits

Author SHA1 Message Date
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
defacer
b70b8fe1e0 Adding test for empty db password. 2005-02-08 02:43:36 +00:00
moodler
002f03a172 Allow longtimenosee to be zero 2005-02-07 01:21:50 +00:00
defacer
527d9cddbc First rough version of the "Health Center", so people can play around. 2005-02-07 00:45:41 +00:00
moodler
8b55d08598 Update copyright to 2005 2005-02-01 10:08:26 +00:00
moodler
cdf3925518 Messaging can now be completely disabled using $CFG->messaging 2005-01-31 07:11:42 +00:00
defacer
7542a4e574 Dropping the use of MOODLE_PAGE_COURSE <gasp>!
The new constant is PAGE_COURSE_VIEW, and it's more streamlined with the
new CSS-related ids for 1.5. There are great possibilities for the future
here, so we 're getting ready.

On the other hand, this has to be the ugliest hack I 've ever inflicted
on any program (look at pagelib.php). Thankfully it will only stay for just
a little while.
2005-01-31 02:18:15 +00:00
moodler
3c02d134da Removed $THEME from admin pages 2005-01-25 17:08:05 +00:00
urs_hunkler
29db66d23d Deleted style="text-align: center;" in the surounding DIV 2005-01-25 15:24:11 +00:00
mjollnir_
b61efafba5 Initial checkin for new meta courses feature. Please test!
See http://moodle.org/mod/forum/discuss.php?d=17269 for description.
2005-01-24 22:21:28 +00:00
dhawes
327b622dfa quotes update 2005-01-24 01:21:16 +00:00
defacer
04280e857e Renamed set_user_sesskey() to just sesskey(). SC#74 2005-01-23 22:07:13 +00:00
stronk7
a3f6fc66fe Changed some sesskey behaviours SC#73 (admin part) 2005-01-23 11:49:13 +00:00
stronk7
94ff12c429 Changed some sesskey behaviours SC#73 (admin part)
Plus some minor alignment and CFG->htmleditor not being saved.
2005-01-23 11:26:00 +00:00
stronk7
4530d4372a Changed some sesskey behaviours SC#73 (admin part) 2005-01-22 21:02:12 +00:00
stronk7
7a0a2f49fc Changed some sesskey behaviours SC#73 (admin part) 2005-01-22 20:53:28 +00:00
stronk7
4e27a2b92e Changed some sesskey behaviours SC#73 (admin part) 2005-01-22 19:53:28 +00:00
moodler
0fd764ffe9 Fixed a commented-out error message! 8-o 2005-01-22 16:04:14 +00:00
julmis
773919b17a Added $CFG->aspellpath check in editor_get_dictionaries function. 2005-01-22 11:19:20 +00:00
julmis
19fafd2311 Adding more checkboxes to editor settings (fontname, fontsize, formatblock). 2005-01-22 11:01:34 +00:00
julmis
1bed7afc2b Enhancing editor settings. 2005-01-22 10:58:25 +00:00
moodler
a61b898a30 Ensure that $CFG->siteidentifier is always defined (32-byte key) 2005-01-22 03:27:37 +00:00
moodler
3ace7329a1 Some not-very-significant cleanups while fixing another bug 2005-01-18 18:30:09 +00:00
martinlanghoff
35de9e2487 Ported from MOODLE_14_STABLE - Show a warning to admins if cron.php hasn't been run 2005-01-17 20:59:17 +00:00
moodler
04337d7531 A little utility script to perform search and replace on the whole database.
It's not linked from anywhere yet.

I'm not sure if this will work on PostgreSQL ... can someone test that?
2005-01-16 13:49:30 +00:00
defacer
1a33f699b2 Merging fix for bug 2264 & improvements from MOODLE_14_STABLE 2005-01-12 11:40:46 +00:00
defacer
642fd913d3 Capitalized $user->sessionIP to $USER->sessionIP. Probably was a typo,
considering the comment just above.
2005-01-12 11:33:45 +00:00
fiedorow
06870aa324 fixing a couple of instances of hardcoded /admin/ 2004-12-31 16:12:58 +00:00
defacer
bb4a2e85c0 New features implemented:
* Configurable defaults for the calendar upcoming events lookahead and
   maximum upcoming events displayed (bug #1623)

 * Configurable setting for which days of the week are treated as weekend
   (bug #1919)

 * Configurable setting for which day starts the week (the admin can now set
   this as the default for new users and guests without messing with language
   packs) (no butracker issue)
2004-12-16 18:49:57 +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
mjollnir_
b8b932924b Merged from MOODLE_14_STABLE: Added addslashes back in to username field after splitting it out for lowercasing 2004-12-12 20:43:19 +00:00
moodler
f9f4d999fe Merged recent fixes to FULLME in stable 2004-12-12 06:49:26 +00:00
mjollnir_
6740dd6494 Merged from MOODLE_14_STABLE: Upload users should lowercase username field just as user/edit.php does 2004-12-10 04:16:02 +00:00
moodler
6a0b58b23a Merged lang fix from stable 2004-11-30 03:48:13 +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
defacer
9b12850043 Fix for bug 2241:
I hope this time I got everything changed to the new Page interface! I 'm
really sorry for messing up and breaking new installations... :(

Also moved the only two functions of the API outside the page_base class.
2004-11-29 04:19:05 +00:00
dhawes
a9e91540df replaced old MoodlePage class call with new page_base call 2004-11-29 00:48:28 +00:00
martinlanghoff
b110348b71 Merge from MOODLE_14_STABLE.
Student and teacher enrolments now unique + version bump

Made student and teacher enrolments unique, enforced at the database level. This patch also removes a cleanup job in moodle's cron that removed duplicate enrolments.

Merge of patchset  arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-422
2004-11-24 02:25:36 +00:00
mjollnir_
df7ebd69ab 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 2004-11-23 01:05:11 +00:00
mjollnir_
e6d1d120b1 Merged from MOODLE_14_STABLE: Changes to calls to get_courses to not get all fields 2004-11-22 05:41:14 +00:00
dhawes
7e8dc20869 spacing and quotes cleanup 2004-11-20 19:06:29 +00:00
defacer
a177631062 Updated the configuration-handling logic to the same level as the new instance-
configuration handlers. Much more easy to use and precise.
2004-11-19 03:01:31 +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
0c3e818cb1 Merged from MOODLE_14_STABLE moodle--eduforge--1.3.3--patch-321 Fixed bug in user search: now we trim() the search string 2004-11-18 02:47:02 +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
56c178a754 Merged search trim from stable 2004-11-04 07:15:50 +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
julmis
9597bf1d88 Cleaning xhtml code. 2004-10-16 09:19:34 +00:00
julmis
955dbfaeef Adding hide buttons feature. 2004-10-16 09:11:00 +00:00
moodler
86d7efc345 Changes for XHTML and accessibility compliance 2004-10-15 08:30:30 +00:00