204 Commits

Author SHA1 Message Date
Martin Langhoff
f3f7610c90 cvsimport fixups -- cvshead had strayed from upstream 2007-01-04 13:15:04 +13:00
sam_marshall
dc268b2f24 MDL-7904: Trivial change to load_capability_def (so it works if run multiple times for the same file during one PHP run) 2006-12-12 17:23:31 +00:00
sam_marshall
ae628043a0 MDL-7401 Course format database/backup/lang/stylesheet/capability support 2006-12-11 15:47:23 +00:00
moodler
99ad7633a6 Merged cache clearing from stable 2006-12-05 07:17:04 +00:00
moodler
caac897791 Merged fixes for switchroles from stable MDL-7605 2006-12-05 05:45:08 +00:00
tjhunt
115faa2f7b Fix column names. 2006-11-20 17:47:30 +00:00
skodak
69aaada0f5 fixed problem with apostrophe in role names and description when creating roles during install and restore MDL-7611 2006-11-20 14:08:40 +00:00
toyomoyo
d55114512d removed code to ignore site level course teacher assignemnts, since the contexts are separated now 2006-11-20 03:55:35 +00:00
toyomoyo
d42c64ba14 fix for MDL-7595, adding coursemanager config variable to determine what roles are displayed on course description page 2006-11-17 08:57:50 +00:00
toyomoyo
b06334e833 making hidden assignment work with multiple roles 2006-11-16 08:29:25 +00:00
toyomoyo
ae9761ec77 merged, fixed a problem when a user has not visited a course, he is not shown. Changed get_user_roles to take in additional parameter 2006-11-16 05:17:43 +00:00
sam_marshall
40d8670956 MDL-7513 Further tweak to the way defaultuser role works to unbreak one possible situation that my previous change just broke 2006-11-15 14:23:43 +00:00
sam_marshall
39dee8f200 MDL-7513 - made it so a hack for Guest role only applies to that role and doesn't remove the course:view capability from other roles at site level when specifically assigned 2006-11-15 13:36:57 +00:00
toyomoyo
40a2a15f20 separating the site course context and the site context, could be buggy, please report bugs! 2006-11-15 08:23:27 +00:00
toyomoyo
3997cb4037 Adding hidden role assignment, currently used in course participants page and print_course function.
Please test.
2006-11-15 04:28:18 +00:00
skodak
1936c10e54 fixed obsoleted use of course->category to find site course - now used SITEID instead MDL-1899 2006-11-12 08:55:13 +00:00
toyomoyo
d963740dcd merged, fixing wrong comment 2006-11-07 03:14:46 +00:00
toyomoyo
2d95f70258 merged, fixing capabilities of block context 2006-11-06 06:16:00 +00:00
moodler
71483894b2 Petr's patch for MDL-7327 to modify require_capability login a bit (merged from stable) 2006-11-02 08:12:54 +00:00
skodak
b4a1805ab0 fixed group related typo in has_capability(); merged from MOODLE_17_STABLE 2006-10-31 20:24:57 +00:00
moodler
459e27f3a0 Killed infinite loop when upgrading teachers! (merge from stable) 2006-10-31 04:38:39 +00:00
toyomoyo
0d6f531d8f merged fixing progress count 2006-10-30 05:40:46 +00:00
toyomoyo
b6d9f011e2 merged, ignore site level course teacher assignments when upgrading from 1.6 or below 2006-10-30 05:26:59 +00:00
moodler
6605128ef8 Merged fixes for not-logged-in users from stable 2006-10-29 15:58:21 +00:00
stronk7
0163b1d098 Adding one unmerged change from 17_STABLE. Was breaking some things... 2006-10-28 16:50:28 +00:00
sam_marshall
62eb0371dc MDL-7250 merged from stable 2006-10-27 16:27:28 +00:00
moodler
922633bd28 Merged from stable
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:43:58 +00:00
toyomoyo
efb5888416 merged, fixing a bug where context with an override and assignment is adding up capability 2006-10-26 03:57:34 +00:00
moodler
21c9bace87 Merged some recent changes from stable 2006-10-25 08:38:14 +00:00
toyomoyo
2851ba9b67 merged, using limited fields instead of u.* 2006-10-25 07:20:28 +00:00
toyomoyo
9fccc08003 fix in load_user_capability() merged when 2 contexts in overrides are not related 2006-10-25 03:47:59 +00:00
moodler
2f1a42481d 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

Merged from stable
2006-10-23 15:17:31 +00:00
skodak
013f2e7cd9 fix has_capability() to work when $nomoodlecookie = true; MDL-7156 - needed for RSS file.php that is serving feeds; merged from MOODLE_17_STABLE 2006-10-21 20:42:50 +00:00
moodler
2176adf169 Merged some checks from stable 2006-10-21 14:53:47 +00:00
toyomoyo
ac57f76122 merged fox for MDL-7113, removing DISTINCT on TEXT field 2006-10-20 02:44:22 +00:00
toyomoyo
b7cec865f4 merged, making the site context and site course context the same 2006-10-19 06:16:35 +00:00
toyomoyo
819e5a70c3 merged fix for MDL-7055 - prohibts at site level not working 2006-10-18 06:45:38 +00:00
moodler
f4e2d38aaf Improved has_capability for admins using switchrole in modules 2006-10-11 05:49:26 +00:00
toyomoyo
96986241f5 merged change, fixed a bug where'0' is written when calling capability_assign() 2006-10-11 02:18:09 +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
toyomoyo
8020a0162f roles and capability support for backups. role mapping is in, please help test, thanks 2006-10-02 08:49:07 +00:00
moodler
b16de84980 get_role_users() can now get all the people who have any role in that context,
which is useful
2006-10-01 08:34:36 +00:00