Commit Graph

612 Commits

Author SHA1 Message Date
skodak e46c09873a fixed warning during initial install when creating admin roles 2006-09-10 20:29:44 +00:00
stronk7 ccfc5ecca1 Only send contexts to cache if the aren't empty. At initial installations
some empty contexts were being cached and used later, causing insertion
of null values to every DB but MySQL.
2006-09-08 19:28:03 +00:00
vyshane 46943f7b78 Seems that the unassign_capability function signature was changed without updating the call to that function in capabilities_cleanup(). Fixed. 2006-09-08 02:33:02 +00:00
stronk7 42ac3ecffc Solving one string concatenation typo (please, test it's ok) and
stripping the AS keyword from table aliases. You cand find more at:
http://docs.moodle.org/en/XMLDB_Problems#Table_and_column_aliases_-_the_AS_keyword
2006-09-07 20:17:46 +00:00
toyomoyo ec7a8b7999 adding capabilities 2006-09-07 08:57:56 +00:00
moodler d4649c76cc Removed some tabs 2006-09-06 01:43:54 +00:00
skodak dbe7e58274 I spent 2 hours looking for this typo :-D 2006-09-05 20:45:57 +00:00
stronk7 5de6e614d4 No need to specify DISTINCT because u.* guarantees unique ids.
Also, DISTINCT clauses cannot be used with TEXT/BINARY columns
on MSSQL and Oracle.
2006-09-05 19:04:33 +00:00
stronk7 0441764040 Changed the get_users_by_capability() function to work with
1.7 DB compatible limit sentences.
2006-09-05 18:55:16 +00:00
stronk7 e4697bf7dc Both Oracle and MSSQL don't like double quotes for literals. 2006-09-05 18:06:53 +00:00
moodler 957861f785 Better robustness and basic checking for get_parent_contexts 2006-09-05 09:30:40 +00:00
moodler 91be52d78e Get the block name correctly 2006-09-05 06:30:12 +00:00
vyshane 4729012f4c Fixed warning 2006-09-05 03:07:56 +00:00
stronk7 56b4d70d58 typo ;-) 2006-09-03 21:43:37 +00:00
moodler 460a7a6271 Cutting down on the debug notices 2006-09-03 16:31:46 +00:00
moodler dc411d1be0 Fices bug when loading another user's capabilities (it would trash your own) 2006-09-03 08:45:41 +00:00
moodler 1911105fa1 Fixed typo 2006-09-03 08:00:03 +00:00
moodler 7700027f40 Improvements to load_notloggedin_role for robustness and clarity.
More checking in role_assign and calling of forum_add_user_default_subscriptions
2006-09-03 07:56:40 +00:00
skodak 6eb4f82357 fixed missing return in assign_role() 2006-09-03 07:29:06 +00:00
skodak 35a518c5de fixed admin defaults, some warnings during install and added trmporary hack to make $CFG->notloggedinroleid work 2006-09-02 10:03:30 +00:00
stronk7 0be16c1d8c mssql doesn't support aliases nor position numbers in the
GROUP BY clause. Just columns and expressions.
2006-09-01 18:24:09 +00:00
toyomoyo 20aeb4b8e3 utf8 migrate support for site with roles active, resolved isstudent legacy problem, implemented $CFG->notloggedinroleid 2006-09-01 09:25:34 +00:00
moodler 9ebcb4d28e if role_assign is called by the current user on themselves, then reload
the capabilities table
2006-09-01 06:30:01 +00:00
moodler 1dc1f03795 More flexible role_unassign() that allows setting of any combination of arguments 2006-09-01 06:10:45 +00:00
skodak 2b53194573 fixed riskbitmask problems, sorry :-( 2006-08-31 16:01:41 +00:00
skodak be4486da83 capability riskbitmasks and user trustbitmask patch #1 see MDL-6412 2006-08-31 08:36:36 +00:00
moodler 86cbff7abd Clean up for role_assign() 2006-08-31 08:30:28 +00:00
moodler f44152f44c Added "enrol" parameter to role_assign which records how this assignment
was made
2006-08-31 07:58:53 +00:00
moodler a9e1c058d5 More robustness fixes for accesslib 2006-08-31 07:40:48 +00:00
moodler c5ddc3fd8b More defensive get_parent_cats() 2006-08-31 05:06:30 +00:00
moodler 5f70bcc3a0 Some robustness when loading capabilities 2006-08-31 04:17:51 +00:00
toyomoyo 1648afb278 changes to how to pull out a list of users (course/module participants) 2006-08-28 08:42:30 +00:00
skodak 9425b25f46 Many bugs and typos fixed in capabilitties and legacy isteacher() and similar functions - not many lines changed but it was a looong coding day.
Roles and capabilities should be usable now and old unconverted code should work too :-D

Tested only in fresh installation - admin, teacher and student roles should sort of work.
2006-08-25 20:12:12 +00:00
skodak 51195e6f9f fixed missing global $CONTEXT in get_context_instance() 2006-08-25 14:15:52 +00:00
toyomoyo 41d7209c7f some (mainly admin realated) capabilities 2006-08-25 08:27:27 +00:00
toyomoyo 5769734f2a changing default override values 2006-08-23 08:14:14 +00:00
toyomoyo 945f88ca15 various changes - loading capabilities for questions, quiz, hide tab if no assignalbe or no overridable role is found, added some functions and comments in accesslib 2006-08-23 06:36:08 +00:00
moodler d9a35e1270 Fixed context caching (wasn't using globals) 2006-08-23 01:29:52 +00:00
tjhunt 75e84883ca Unbreak roles and permission on Postgres yet again.
If you want a laugh, compare this fix the with the diff between revisions 1.5 and 1.6 of this file.
2006-08-22 16:18:11 +00:00
toyomoyo 5cf38a57cd some quiz capabilities 2006-08-22 09:04:23 +00:00
toyomoyo d140ad3f7c fix for bug #6307, reserved word 'level' changed to 'aggregatelevel' for Oracle. Some parts could be broken by this. please report breakage asap! Thanks 2006-08-21 05:19:16 +00:00
moodler c06140513d Fixed up get_user_roles to remove notices 2006-08-19 08:12:45 +00:00
toyomoyo 68c5252623 adding functions and interface for access control - role assignment and role overrides 2006-08-18 08:01:16 +00:00
toyomoyo 0a8a95c91e some more UI stuff 2006-08-15 08:29:29 +00:00
moodler 10f5c89035 FIxed another ossible notice during upgrade 2006-08-14 13:44:10 +00:00
moodler 9db12da755 Fixed some notices during install 2006-08-14 13:42:34 +00:00
moodler 218564acfc Fixed bug #6238, bad debug statements 2006-08-14 08:26:58 +00:00
moodler e4dd322255 Function to get roles used in a context 2006-08-14 08:14:02 +00:00
vyshane cee0901c06 Formatting cleanups and comments 2006-08-14 07:15:03 +00:00
moodler 65f4d137a7 Fixed a typo 2006-08-14 06:22:29 +00:00