tjhunt
68099376a3
accesslib: Nice debug developer warning if you call get_users_with_capability without including u.id in the list of fields.
2009-01-14 04:44:08 +00:00
tjhunt
6548bc4898
accesslib: MDL-17626 role_names not cleaned up when a context is deleted.
2009-01-09 05:25:59 +00:00
skodak
7e8ab13d8f
MDL-17556 fixed whitespace; backported from HEAD
2008-12-30 16:34:14 +00:00
mjollnir_
c165e7462e
MDL-17693: get_role_users - add lastaccess & mnethostid to the list of default fields to return. These are used by messaging/emailing.
2008-12-19 08:56:01 +00:00
mjollnir_
fd5244dc46
MDL-17692: count_role_users now accepts an int or an array of ints for roleid - this is now consistent with get_role_users.
2008-12-19 08:45:09 +00:00
sam_marshall
7acc360f7c
MDL-17556: Improve performance of get_fast_modinfo when courses have many activities
2008-12-17 12:40:09 +00:00
stronk7
b18ecac385
MDL-17647 accesslib - cleaning some candoanything in comments
2008-12-17 00:29:52 +00:00
tjhunt
9be7cc58e4
accesslib: MDL-17648 fix stupid typo. Sorry.
2008-12-15 08:12:53 +00:00
tjhunt
6913746fb1
accesslib: MDL-17647, MDL-17648 and MDL-17649 Bug fix, improvement and unit test.
...
MDL-17647 was referring to moodle/site:candoanything insstead of moodle/site:doanything
MDL-17648 Let get_users_by_capability take an array of capabilities, like has_any_capability
MDL-17649 get_users_by_capability must have unit tests (HEAD only).
The unit tests were briefly working (apart from the system context, which I had to set up by hand in the test contexts table). Then I made the mistake of trying to upgrade the test tables, and it all went horribly wrong (MDL-17644).
2008-12-15 06:22:40 +00:00
skodak
7fae1f7b6c
MDL-17589 fixed handling of missing caps in admin tree
2008-12-12 10:45:48 +00:00
skodak
16d3155e4e
MDL-17502 accesslib: added warning if incorrect parameters supplied to has_all_capabilities() and fixed parameters in course lib code; backported from HEAD
2008-12-09 16:26:16 +00:00
tjhunt
02d92a5513
course categories: MDL-17502 when deleting a category and its contents, check moodle/course:delete capability.
...
* Note: this would never lead to problems with default role definions.
* Also ended up mostly rewriting delete_category_form to simplify the messages that are displayed.
* New helper function require_all_capabilities, a bit like require_any_capability.
2008-12-08 07:28:04 +00:00
tjhunt
79518165b9
course categories: Fix many bugs with category editing and permissions. Clean up code.
...
Bugs: MDL-17479, MDL-16426, MDL-16063, MDL-16013, MDL-15658, MDL-15556, MDL-15161, MDL-14925, MDL-13742, MDL-11557.
* Simplify category editing permissions to just moodle/category:manage and moodle/category:seehiddencategories.
* Enforce those correctly. (Note MDL 17502 is still outstanding.)
* Don't screw up category sort order when you just edit name or description.
* Niceties like where redirects go when you cancel or submit forms.
* Make sure a global course creator can see the site admin block.
* Don't allow a category to be made the child of one of its children!
* General code cleanup to bring key files more in line with best pracitice.
Apologies for the fact it is one big patch, rather than a series of smaller patches. However, categoryedit.php, category.php and index.php where in pretty bad shape and needed significant cleaning up. categoryedit.php, in particular, was almost completely rewritten.
2008-12-04 08:49:47 +00:00
tjhunt
059ec02aaa
Fix notice.
2008-12-01 07:19:40 +00:00
skodak
cecd63c9f2
MDL-17372 new course reports string - role definition improvement
2008-11-29 16:28:21 +00:00
skodak
12748c8425
MDL-17372 course reports: Added full plugin support for course reports - backported from HEAD
2008-11-27 20:31:02 +00:00
skodak
2d89f2de76
MDL-17372 admin reports: Added full plugin support for admin reports; added specail capability for unittest execution, minor refactoring - backported from HEAD
2008-11-26 20:58:03 +00:00
tjhunt
5e304e4900
role assign: MDL-13325 when assigning roles inside front page activites, list all users as potential users.
2008-11-11 07:23:36 +00:00
nicolasconnault
1f02086d55
MDL-16892 Fixed bug in accesslib role_fix_names method
2008-10-20 13:43:12 +00:00
stronk7
4c22bf9766
Substring MSSQL function *requires* 3rd parameter - MDL-16655
2008-09-24 17:26:27 +00:00
stronk7
28d6c12579
Prevent get_users_by_capability() to retrn deleted users. MDL-16323
2008-09-11 22:14:10 +00:00
tjhunt
a16f9c67fb
MDL-12336 Inconsistent naming of the Front page area of the question bank, and the front page context more generally.
2008-09-05 04:05:16 +00:00
stronk7
9b1294cad1
Improve get_user_courses_bycap() queries. MDL-16209
2008-08-28 12:37:58 +00:00
stronk7
9f00b6e8b4
Avoid "some" ra's duplicates. MDL-14817
2008-08-18 22:37:18 +00:00
stronk7
38a1e2bc67
Making some accesslib queries cross-db. Avoid using DISTINCT clauses on TEXT fields. MDL-16034
2008-08-18 18:35:43 +00:00
tjhunt
5929f17c0e
Correct a URL in a comment.
2008-08-13 05:27:51 +00:00
skodak
3b20cc2f8f
MDL-15941 block view permissions override regression fixed, merged from HEAD
2008-08-06 05:08:35 +00:00
moodler
23ab305b99
MDL-15841 Removed the default safe overrides for new installs (MDL-8521)
2008-07-28 03:11:35 +00:00
skodak
3e79b6e37a
MDL-11421 context levels fixed in capability definitions, sorting of caps by name, plug-ins may report used core caps, fixed some risks
2008-07-24 21:58:05 +00:00
skodak
bc8b3aa84d
MDL-8521 new feature - safe overrides, see tracker for details
2008-07-23 16:09:13 +00:00
skodak
48f3e237f5
MDL-9983 role_unassign should not touch group members table directly - we need events
2008-07-06 22:54:05 +00:00
skodak
9952398b7f
MDL-9983 role assignment related triggers
2008-07-06 19:26:21 +00:00
sam_marshall
2a212d94a0
MDL-14965: Pass-by-reference call broke install on php5
2008-05-23 10:36:11 +00:00
dongsheng
ca5d438280
"MDL-14668, fix course full in activity reports (upgrade course module version)"
2008-05-16 02:07:57 +00:00
tjhunt
26337523fa
New convinience function in accesslib: get_parent_contextid. Also, the start of some unit tests for accesslib, but only this trivial funciton, and the get_parent_contexts function it is based on. Still, it is a start.
2008-05-12 15:28:31 +00:00
moodler
94ad221b27
MDL-13261 get_context_users_bycap and get_context_users_byrole were draft and should never have been included in accesslib in 1.9 STABLE. To avoid confusion I've removed these functions. They weren't being used by any core code ... I only hope no-one out there is using them for Moodle 1.9 modules. :-( :-(
2008-04-29 06:48:56 +00:00
moodler
6c089f4a28
MDL-11323
...
Cleaned up the display of role aliases by extending get_assignable_roles
and get_overrideable_roles to use role_fix_names better.
The lists of assignable and overrideable are now correctly derived from the
actual context (eg activity or module) while the aliases are derived from course
that is the parent.
Some other cleanups along the way.
2008-04-18 06:18:25 +00:00
moodler
fe01ad8ec0
MDL-11142 Roles upgrade was losing timestart and timeend for teachers and students (Merged from 1.7)
2008-04-18 03:31:54 +00:00
moodler
b6f293036f
MDL-13810 Fixed check for join
2008-03-19 07:48:45 +00:00
moodler
d8f4ee51a5
MDL-13810 Fixed check for ul.timeaccess
2008-03-06 02:11:53 +00:00
moodler
15e6b71bc0
MDL-13754 Avoid joining to lastaccess unless we really wanted it
...
Plus some other cosmetic tidying and comments
2008-03-03 06:19:31 +00:00
moodler
fd21a93e5f
MDL-13676 Fixed some mistakes
2008-02-29 08:55:42 +00:00
moodler
f45aff70d9
MDL-13676 Changed a field so that Oracle can cope with a COALESCE statement. :-(
...
I hate doing this at this late stage, but without it Oracle fails.
On the way I also fixed the profile page so it displays role aliases if they exist
2008-02-29 08:40:39 +00:00
tjhunt
0a22085fdb
MDL-13723 - Unbalanced brackets in get_users_by_capability in the groups bit.
2008-02-28 22:39:15 +00:00
skodak
20d03127ad
MDL-13560 simplify deating with role name course aliases
2008-02-21 09:16:34 +00:00
skodak
490c14fe8a
MDL-13459 fixed hardcoded mdl_ prefix
2008-02-16 11:35:54 +00:00
nicolasconnault
ee6689b003
MDL-13459 Didn't use the patch, which puts its finger in too many pies. Instead just implemented a quick-fix, a temporary get_assignable_for_switchrole() function. It only affects the switchroles menu
2008-02-15 16:35:19 +00:00
nicolasconnault
29252268ca
MDL-13459 Didn't use the patch, which puts its finger in too many pies. Instead just implemented a quick-fix, a temporary get_assignable_for_switchrole() function. It only affects the switchroles menu
2008-02-15 16:35:19 +00:00
skodak
5623276da8
MDL-13450 and MDL-13303 - sorry for changing forum API so late, but it was needed; major perf improvement for forum; fixed printing of user pictures
2008-02-13 17:01:41 +00:00
poltawski
c472c4bb50
MDL-13314 count_role_users was showing different count to those returned from
...
get_role_users(), based on patch from Patrick Pollett
2008-02-05 17:18:10 +00:00