29141 Commits

Author SHA1 Message Date
urs_hunkler
b80c78e325 merged from 1.9 :: MDL-12221 :: example: adding custom_corners to the info box on the forum page. 2007-11-16 14:21:58 +00:00
urs_hunkler
e80cc31f06 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.
2007-11-16 14:19:13 +00:00
urs_hunkler
10654e2d4a 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.
2007-11-16 13:33:51 +00:00
skodak
61ac129b10 MDL-12096 changed label of parent cat, merged from MOODLE_19_STABLE 2007-11-16 07:36:18 +00:00
urs_hunkler
7cd266e9b1 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. 2007-11-16 07:29:14 +00:00
moodler
2525e46537 MDL-12215 made the advanced search tab more consistent with the interface 2007-11-16 05:56:20 +00:00
toyomoyo
331502055e MDL-12121, fixing a warning 2007-11-16 04:24:57 +00:00
scyrma
7be3be1bf0 Fix to a bug preventing rss feeds from displaying. 2007-11-16 03:34:05 +00:00
toyomoyo
4c68dbfe7f MDL-12187, fixing grader report style 2007-11-16 03:09:20 +00:00
toyomoyo
dc6cb74efd MDL-11672, hide hidden assignment descriptions from calendar 2007-11-16 02:52:48 +00:00
nicolasconnault
5779b901e8 MDL-12182 More grade_item unit tests 2007-11-15 23:27:55 +00:00
skodak
1426edacd9 MDL-12096 new simple weighted mean aggregation type; merged from MOODLE_18_STABLE 2007-11-15 22:30:01 +00:00
skodak
3d5c00b344 MDL-12146 grade item settings can be now configured as advanced, new advanced defaults, minor tweaks in admintree; merged from MOODLE_18_STABLE 2007-11-15 17:32:31 +00:00
urs_hunkler
a113acdda8 merged from 1.9 :: MDL-12195 :: added closing '>' in line 157. 2007-11-15 16:37:44 +00:00
skodak
df94204404 MDL-12140 weights/extrapoints are never advanced 2007-11-15 15:43:39 +00:00
mchurch
488eaca44a MDL-12016 Category text not being sent to 'create_category_path'. 2007-11-15 14:05:17 +00:00
mchurch
ce2df2884a MDL-12015 Import question count was wrong. 2007-11-15 13:43:51 +00:00
urs_hunkler
3411f1b994 merged from 1.9 :: MDL-12191 :: workaround with JavaScript to add "haslayouttabel" class to body. 2007-11-15 12:21:09 +00:00
urs_hunkler
8e0692399f merged from 1.9 :: changed the form lable look. 2007-11-15 12:18:32 +00:00
bobopinna
c852a628ac MDL-12161 Stripped slashes in LO titles 2007-11-15 08:37:11 +00:00
skodak
e2eb2edbad MDL-12140 category can be selected when adding new items or categories; merged from MOODLE_19_STABLE 2007-11-15 08:29:12 +00:00
toyomoyo
ba1393b43f MDL-12180, blocks capabilities not appearing when overriding block roles 2007-11-15 07:46:04 +00:00
nicolasconnault
dea2f0d945 MDL-12182 Only testgradeitem.php isn't yet completed. 2007-11-15 06:44:26 +00:00
toyomoyo
b486ef1ae3 MDL-8270, full block backup/restore routine with code 2007-11-15 05:00:44 +00:00
scyrma
b087818c35 Fix for MDL-10996 : prevent course name from being displayed twice. 2007-11-15 04:04:21 +00:00
scyrma
b27b1473af MDL-11401, merged from 19_STABLE 2007-11-15 02:39:43 +00:00
toyomoyo
045fe536f8 MDL-8330, adding a warning to translators about updating of lang packs 2007-11-15 01:18:47 +00:00
martinlanghoff
6f25564273 MDL-9399 - auth/ldap: Strings for NTLM SSO - forgot one 2007-11-14 22:47:30 +00:00
martinlanghoff
9b9fcc21e4 MDL-9399 auth/ldap: Strings for NTLM SSO
cvs: ----------------------------------------------------------------------
2007-11-14 22:43:56 +00:00
martinlanghoff
6626b9ab48 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...
2007-11-14 22:23:45 +00:00
martinlanghoff
4025cf8031 MDL-9399 - auth/ldap NTLM SSO - fix missing global 2007-11-14 22:17:58 +00:00
martinlanghoff
065e2cc094 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.
2007-11-14 22:12:57 +00:00
martinlanghoff
19987407ab 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).
2007-11-14 22:12:25 +00:00
martinlanghoff
6221a32121 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.
2007-11-14 22:12:07 +00:00
martinlanghoff
83cd2dce5a 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!)
2007-11-14 22:11:48 +00:00
martinlanghoff
355bd271ac 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
2007-11-14 22:11:35 +00:00
martinlanghoff
6fd511eb1c 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.
2007-11-14 22:10:21 +00:00
martinlanghoff
f8bf0f4afc 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.
2007-11-14 22:09:59 +00:00
martinlanghoff
ddf3de6720 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.
2007-11-14 22:09:45 +00:00
martinlanghoff
0a1c2f4a43 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.
2007-11-14 22:09:29 +00:00
martinlanghoff
02c7f3d98a MDL-9399 auth/ldap: NTLM SSO - lots of fixes from Iñaki
Lots of typos and minor errors fixed by Iñaki. Thanks!
2007-11-14 22:09:15 +00:00
martinlanghoff
3357a506bd 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
2007-11-14 22:08:55 +00:00
martinlanghoff
977f5b56e1 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.
2007-11-14 22:08:38 +00:00
martinlanghoff
decd80163d 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.
2007-11-14 22:08:11 +00:00
martinlanghoff
1e8713ea64 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?
2007-11-14 22:07:53 +00:00
martinlanghoff
b95b46a897 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.
2007-11-14 22:07:16 +00:00
martinlanghoff
cfab8f3946 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...
2007-11-14 22:06:17 +00:00
martinlanghoff
bce3479cc1 loginas: call check_enrolment_plugins()
Admins will want to see an update of the user's enrolments when
they do a login-as.
2007-11-14 22:04:37 +00:00
martinlanghoff
be41678c5e 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.
2007-11-14 22:04:23 +00:00
martinlanghoff
8f9e1d2c4d 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...
2007-11-14 22:04:05 +00:00