5699 Commits

Author SHA1 Message Date
martinlanghoff
4f957b116d 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.
2007-11-20 00:18:31 +00:00
skodak
f16fa0a34b MDL-12249 groups UI cleanup and improvements - see tracker for details; merged from MOODLE_19_STABLE 2007-11-19 20:31:57 +00:00
nfreear
f8eaeffa21 Fixes for bug MDL-12256, "Course AJAX has very poor accessibility - ALT text" (includes white-space cleanup). 2007-11-19 17:22:04 +00:00
nfreear
11599e476d Initial fix for MDL-12256, "Course AJAX has very poor accessibility - ALT text" - test, imgAttributes.length NOT attributes.length. 2007-11-19 15:25:16 +00:00
mattc-catalyst
6779dc6a02 MDL-12172: fixed get parameters not being submitted in Firefox
Author: Matt Clarkson <mattc@catalyst.net.nz>
2007-11-19 01:45:45 +00:00
toyomoyo
5bbf18cd6f changed to get_recordset_sql because get_records forces the first element to be key 2007-11-19 01:44:26 +00:00
toyomoyo
f7bd8c758f making a SQL cross-db compatible 2007-11-19 01:13:31 +00:00
stronk7
d4775d5495 Merging unmerged code. MDL-11743 and MDL-11671 2007-11-18 17:12:58 +00:00
iarenaza
41079ed4bb MDL-11099 and MDL-11655 Don't show external db password in clear 2007-11-18 12:45:21 +00:00
skodak
64f592adf3 fixed typo throwing warnings during install; merged from MOODLE_19_STABLE 2007-11-17 20:55:44 +00:00
skodak
3541cecb66 MDL-12041 fixed groupmode flag in cm when mode forced in course; merged from MOODLE_19_STABLE 2007-11-17 17:41:28 +00:00
skodak
71198086c3 MDL-12221 initialised $output and fixed whitespace; merged from MOODLE_19_STABLE 2007-11-17 16:37:00 +00:00
skodak
7c9b1d315d MDL-12199 problem with "Show advanced" used after pressing of enter in forms; merged from MOODLE_19_STABLE 2007-11-17 13:30:15 +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
scyrma
7be3be1bf0 Fix to a bug preventing rss feeds from displaying. 2007-11-16 03:34:05 +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
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
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
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
martinlanghoff
a238e822a2 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().
2007-11-14 22:03:46 +00:00
tjhunt
9cb69c1910 MDL-12172 - print_continue should create a method="get" button, not post. Merged from MOODLE_19_STABLE. 2007-11-14 16:34:26 +00:00
skodak
190af29fef MDL-12146 grade category defaults, forced settings and advanced options, merged from MOODLE_19_STABLE 2007-11-14 11:52:21 +00:00
toyomoyo
5e900da1ce removing duplicate entries in grade_grades prior to adding unique key 2007-11-14 05:07:33 +00:00
martinlanghoff
8c80cc1738 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.

Do the math before we attach 'px' to it...
2007-11-14 01:25:20 +00:00
nicolasconnault
b7cf8eac52 Fixing a few bugs identified by Petr and attacking grade_item unit tests 2007-11-13 19:12:37 +00:00
skodak
717f432f2d MDL-12154 used proper cast to float before !== comparison merged from MOODLE_19_STABLE 2007-11-13 16:47:33 +00:00
skodak
4ac209d5bd MDL-12154 used proper cast to float before !== comparison 2007-11-13 16:08:39 +00:00
skodak
f1ad9e042a MDL-10901 new SUM aggregation type
MDL-12154 used proper cast to float before !== comparison

part 2
2007-11-13 15:32:16 +00:00
skodak
0758a08e2a MDL-10901 new SUM aggregation type
MDL-12154 used proper cast to float before !== comparison
2007-11-13 15:08:59 +00:00
nfreear
bc1bbaf477 MDL-12153, "Validome - moodle.org invalid - require Content-Script-Type". 2007-11-13 14:46:44 +00:00
nicolasconnault
9a68cffcbb Restoring some of the static calls which were converted unnecessarily 2007-11-13 13:44:27 +00:00
nicolasconnault
aaefeda438 More fine-tuning of gradebook classes 2007-11-13 10:31:08 +00:00
nicolasconnault
795bee3460 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). 2007-11-13 09:08:43 +00:00
skodak
cd1edf9e8a MDL-12101 cleanup/fixing/refactoring of user bulk operation and admin user browsing 2007-11-13 08:43:20 +00:00
nicolasconnault
4fc9ec1ec0 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). 2007-11-13 07:36:00 +00:00
toyomoyo
cee037c660 MDL-12138, set aggregate graded only as default 2007-11-13 03:07:48 +00:00
skodak
a258f25619 MDL-12131 db debug messages now quoted properly 2007-11-12 17:21:00 +00:00
skodak
46f3921edd MDL-12130 and MDL-12129 - fixed advanced status of elements when header not closed; disableIf now works inside grouped elements too; code cleanup in focus() and _getElNamesRecursive() 2007-11-12 17:12:35 +00:00
nfreear
0dbb2191fb Fixes MDL-12125, Call to a member function FetchRow on a non-object in get_user_access_sitewide. 2007-11-12 16:53:53 +00:00
urs_hunkler
f7c926ee9f merged from 1.9 :: MDL-12093 2007-11-12 11:17:24 +00:00
martinlanghoff
755a625d95 htmlarea: Fix fullscreen editor on IE6/7 -- MDL-11242
Only say px if the width is a pure number. Under IE we
get the "100%" for the width of the editor, so blindly
appending "px" results in a JS execution error.

With this patch we only attach px if it's a pure int.

Also tested the sizing of HTMLArea in the messaging
window. So both should be working now.
2007-11-12 04:13:24 +00:00
urs_hunkler
60a94e79c3 merged from 1.9 :: added the clearfix option to the custom_corners call for admin pages to keep the "Save Changes" button within the area. 2007-11-11 17:30:52 +00:00
urs_hunkler
8e501a45f0 merged from 1.9 :: Added the check, if all opend custom_corners are closed. This way it's possible to add the close call in the footer which closes eventually open ccs. 2007-11-11 15:04:34 +00:00
urs_hunkler
ee9beb53bf merged from 1.9 :: MDL-12093 :: added function get_in_popup() 2007-11-10 14:53:54 +00:00
stronk7
23610d6ff7 Adding lang support within profile fields to make them selfcontained.
Merged from MOODLE_19_STABLE
2007-11-09 19:11:40 +00:00
skodak
1ee0df067f MDL-10365 grade history can be turned off + lifetime 2007-11-08 08:59:26 +00:00
toyomoyo
e4065e84e3 keeping version number in sync 2007-11-08 05:52:47 +00:00