Commit Graph

529 Commits

Author SHA1 Message Date
Aparup Banerjee 1384c7e685 MDL-28209 General - following up on MDL-28135, modified links to point to 1.9 version of docs
- development links pointed under /dev.
2011-07-25 14:42:27 +08:00
Anthony Borrow eddf533b0a MDL-20607 - adding firstname as secondary sort criteria 2011-01-05 09:30:20 -06:00
Petr Skoda e720dbd79a MDL-22531 fix for broken sql in get_users_by_capability() in cases where role_assignmetns is not in the resulting query such as when only default role is interesting for us - thanks Ye Chen for the report and solution 2010-05-20 18:35:05 +00:00
ericmerrill bd1f93687d My Moodle/Courses: MDL-20472 get_my_courses returns 2 more courses then limit. Repairs two off by one errors in get_my_courses and get_user_courses_bycap. 2009-10-08 04:52:16 +00:00
skodak e426c25127 MDL-19039 improved default frontpage role capability evealuation, needs to be manually enabled in config.php 2009-10-05 17:06:51 +00:00
skodak 9b1424d7f8 MDL-19288 fixed limiting cached context - array_shift() was breaking array keys 2009-05-23 20:07:12 +00:00
stronk7 f10af7b137 MDL-18746 get_user_courses_bycap() - avoid ambiguous (repeated) column names 2009-05-11 00:02:43 +00:00
skodak 400688352e MDL-19009 cleanup - there is no CONTEXT_GROUP and pinned block context; backported from HEAD 2009-05-04 20:24:45 +00:00
sam_marshall 786eed65f9 MDL-18768: Limited size of context and modinfo caches to avoid memory problems with code that loops through many courses, also changed forum role_assign to use recordset for all-courses loops 2009-04-06 09:49:40 +00:00
sam_marshall 04e43cfc7e MDL-18094: course/viewhiddenactivities didn't work (in some parts of the code) at module level 2009-04-02 16:32:37 +00:00
tjhunt 5df04607be accesslib: MDL-18604 you should never be allowed to switch to a role with moodle/site:doanything.
Further logic correction.
2009-03-25 02:37:27 +00:00
tjhunt 9658298c2e accesslib: MDL-18604 you should never be allowed to switch to a role with moodle/site:doanything.
The SQL in get_assignable_roles_for_switchrole was wrong.
2009-03-25 01:41:05 +00:00
stronk7 cc18654ce9 MDL-15748 get_user_access_sitewide() - reduce looking for perms in any context below category level.
Dramatic speed-up in sites with zillions of contexts and overrides. Credit goes to Samuli Karevaara.
2009-03-20 12:01:38 +00:00
jerome 0c24a4523d Switch Roles MDL-11313 add a new config option to allow user to switch roles that they can't assign 2009-02-12 02:29:34 +00:00
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