moodle.git
13 years agofixing header/formatting
toyomoyo [Tue, 20 Nov 2007 05:16:11 +0000 (05:16 +0000)]
fixing header/formatting

13 years agoAutomatic installer.php lang files by installer_builder (20071120)
moodler [Tue, 20 Nov 2007 05:05:51 +0000 (05:05 +0000)]
installer.php lang files by installer_builder (20071120)

13 years agoMDL-12234, fixing unicode issues with global search
toyomoyo [Tue, 20 Nov 2007 04:12:18 +0000 (04:12 +0000)]
MDL-12234, fixing unicode issues with global search

13 years agoMDL-12255 Adding questiontext decoding and subquestions validation when editing
pichetp [Tue, 20 Nov 2007 03:50:28 +0000 (03:50 +0000)]
MDL-12255 Adding questiontext decoding and subquestions validation when editing

13 years agoSolving MDL-12063 qtype_questions where left orphans when questions whe deleted or
pichetp [Tue, 20 Nov 2007 03:48:29 +0000 (03:48 +0000)]
Solving MDL-12063 qtype_questions where left orphans when questions whe deleted or
 qtype change

13 years agoMDL-12264 - course/info: check if course is hidden before displaying info about it.
mattc-catalyst [Tue, 20 Nov 2007 02:32:09 +0000 (02:32 +0000)]
MDL-12264 - course/info: check if course is hidden before displaying info about it.

Author: Matt Clarkson <mattc@catalyst.net.nz>

13 years agoMDL-12142 mailout-debugger: Now works on Windows too
martinlanghoff [Tue, 20 Nov 2007 00:31:40 +0000 (00:31 +0000)]
MDL-12142 mailout-debugger: Now works on Windows too

Switched to use sys_get_temp_dir() to define
which tempdir to use.

13 years agoaccesslib: has_capability_in_accessdata() respects rdef locality a bit more
martinlanghoff [Tue, 20 Nov 2007 00:18:31 +0000 (00:18 +0000)]
accesslib: has_capability_in_accessdata() respects rdef locality a bit more

With this patch, we respect rdef locality when two roles
assignments in the same context have conflicting rdefs.
In that case, the most local rdef wins.

So RA locality still matters most. If you are a teacher
sitewide and a student in course X, student role trumps
teacher.

For a use case, see the discussion here
http://moodle.org/mod/forum/discuss.php?d=84472

Notes:

- If we wanted to have locality of RDEF trump everything
  we can. A comment in this patch shows how.

- I don't know how to reproduce this in pure SQL.

And Also:

This patch also fixes a bug where if CAP_PROHIBIT was set
_and_ another role added to it in the same context, we would
add or substract 1 to CAP_PROHIBIT, and it would lose its magic.

And while at it, tighten the code to avoid casts. All the
ints are unambiguously ints.

13 years agoSome question formating...
stronk7 [Tue, 20 Nov 2007 00:10:05 +0000 (00:10 +0000)]
Some question formating...

Merged from MOODLE_19_STABLE

13 years agoMDL-12249 fixed distribution for small groups; merged from MOODLE_19_STABLE
skodak [Mon, 19 Nov 2007 22:55:39 +0000 (22:55 +0000)]
MDL-12249 fixed distribution for small groups; merged from MOODLE_19_STABLE

13 years agoMDL-12249 fixed small group ration, can be overriden from config.php now; merged...
skodak [Mon, 19 Nov 2007 21:41:02 +0000 (21:41 +0000)]
MDL-12249 fixed small group ration, can be overriden from config.php now; merged from MOODLE_19_STABLE

13 years agoMDL-12249 groups UI cleanup and improvements - see tracker for details; merged from...
skodak [Mon, 19 Nov 2007 20:31:57 +0000 (20:31 +0000)]
MDL-12249 groups UI cleanup and improvements - see tracker for details; merged from MOODLE_19_STABLE

13 years agofix some keys
diml [Mon, 19 Nov 2007 20:09:38 +0000 (20:09 +0000)]
fix some keys

13 years agoFixes for bug MDL-12256, "Course AJAX has very poor accessibility - ALT text" (includ...
nfreear [Mon, 19 Nov 2007 17:22:04 +0000 (17:22 +0000)]
Fixes for bug MDL-12256, "Course AJAX has very poor accessibility - ALT text" (includes white-space cleanup).

13 years agoFixes for bug MDL-12256, "Course AJAX has very poor accessibility - ALT text".
nfreear [Mon, 19 Nov 2007 17:21:28 +0000 (17:21 +0000)]
Fixes for bug MDL-12256, "Course AJAX has very poor accessibility - ALT text".

13 years agoInitial fix for MDL-12256, "Course AJAX has very poor accessibility - ALT text" ...
nfreear [Mon, 19 Nov 2007 15:25:16 +0000 (15:25 +0000)]
Initial fix for MDL-12256, "Course AJAX has very poor accessibility - ALT text" - test, imgAttributes.length NOT attributes.length.

13 years agoMDL-12075 Display individually colour-coded events in calendar rather than random...
sam_marshall [Mon, 19 Nov 2007 10:53:23 +0000 (10:53 +0000)]
MDL-12075 Display individually colour-coded events in calendar rather than random day colours

13 years agoMerged from 1.9
moodler [Mon, 19 Nov 2007 07:13:02 +0000 (07:13 +0000)]
Merged from 1.9

Improvements to the tabs for assigning and overriding roles.   MDL-12120

Tabs are now all on the top row
Tabs have clearer titles
Other help texts improved

13 years agoMerged fixes for override colouring MDL-12248
moodler [Mon, 19 Nov 2007 06:59:19 +0000 (06:59 +0000)]
Merged fixes for override colouring    MDL-12248

13 years agoMDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddent...
scyrma [Mon, 19 Nov 2007 04:44:08 +0000 (04:44 +0000)]
MDL-3632 : this prevents people without mod/forum:viewhiddentimedposts to see hiddentimedposts.

13 years agoMDL-12218, display course specific role names on override page
toyomoyo [Mon, 19 Nov 2007 04:36:21 +0000 (04:36 +0000)]
MDL-12218, display course specific role names on override page

13 years agochanged to get_recordset_sql because get_records forces the first element to be$
toyomoyo [Mon, 19 Nov 2007 04:13:15 +0000 (04:13 +0000)]
changed to get_recordset_sql because get_records forces the first element to be$

13 years agouser_login() was not converted to using get_cache_flags().
martinlanghoff [Mon, 19 Nov 2007 02:43:48 +0000 (02:43 +0000)]
user_login() was not converted to using get_cache_flags().

It was still using the 'old' get_config() interface, so the 'cookie'
set by ntlmsso_finish() wasn't retrieved at all, and the automatic
login always failed.

Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>

13 years agoIf the cache flag is not set, it doesn't make sense trying to test its value
martinlanghoff [Mon, 19 Nov 2007 02:43:34 +0000 (02:43 +0000)]
If the cache flag is not set, it doesn't make sense trying to test its value

Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>

13 years agoFix typo in ntlmsso_finish()
martinlanghoff [Mon, 19 Nov 2007 02:43:16 +0000 (02:43 +0000)]
Fix typo in ntlmsso_finish()

Signed-off-by: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Author: Iñaki Arenaza <iarenuno@eteo.mondragon.edu>
Committer: Martin Langhoff <martin@catalyst.net.nz>

13 years agomerged fix for MDLSITE-294, needs a forced type cast
toyomoyo [Mon, 19 Nov 2007 02:25:22 +0000 (02:25 +0000)]
merged fix for MDLSITE-294, needs a forced type cast

13 years agoMDL-12172: fixed get parameters not being submitted in Firefox
mattc-catalyst [Mon, 19 Nov 2007 01:45:45 +0000 (01:45 +0000)]
MDL-12172: fixed get parameters not being submitted in Firefox

Author: Matt Clarkson <mattc@catalyst.net.nz>

13 years agochanged to get_recordset_sql because get_records forces the first element to be key
toyomoyo [Mon, 19 Nov 2007 01:44:26 +0000 (01:44 +0000)]
changed to get_recordset_sql because get_records forces the first element to be key

13 years agomaking a SQL cross-db compatible
toyomoyo [Mon, 19 Nov 2007 01:13:31 +0000 (01:13 +0000)]
making a SQL cross-db compatible

13 years agoMerging unmerged code. MDL-11743 and MDL-11671
stronk7 [Sun, 18 Nov 2007 17:12:58 +0000 (17:12 +0000)]
Merging unmerged code. MDL-11743 and MDL-11671

13 years agoMDL-11099 and MDL-11655 Don't show external db password in clear
iarenaza [Sun, 18 Nov 2007 12:45:21 +0000 (12:45 +0000)]
MDL-11099 and MDL-11655 Don't show external db password in clear

13 years agoAutomatic installer.php lang files by installer_builder (20071118)
moodler [Sun, 18 Nov 2007 04:36:52 +0000 (04:36 +0000)]
installer.php lang files by installer_builder (20071118)

13 years agoMDL-12231 fixed applying of CFG defaults during initial install phase; merged from...
skodak [Sat, 17 Nov 2007 21:21:37 +0000 (21:21 +0000)]
MDL-12231 fixed applying of CFG defaults during initial install phase; merged from MOODLE_19_STABLE

13 years agofixed typo throwing warnings during install; merged from MOODLE_19_STABLE
skodak [Sat, 17 Nov 2007 20:55:44 +0000 (20:55 +0000)]
fixed typo throwing warnings during install; merged from MOODLE_19_STABLE

13 years agoMDL-12041 fixed groupmode flag in cm when mode forced in course; merged from MOODLE_1...
skodak [Sat, 17 Nov 2007 17:41:28 +0000 (17:41 +0000)]
MDL-12041 fixed groupmode flag in cm when mode forced in course; merged from MOODLE_19_STABLE

13 years agoMDL-10888 parent definition_after_data() must be called too!; merged from MOODLE_19_S...
skodak [Sat, 17 Nov 2007 16:53:39 +0000 (16:53 +0000)]
MDL-10888 parent definition_after_data() must be called too!; merged from MOODLE_19_STABLE

13 years agoMDL-12221 initialised $output and fixed whitespace; merged from MOODLE_19_STABLE
skodak [Sat, 17 Nov 2007 16:37:00 +0000 (16:37 +0000)]
MDL-12221 initialised $output and fixed whitespace; merged from MOODLE_19_STABLE

13 years agoMDL-12199 problem with "Show advanced" used after pressing of enter in forms; merged...
skodak [Sat, 17 Nov 2007 13:30:15 +0000 (13:30 +0000)]
MDL-12199 problem with "Show advanced" used after pressing of enter in forms; merged from MOODLE_19_STABLE

13 years agoMDL-12146 merged recent changes from normal item to outcome form; merged from MOODLE_...
skodak [Fri, 16 Nov 2007 22:15:25 +0000 (22:15 +0000)]
MDL-12146 merged recent changes from normal item to outcome form; merged from MOODLE_19_STABLE

13 years agoMDL-12200 fixed problems when no custom user fields defined; merged from MOODLE_19_STABLE
skodak [Fri, 16 Nov 2007 22:12:04 +0000 (22:12 +0000)]
MDL-12200 fixed problems when no custom user fields defined; merged from MOODLE_19_STABLE

13 years agoMDL-12226 forum index page not always displaying forum links or subscription buttons...
dwoolhead [Fri, 16 Nov 2007 17:03:06 +0000 (17:03 +0000)]
MDL-12226 forum index page not always displaying forum links or subscription buttons as expected

13 years agoFixes bug MDL-12225, Mark up lists correctly in course/lib (accessibility).
nfreear [Fri, 16 Nov 2007 16:47:54 +0000 (16:47 +0000)]
Fixes bug MDL-12225, Mark up lists correctly in course/lib (accessibility).

13 years agoMDL-11979 Forum subscriptions loop hole allowing users to subscribe to forums they...
dwoolhead [Fri, 16 Nov 2007 16:31:00 +0000 (16:31 +0000)]
MDL-11979 Forum subscriptions loop hole allowing users to subscribe to forums they should not have access to.

13 years agoRemoved styles_layout.css from theme oceanblue.
mits [Fri, 16 Nov 2007 14:51:34 +0000 (14:51 +0000)]
Removed styles_layout.css from theme oceanblue.
Updated config.php for theme oceanblue.

13 years agomerged from 1.9 :: MDL-12221 :: example: adding custom_corners to the info box on...
urs_hunkler [Fri, 16 Nov 2007 14:21:58 +0000 (14:21 +0000)]
merged from 1.9 :: MDL-12221 :: example: adding custom_corners to the info box on the forum page.

13 years agomerged form 1.9 :: MDL-12221 :: new CSS rules for the custom_corners boxes.
urs_hunkler [Fri, 16 Nov 2007 14:19:13 +0000 (14:19 +0000)]
merged form 1.9 :: MDL-12221 :: new CSS rules for the custom_corners boxes.
And MDL-9306 :: splitted comma sepearted rules to 2 separate rules.

13 years agomerged from 1.9 :: MDL-12221 :: Added wrapper functions for print_box, print_box_star...
urs_hunkler [Fri, 16 Nov 2007 13:33:51 +0000 (13:33 +0000)]
merged from 1.9 :: MDL-12221 :: Added wrapper functions for print_box, print_box_start and print_box_end to be able to add custom_corners to any boxes.

If you call print_custom_corners_box with the same parameters as print_box and custom_corners is enabled you get the custom corners divs within those boxes and can style them accordingly.

13 years agoMDL-12096 changed label of parent cat, merged from MOODLE_19_STABLE
skodak [Fri, 16 Nov 2007 07:36:18 +0000 (07:36 +0000)]
MDL-12096 changed label of parent cat, merged from MOODLE_19_STABLE

13 years agomerged from 1.9 :: MDL-12045 :: the extra "clearer" div broke the custom_corners...
urs_hunkler [Fri, 16 Nov 2007 07:29:14 +0000 (07:29 +0000)]
merged from 1.9 :: MDL-12045 :: the extra "clearer" div broke the custom_corners theme on IE7. I removed the "clearer" div and added the class "clerafix" to the surrounding coursebox.

13 years agoMDL-12215 made the advanced search tab more consistent with the interface
moodler [Fri, 16 Nov 2007 05:56:20 +0000 (05:56 +0000)]
MDL-12215 made the advanced search tab more consistent with the interface

13 years agoMDL-12121, fixing a warning
toyomoyo [Fri, 16 Nov 2007 04:24:57 +0000 (04:24 +0000)]
MDL-12121, fixing a warning

13 years agoFix to a bug preventing rss feeds from displaying.
scyrma [Fri, 16 Nov 2007 03:34:05 +0000 (03:34 +0000)]
Fix to a bug preventing rss feeds from displaying.

13 years agoMDL-12187, fixing grader report style
toyomoyo [Fri, 16 Nov 2007 03:09:20 +0000 (03:09 +0000)]
MDL-12187, fixing grader report style

13 years agoMDL-11672, hide hidden assignment descriptions from calendar
toyomoyo [Fri, 16 Nov 2007 02:52:48 +0000 (02:52 +0000)]
MDL-11672, hide hidden assignment descriptions from calendar

13 years agoMDL-12182 More grade_item unit tests
nicolasconnault [Thu, 15 Nov 2007 23:27:55 +0000 (23:27 +0000)]
MDL-12182 More grade_item unit tests

13 years agoMDL-12096 new simple weighted mean aggregation type; merged from MOODLE_18_STABLE
skodak [Thu, 15 Nov 2007 22:30:01 +0000 (22:30 +0000)]
MDL-12096 new simple weighted mean aggregation type; merged from MOODLE_18_STABLE

13 years agoMDL-12146 grade item settings can be now configured as advanced, new advanced default...
skodak [Thu, 15 Nov 2007 17:32:31 +0000 (17:32 +0000)]
MDL-12146 grade item settings can be now configured as advanced, new advanced defaults, minor tweaks in admintree; merged from MOODLE_18_STABLE

13 years agomerged from 1.9 :: MDL-12195 :: added closing '>' in line 157.
urs_hunkler [Thu, 15 Nov 2007 16:37:44 +0000 (16:37 +0000)]
merged from 1.9 :: MDL-12195 :: added closing '>' in line 157.

13 years agoMDL-12140 weights/extrapoints are never advanced
skodak [Thu, 15 Nov 2007 15:43:39 +0000 (15:43 +0000)]
MDL-12140 weights/extrapoints are never advanced

13 years agoMDL-12016 Category text not being sent to 'create_category_path'.
mchurch [Thu, 15 Nov 2007 14:05:17 +0000 (14:05 +0000)]
MDL-12016 Category text not being sent to 'create_category_path'.

13 years agoMDL-12015 Import question count was wrong.
mchurch [Thu, 15 Nov 2007 13:43:51 +0000 (13:43 +0000)]
MDL-12015 Import question count was wrong.

13 years agomerged from 1.9 :: MDL-12191 :: workaround with JavaScript to add "haslayouttabel...
urs_hunkler [Thu, 15 Nov 2007 12:21:09 +0000 (12:21 +0000)]
merged from 1.9 :: MDL-12191 :: workaround with JavaScript to add "haslayouttabel" class to body.

13 years agomerged from 1.9 :: changed the form lable look.
urs_hunkler [Thu, 15 Nov 2007 12:18:32 +0000 (12:18 +0000)]
merged from 1.9 :: changed the form lable look.

13 years agoMDL-12161 Stripped slashes in LO titles
bobopinna [Thu, 15 Nov 2007 08:37:11 +0000 (08:37 +0000)]
MDL-12161 Stripped slashes in LO titles

13 years agoMDL-12140 category can be selected when adding new items or categories; merged from...
skodak [Thu, 15 Nov 2007 08:29:12 +0000 (08:29 +0000)]
MDL-12140 category can be selected when adding new items or categories; merged from MOODLE_19_STABLE

13 years agoMDL-12180, blocks capabilities not appearing when overriding block roles
toyomoyo [Thu, 15 Nov 2007 07:46:04 +0000 (07:46 +0000)]
MDL-12180, blocks capabilities not appearing when overriding block roles

13 years agoMDL-12182 Only testgradeitem.php isn't yet completed.
nicolasconnault [Thu, 15 Nov 2007 06:44:26 +0000 (06:44 +0000)]
MDL-12182 Only testgradeitem.php isn't yet completed.

13 years agoMDL-8270, full block backup/restore routine with code
toyomoyo [Thu, 15 Nov 2007 05:00:44 +0000 (05:00 +0000)]
MDL-8270, full block backup/restore routine with code

13 years agoFix for MDL-10996 : prevent course name from being displayed twice.
scyrma [Thu, 15 Nov 2007 04:04:21 +0000 (04:04 +0000)]
Fix for MDL-10996 : prevent course name from being displayed twice.

13 years agoMDL-11401, merged from 19_STABLE
scyrma [Thu, 15 Nov 2007 02:39:43 +0000 (02:39 +0000)]
MDL-11401, merged from 19_STABLE

13 years agoMDL-8330, adding a warning to translators about updating of lang packs
toyomoyo [Thu, 15 Nov 2007 01:18:47 +0000 (01:18 +0000)]
MDL-8330, adding a warning to translators about updating of lang packs

13 years agoMDL-9399 - auth/ldap: Strings for NTLM SSO - forgot one
martinlanghoff [Wed, 14 Nov 2007 22:47:30 +0000 (22:47 +0000)]
MDL-9399 - auth/ldap: Strings for NTLM SSO - forgot one

13 years agoMDL-9399 auth/ldap: Strings for NTLM SSO
martinlanghoff [Wed, 14 Nov 2007 22:43:56 +0000 (22:43 +0000)]
MDL-9399 auth/ldap: Strings for NTLM SSO
cvs: ----------------------------------------------------------------------

13 years agoMDL-12178 auth/ldap: "creators" role assignment now also supports contexts
martinlanghoff [Wed, 14 Nov 2007 22:23:45 +0000 (22:23 +0000)]
MDL-12178 auth/ldap: "creators" role assignment now also supports contexts

Now the DNs that indicate a course-creator role can also be contexts.
This way we support one more widely used practice in the weird and
wonderful LDAP world...

13 years agoMDL-9399 - auth/ldap NTLM SSO - fix missing global
martinlanghoff [Wed, 14 Nov 2007 22:17:58 +0000 (22:17 +0000)]
MDL-9399 - auth/ldap NTLM SSO - fix missing global

13 years agoMDL-9399 auth/ldap: NTLM temp sessions now use cache_flags
martinlanghoff [Wed, 14 Nov 2007 22:12:57 +0000 (22:12 +0000)]
MDL-9399 auth/ldap: NTLM temp sessions now use cache_flags

cache_flags is now the apropriate way to manage this kind of temp
data. It gives us time expiry and GC for free, so it's a perfect fit
for the job, as it simplifies the code a bit.

13 years agoMDL-9399 auth/ldap: NTLM SSO - fix hardcoded strings
martinlanghoff [Wed, 14 Nov 2007 22:12:25 +0000 (22:12 +0000)]
MDL-9399 auth/ldap: NTLM SSO - fix hardcoded strings

From Iñaki Arenaza
And here is a little patch with the last remaining non-traslated
strings (unless I missed something).

13 years agoMDL-9399 auth/ldap: NTLM SSO - move textlib conversion earlier
martinlanghoff [Wed, 14 Nov 2007 22:12:07 +0000 (22:12 +0000)]
MDL-9399 auth/ldap: NTLM SSO - move textlib conversion earlier

From Iñaki Arenaza - fix for

... I forgot to put the textlib conversion
call before the block of code that uses $extusername, so it
completely breaks the user validation process.

13 years agoMDL-9399 auth/ldap: NTLM SSO - cleanup of sesskey handling
martinlanghoff [Wed, 14 Nov 2007 22:11:48 +0000 (22:11 +0000)]
MDL-9399 auth/ldap: NTLM SSO - cleanup of sesskey handling

Fix a bug in ntlmsso_finish(), and tighten up user_login() to avoid a
pointless DB lookup if the password doesn't match the sesskey.

Hopefully this makes things work again...
(thanks I~naki for the testing!)

13 years agoMDL-9399 auth/ldap: NTLM SSO - use sesskey and other tidyups
martinlanghoff [Wed, 14 Nov 2007 22:11:35 +0000 (22:11 +0000)]
MDL-9399 auth/ldap: NTLM SSO - use sesskey and other tidyups

Several tidyups:

- use moodle_strtolower() for utf-8 correctness

 - use sesskey as the key instead of IP addr to support
   proxied users

 - clean the sesskey after success!

 - pull timeout out to a constant: AUTH_NTLMTIMEOUT

13 years agoMDL-9399 moodlelib: set_config() deletes config entries if the value is NULL
martinlanghoff [Wed, 14 Nov 2007 22:10:21 +0000 (22:10 +0000)]
MDL-9399 moodlelib: set_config() deletes config entries if the value is NULL

New! Improved! If you pass NULL as the value, it will delete the
config entry for you.

13 years agoMDL-9399 auth/ldap: Tighten NTLM AD checks to the appropriate OU
martinlanghoff [Wed, 14 Nov 2007 22:09:59 +0000 (22:09 +0000)]
MDL-9399 auth/ldap: Tighten NTLM AD checks to the appropriate OU

From Iñaki Arenaza...

Right now, if someone logs in via NTLM magic, we don't check if that
user is inside the contexts specified in the LDAP settings. I mean,
if I want to restrict my Moodle site to those users inside a given OU
or subtree of my LDAP directory, with the current code any valid user
in my whole AD domain (and if we are using a GC as the LDAP server,
the whole forest) can log in. We should check that the user is inside
one of the configured contexts before allowing his/her to log in.

Something along the lines of the attached patch could do it.

13 years agoMDL-9399 auth/ldap: ntlmsso_finish() now completes the user session setup
martinlanghoff [Wed, 14 Nov 2007 22:09:45 +0000 (22:09 +0000)]
MDL-9399 auth/ldap: ntlmsso_finish() now completes the user session setup

As Iñaki points out, ntlmsso_finish() needs to do all the setup that
login/index.php would do for a user once auth succeeds. With this
patch, the session setup is complete so the logon is usable.

13 years agoMDL-9399 auth/ldap: NTLM redirect only on initial GET
martinlanghoff [Wed, 14 Nov 2007 22:09:29 +0000 (22:09 +0000)]
MDL-9399 auth/ldap: NTLM redirect only on initial GET

We only want to redirect when users are being shown the login page (on
GET) but not when users are POSTing to it, actually trying to login.

13 years agoMDL-9399 auth/ldap: NTLM SSO - lots of fixes from Iñaki
martinlanghoff [Wed, 14 Nov 2007 22:09:15 +0000 (22:09 +0000)]
MDL-9399 auth/ldap: NTLM SSO - lots of fixes from Iñaki

Lots of typos and minor errors fixed by Iñaki. Thanks!

13 years agoMDL-9399 auth/ldap: NTLM SSO - Resolve Moodle cookies issue, tighten config.php requi...
martinlanghoff [Wed, 14 Nov 2007 22:08:55 +0000 (22:08 +0000)]
MDL-9399 auth/ldap: NTLM SSO - Resolve Moodle cookies issue, tighten config.php require()s

Use $nomoodlecookie global to avoid session troubles. Also

 * Ensure we load the appropriate config.php, even if we are executing
   under a strange environment (ie: with a user's credentials!)

 * Test we have a spacer gif to open before we open it

13 years agoMDL-9399 auth/ldap: Add NTLM SSO pages
martinlanghoff [Wed, 14 Nov 2007 22:08:38 +0000 (22:08 +0000)]
MDL-9399 auth/ldap: Add NTLM SSO pages

These pages control the process of attempting an NTLM SSO login
safely. This is very draft and needs real-world testing and polish.

And string localisation too ;-)

  * If NTLM SSO is enabled, and the user's IP addr is in the right
    subnet, the loginpage_hook() of auth/ldap redirects to
    ntlmsso_attempt.php

  * ntlmsso_attempt.php will display a "redirect" msg with an img tag
    pointing to ntlmsso_magic.php, a 3s wait, and a redirect to
    ntlmsso_finish.php

  * ntlmsso_magic.php should be configured to have "Integrated
    Windows Authentication". If it does, it will serve a spacer gif
    and call ntlmsso_magic()

  * ntlmsso_finish.php calls ntlmsso_finish() to complete the SSO
    and handles failures.

13 years agoMDL-9399 auth/ldap: flesh out ntlmsso_* functions
martinlanghoff [Wed, 14 Nov 2007 22:08:11 +0000 (22:08 +0000)]
MDL-9399 auth/ldap: flesh out ntlmsso_* functions

Flesh out the functions that get the job done. These will be triggered
by PHP files sitting under auth/ldap/ ...

ntlmsso_magic() - here is where the magic happens. Call it serving
something harmless, like a space GIF, from a URL that is blessed with
Integrated Windows Authentication. If the IWA is successful, it will
set a special session cookie in config_plugins table.

It won't complete the job because when we are under IWA magic we
cannot change (even read!) the session data, as the execution happens
under the OS privileges of the actual user acct being logged in (!!!)

ntlmsso_finish() - if it finds the session set by ntlmsso_magic() and
it hasn't expired, it will finish the job of logging in the user, by
calling authenticate_user_login() and exercising the whole auth
machinery.

user_login() - when called by authenticate_user_login() it will check
to see if there's a session setup by ntlmsso_magic() and OK the login
without really asking the AD backend to proof a password we don't have
anyway.

13 years agoMDL-9399 auth/ldap: Introducing loginpage_hook(), ntlmsso_attempt(), ntlmsso_finish()
martinlanghoff [Wed, 14 Nov 2007 22:07:53 +0000 (22:07 +0000)]
MDL-9399 auth/ldap: Introducing loginpage_hook(), ntlmsso_attempt(), ntlmsso_finish()

A work in progress -- initial loginpage_hook() and headers for the
remaining functions. One thing to consider here is that this won't
work if there's a proxy in the middle.

Does NTLM auth thingy support proxies?

13 years agoMDL-9399 auth/ldap: Manage 2 new config settings for NTLM SSO
martinlanghoff [Wed, 14 Nov 2007 22:07:16 +0000 (22:07 +0000)]
MDL-9399 auth/ldap: Manage 2 new config settings for NTLM SSO

Changes in the forms and forms handling to set and edit NTLM SSO
related config options.

13 years agoMDL-9399 - auth/shibboleth: ensure we load enrolments
martinlanghoff [Wed, 14 Nov 2007 22:06:17 +0000 (22:06 +0000)]
MDL-9399 - auth/shibboleth: ensure we load enrolments

Most of this code should be replaced with complete_user_login() but it
does a few odd things, so we'll play it safe for now, specially since
I don't have a Shib setup to test...

13 years agologinas: call check_enrolment_plugins()
martinlanghoff [Wed, 14 Nov 2007 22:04:37 +0000 (22:04 +0000)]
loginas: call check_enrolment_plugins()

Admins will want to see an update of the user's enrolments when
they do a login-as.

13 years agoauth/mnet: when landing, user complete_user_login()
martinlanghoff [Wed, 14 Nov 2007 22:04:23 +0000 (22:04 +0000)]
auth/mnet: when landing, user complete_user_login()

By using complete_user_login() we ensure that the session is fully
setup, and that enrolment plugins are called correctly.

13 years agoaccesslib: Move check_enrolment_plugins() to complete_user_login()
martinlanghoff [Wed, 14 Nov 2007 22:04:05 +0000 (22:04 +0000)]
accesslib: Move check_enrolment_plugins() to complete_user_login()

... where it belongs ;-)

load_all_capabiloties() gets called at several points where we don't
want to be re-querying the enrolment backends. It needs to  be called
before load_all_capabilities() and only by callers that are setting up
a logon session.

Those callers need to be calling complete_user_login() anyway, as they
need to set the Moodle cookie, log the logon action, etc. In fact,
those callers duplicate a lot of that code already.

The callers that don't duplicate code for the login are actually the
cases where the backend enrolment plugins should not be queried.

To be followed by callers cleanup...

13 years agologin/index, moodlelib: move session setup logic to complete_user_login()
martinlanghoff [Wed, 14 Nov 2007 22:03:46 +0000 (22:03 +0000)]
login/index, moodlelib: move session setup logic to complete_user_login()

Move most of the user session setup logic from login/index.php to
complete_user_login().

13 years agoMerged MDL-11332 from stable.
mudrd8mz [Wed, 14 Nov 2007 21:36:16 +0000 (21:36 +0000)]
Merged MDL-11332 from stable.

13 years agoMDL-12066 - Links in the HTML block are not recoded on backup and restore.
tjhunt [Wed, 14 Nov 2007 17:03:32 +0000 (17:03 +0000)]
MDL-12066 - Links in the HTML block are not recoded on backup and restore.

This is messy because the links are hidden in the configdata column, which is serialized and base64encoded. So we have to untangle that, then ask the block whether there are any bits of $config that need to be fixed, then re-encode it before backup up. And reverse that on restore. It needs to remain base64 encoded in the backup file, so that the file format is backwards compatible.

I disucssed this with Eloy before doing it.

Merged from MOODLE_19_STABLE.

13 years agoMDL-12172 - print_continue should create a method="get" button, not post. Merged...
tjhunt [Wed, 14 Nov 2007 16:34:26 +0000 (16:34 +0000)]
MDL-12172 - print_continue should create a method="get" button, not post. Merged from MOODLE_19_STABLE.

13 years agomerged from 1.9 :: added 2 CSS definitions to dimm the summary and the course no...
urs_hunkler [Wed, 14 Nov 2007 16:06:58 +0000 (16:06 +0000)]
merged from 1.9 :: added 2 CSS definitions to dimm the summary and the course no. in a hidden course topic.

13 years agoDelete commented-out code that was actually not commented out properly, and so caused...
tjhunt [Wed, 14 Nov 2007 14:48:50 +0000 (14:48 +0000)]
Delete commented-out code that was actually not commented out properly, and so caused warnings. Merged from MOODLE_18_STABLE.