477 Commits

Author SHA1 Message Date
moodler
7cb29a3dbf just foormatting (checkin by tui!) 2005-02-19 03:14:06 +00:00
moodler
102dc313ea Fixing bug 2588 when server dates are used. 2005-02-19 02:49:31 +00:00
defacer
48a6a7c2c9 Bad boy... broke moodlelib. 2005-02-18 14:45:35 +00:00
defacer
090cf95ae9 Fix for bug 2584:
All floatval() calls changed to (float) casts.
2005-02-18 14:42:04 +00:00
defacer
88ec5b7c8b Reverting back to gmstrftime for userdate() 2005-02-18 13:44:14 +00:00
mjollnir_
876714665d This SHOULD fix the bug where users get unenrolled and reenrolled in metacourses (2579). Needs TESTING PLEASE :) 2005-02-18 02:42:33 +00:00
defacer
57f1191c2e Last changes for DST! Now userdate() supports it as well! :) 2005-02-18 01:18:00 +00:00
defacer
8c0c2e9211 userdate() now transparently supports both new-style (gmdate)
and old-style (strftime) format strings.
2005-02-17 22:59:02 +00:00
defacer
85351042d1 Starting to fix userdate() to recognize DST as well. 2005-02-17 22:43:18 +00:00
defacer
85cafb3e5b DST stuff being worked on. 2005-02-17 21:58:45 +00:00
moodler
d613daf00d Bug fixes for external authentication, from Eagle Eye Eloy! 2005-02-17 09:28:27 +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
02f0527dac Moving closer to DST... this whole thing is so damn _hard_ to grasp... 2005-02-16 22:55:13 +00:00
defacer
42d364974a Fixing stuff I broke with my last commit. 2005-02-16 22:04:14 +00:00
defacer
196f2619c0 Working for DST support. 2005-02-16 21:50:25 +00:00
gustav_delius
ec81373f50 In order to ensure that when a teacher hides a resource or an activity that students really can't get at it, even if they know the direct links to its pages, I have given an optional third argument $cm to the functions require_login() and require_course_login(). Pages showing information about a particular course module now pass the course module object in this third argument. The login functions will then test if either the course module is visible or the user is a teacher. If neither is the case then the user is redirected to the course homepage after being shown a message "Sorry, this activity is currently hidden".
(While I was at it I also turned the autologinguests off for most module pages, except on the index.php pages and the view.php pages for those modules that allow guests)
2005-02-16 10:40:48 +00:00
martinlanghoff
1c66bf597d Fixed bug 2553 - truncate_userinfo() was out-of-sync with prefix_user table definition. Added a reminder to the SQL files. 2005-02-15 23:12:57 +00:00
martinlanghoff
adfc03f90e merged from MOODLE_14_STABLE - trim() user data coming from external auth - now covers cases where we had a space on the truncation limit 2005-02-14 01:30:57 +00:00
martinlanghoff
ca4030dd1d merged from MOODLE_14_STABLE - trim() user data coming from external auth - fixes problems with locked user data in auth/ldap in 1.5 2005-02-14 01:13:05 +00:00
gustav_delius
ea97115290 Fix bug 1905 2005-02-14 00:03:21 +00:00
stronk7
9e5c8dbdf6 The modified include_once was doing really strange things when retrieving
valid themes! Changed to simply include. Seems to work fine now. Please
check it under PHP 4.x...
2005-02-13 22:40:21 +00:00
moodler
b56ccdd9d0 Reformatting some spaces to coding guidelines 2005-02-13 17:38:40 +00:00
gustav_delius
4bd2e69a51 When course is hidden a student trying to enter gets the new message "This course is currently unavailable to students", see bug 2511 2005-02-13 11:43:05 +00:00
moodler
c2145e7845 Use a convert_high_ascii() function to make filenames friendlier. 2005-02-10 13:26:41 +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
mjollnir_
303d0af144 In email processing, change sitesecret (non existant) to (already used) siteidentifier 2005-02-10 07:53:52 +00:00
moodler
1695b68032 New feature: maintenance mode.
Admin can put a site on hold during an upgrade or theme changing etc

Controlled by a file in dataroot, so it can also be controlled via command line:

    touch moodledata/1/maintenance.html

    rm moodledata/1/maintenance.html
2005-02-10 05:11:34 +00:00
defacer
4f0d565da6 Bringing Quiz in line with Martin's "make Chat into a showcase for pages" idea. 2005-02-10 01:59:11 +00:00
moodler
37dfb27974 Moved chat PAGE stuff out of core as an example 2005-02-09 16:44:35 +00:00
defacer
023c4bb737 A new constant for chat pages. 2005-02-09 15:26:43 +00:00
moodler
fb830a1b60 Merged isteacher fix from stable 2005-02-08 07:45:53 +00:00
mjollnir_
0bedb18792 Removing mdl_ in sync_metacourse 2005-02-08 03:39:40 +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
106137d877 Fixed PARAM_ALPHA 2005-02-07 02:13:18 +00:00
fiedorow
9ca3b4f313 Bypass enrolment if guest shortcut for courses that allow guests. 2005-02-05 16:40:38 +00:00
mjollnir_
ee1bef900a Fixing bug 2480 - meta course enrolment 2005-02-05 05:15:16 +00:00
defacer
756e182362 Enforcing the "email type" (text/HTML) user setting at core library level.
With well-written client code this should not be needed, but after getting
burned once I think it's a good idea to make it "smart".
2005-02-05 01:36:55 +00:00
skodak
01accf3efa PARAM_ALPHA now converts to lowercase; merged from MOODLE_14_STABLE 2005-02-03 22:53:49 +00:00
skodak
60ecca3a09 incorrect use of preg_quote(), add '/' to list of quoted chars - see man page; merged from MOODLE_14_STABLE 2005-02-03 19:37:11 +00:00
skodak
f24148ef0f new parameter cleaning PARAM_BOOL and PARAM_ALPHANUM, merged from MOODLE_14_STABLE 2005-02-03 18:14:45 +00:00
defacer
1319096389 Adding a useful mathematical shortcut. 2005-02-02 02:22:56 +00:00
defacer
8bd3fad303 I need those constants a bit more easily accessible. 2005-02-01 07:39:21 +00:00
defacer
fddbcf9c68 Fixing my buggy implementation of isteacherinanycourse().
This fixes bugs 2455, 2456 and maybe some others Eagle Eyes didn't have
the time to find. ;-)
2005-01-31 00:48:23 +00:00
moodler
92318548ce "enrol" field in user_students defaults to $CFG->enrol 2005-01-30 09:14:41 +00:00
defacer
31686aea4c Merged from STABLE:
Stopgap measure for the wrong behavior discussed in SC#87.
I believe this ensures the required behavior, but we may still change
it because it can be confusing...
2005-01-30 04:39:55 +00:00
skodak
14d6c233fb changes in file/path cleaning SC#84, merged from MOODLE_14_STABLE 2005-01-29 15:53:24 +00:00
moodler
865a6f2658 In confirmation emails, use fullname() 2005-01-29 04:54:17 +00:00
moodler
18f16d61ff Fixes notices when username doesn't exist 2005-01-28 16:59:43 +00:00
martinlanghoff
af4e9e5fd4 Merged from MOODLE_14_STABLE - Reverting validation in current_language() due to performance concerns. 2005-01-27 07:10:41 +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