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.
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.
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...
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.
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.
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.
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.
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.
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...
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.
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.
martinlanghoff [Wed, 14 Nov 2007 01:25:20 +0000 (01:25 +0000)]
htmlarea: fix in FF - MDL-11242
The previous fix for IE left some problems in the FF side of
things because we were trying additions/substractions on
width once its had turned to a string of value + unit.
poltawski [Tue, 13 Nov 2007 20:03:27 +0000 (20:03 +0000)]
Adding a comment pointing to MDL-3964 which explains why we leave the
badword in the filter span title (as I almost 'fixed it' so it couldn't
be hovered over)
nicolasconnault [Tue, 13 Nov 2007 09:08:43 +0000 (09:08 +0000)]
Managed to remove static calls from the core gradebook classes without removing support for such calls in gradebook interface code. I used a singleton pattern for this (get_instance in grade_object).
nicolasconnault [Tue, 13 Nov 2007 07:36:00 +0000 (07:36 +0000)]
Managed to remove static calls from the core gradebook classes without removing support for such calls in gradebook interface code. I used a singleton pattern for this (get_instance in grade_object).