toyomoyo
bce83e8c76
backporting changes for MDL-8981, roles assigned at site level may result in a lot of default subscriptions
2007-03-21 06:05:13 +00:00
moodler
b6d3fccd59
Merged fixes for MDL-8785 from 1.8
...
BIG SPEED INCREASE!!!!!!
2007-03-07 05:00:05 +00:00
moodler
78be3cdb8b
backporting code to fix hidden teacher upgrade
2007-03-07 01:38:41 +00:00
nicolasconnault
2fd2fdbdb9
MDL-8771 - Restricted has_capability() sanity checks to DEVELOPER debug mode
2007-03-06 05:29:00 +00:00
moodler
d243cd17c5
Commenting this out for now for performance reasons, should be fixed soon!
...
See MDL-8385
2007-03-02 10:10:52 +00:00
skodak
9e8bc0e590
MDL-8268 fixed block get_string, patch by Mark Nielsen; backported from HEAD
2007-02-14 23:02:15 +00:00
skodak
b50965414e
MDL-8268 fixed get_user_capability_course(), patch by Mark Nielsen; backported from HEAD
2007-02-14 22:51:17 +00:00
vyshane
2edb2fbaf1
Fixes for MDL-8420 and MDL-8385.
2007-02-09 01:35:46 +00:00
moodler
7235680eed
$switchroleactive is now passed recursively so switchroles actually works now :-/
2007-02-01 08:11:32 +00:00
stronk7
b65b99cab8
Applying new rs_xxx() functions everywhere. MDL-8134
2007-01-29 22:14:36 +00:00
stronk7
5a739340da
Applying new rs_xxx() functions everywhere. MDL-8134
2007-01-29 11:20:44 +00:00
moodler
43e57712eb
Clear the capability cache when adding roles to current user, just to be sure
2006-12-05 07:12:22 +00:00
moodler
0ca2898178
FIx for MDL-7605 where switchroles was not working properly
...
There were two issues:
1) When switch roles is active we don't want to progress up to parents of the
course looking for capabilities
2) We need to clear the capability cache after switching roles because the
cached values may not be accurate (because of the above difference)
2006-12-05 05:39:11 +00:00
tjhunt
d086c991ee
Fix column names - backported from head.
2006-11-20 18:04:24 +00:00
skodak
b2a39ba822
fixed problem with apostrophe in role names and description when creating roles during install and restore MDL-7611; backported from HEAD
2006-11-20 14:11:39 +00:00
toyomoyo
ad0d007abd
fixed a problem where user is not shown when the user has not visited a course page. changed get_user_roles to take in additional parameter
2006-11-16 05:16:07 +00:00
toyomoyo
a203cb09be
fixing wrong comment
2006-11-07 03:12:33 +00:00
toyomoyo
120f722403
fixing capability of block contexts
2006-11-06 06:15:11 +00:00
moodler
c612f884dc
Petr's patch for MDL-7327 to modify require_capability login a bit
2006-11-02 08:11:39 +00:00
skodak
bf3c381651
fixed group related typo in has_capability()
2006-10-31 20:22:52 +00:00
moodler
24f49eaa7e
Killed infinite loop when upgrading teachers!
2006-10-31 04:37:55 +00:00
toyomoyo
826153a73d
fixing progress count
2006-10-30 05:39:52 +00:00
toyomoyo
1e76d6529c
ignore site level course teacher assignments during upgrade from 1.6 or below
2006-10-30 05:25:53 +00:00
moodler
e60154c553
Users not logged in may have capabilities but no id
2006-10-29 15:56:36 +00:00
sam_marshall
6266a81cf7
MDL-7250 typo ARGH sorry.
2006-10-27 16:26:02 +00:00
sam_marshall
d0f6aa914a
MDL-7250 update to previous change to do in SQL as suggested
2006-10-27 16:24:26 +00:00
sam_marshall
b1d476b800
MDL-7250 Slight change to load_defaultuser_role so that it doesn't load 0s into $USER->capabilities.
2006-10-27 16:16:35 +00:00
moodler
6cdd66e3c5
Added a top-level cache to has_capability() to make it perform better
...
in cases where it's called a lot with repetitive values (which happens
a lot in things like forum mailouts) with only a small memory cost.
2006-10-26 09:42:58 +00:00
toyomoyo
6f0c99c7a8
fixing a bug where context with override and assignments are adding
2006-10-26 03:56:38 +00:00
moodler
5c0cd26dbf
ALtered new SQL in load_user_capability to make it more friendly with MS SQL
2006-10-25 08:33:40 +00:00
moodler
8e9aa7d060
Just some tidy-ups, removed redundant SITEIDs etc
2006-10-25 08:31:09 +00:00
toyomoyo
d91d2fa6d3
use limited fields instead of u.*
2006-10-25 07:19:30 +00:00
toyomoyo
1ca7a8001b
fix for load_user_capability() when 2 contexts in overrides are not related
2006-10-25 03:47:05 +00:00
moodler
63d4e986d0
This new function called load_all_capabilities() should be used whenever
...
you want to completely reload the capabilities for the current user.
Basically it will deal nicely with the default site-wide permissions
depending on the current user.
More background in the comments on MDL-6963
2006-10-23 15:14:23 +00:00
skodak
83e674cd7f
fix has_capability() to work when $nomoodlecookie = true; MDL-7156 - needed for RSS file.php that is serving feeds
2006-10-21 20:41:41 +00:00
moodler
55a96b2f3e
Please please please be defensive about values returned from the database. Always.
...
In this case moodle.org had some bad data that caused this code to crash.
MDLSITE-55
2006-10-21 14:51:56 +00:00
toyomoyo
8807ea9497
fix for MDL-7113, removing DISTINCT on TEXT fields
2006-10-20 02:43:32 +00:00
toyomoyo
43059890b7
making the site context same as the site course context
2006-10-19 06:15:42 +00:00
toyomoyo
f3726ba3b2
fix for MDL-7055 - prohibts at site level not working
2006-10-18 06:44:45 +00:00
moodler
252b76e7aa
Switch roles now works properly for admins at module level!
2006-10-11 05:47:36 +00:00
toyomoyo
770f2e2ab1
fixed assign_capability() function so that it's no longer writing '0's into db
2006-10-11 02:13:46 +00:00
skodak
4dd5d7513d
fixed wrong capability name and function name typo
2006-10-09 10:07:15 +00:00
skodak
17e5635c36
fixed 'capabilitities' typos and removed forgotten debug_print_backtrace() commited with MDL-6728
2006-10-08 11:00:49 +00:00
skodak
ab61d01b06
Typo in lib/accesslib.php MDL-6728, found by Nicolas Martignoni.
2006-10-08 10:52:54 +00:00
moodler
83ea392ee1
Drop the user_xxx tables after Roles install
2006-10-06 06:47:12 +00:00
moodler
7b37cb9a01
Added new function
...
function user_has_role_assignment($userid, $roleid, $contextid=0)
2006-10-04 07:07:57 +00:00
toyomoyo
9b5d7a463e
fixing typo
2006-10-04 02:43:29 +00:00
toyomoyo
5e67946d6c
adding support for 1.6->1.7 backups
2006-10-03 08:54:46 +00:00
skodak
5fe9a11d96
more diagnostics in has_capability() - number instead of context object detected and debug message displayed
2006-10-02 22:10:36 +00:00
moodler
e9c82dca8f
Fixed capability soring on course and coursecat override MDL-6780
2006-10-02 08:57:00 +00:00