Commit Graph

843 Commits

Author SHA1 Message Date
Neill Magill 43f35d037e MDL-49613 access: count_role_users gives unexpected results
The count_role_users function in lib/accesslib.php gives the wrong results if a user has the
same role at multiple levels in a context path.

For example a user is a coursecreator on a course and the category that the course is in,
in this case they would be counted twice, rather than being recognised as the same user.

This change will make the function only count unique users.
2015-04-22 09:28:42 +01:00
Tony Levi 5bc1cf85db MDL-49395 accesslib: Make get_suspended_userids more efficient 2015-04-02 13:55:17 +10:30
Andrew Nicols bb323b1876 MDL-48807 accesslib: Change create_level_instance to recordset 2015-02-23 16:03:23 +08:00
Simey Lameze 1cf194adaa MDL-48807 accesslib: table locking fix on all create_level_instance 2015-02-23 14:41:05 +08:00
Michael Aherne 59e724cfa1 MDL-48830 accesslib: Add sort field to query 2015-01-15 10:19:38 +00:00
Mark Nelson 702e2eb195 MDL-47780 core: corrected docs for get_user_capability_course() 2014-10-21 00:53:19 -07:00
Kordan 893ded8a91 MDL-47594 core_accesslib: removed three useless lines of code 2014-10-10 08:44:07 +02:00
Sam Hemelryk bfe4417cb7 MDL-45678 cache: renamed new cache and better comments 2014-07-08 09:52:53 +12:00
Damien Bezborodov 0ba5f02b15 MDL-45678 assignsubmission_comments: Improve performance for permissions checking 2014-07-04 14:25:06 +09:30
Tim Hunt 63e5416f5b MDL-45618 Fix @since PHPdoc tags. 2014-05-20 15:03:34 +08:00
Mark Nelson 02a5a4b2ff MDL-43557 events: fixed minor issues in existing events 2014-04-29 19:16:11 -07:00
Petr Škoda aa386d2929 MDL-45100 fix course_context classname PHPDdos typo in context API 2014-04-15 15:46:19 +08:00
Brent Boghosian 00dabc896b MDL-43635: Further support custom contexts
Reading from config DB table and reset method for after plugin install
Add PHPUnit test for custom context changes
2014-03-05 15:01:30 +08:00
Dan Poltawski 745f2cc521 Merge branch 'MDL-44436-master' of git://github.com/FMCorz/moodle 2014-03-04 14:40:23 +08:00
Frederic Massart cea24f4852 MDL-44436 context: Context IDs are forced to be int
The method context::insert_context_record() sets the context::$id to
an int, while when we create an instance, the $id is often read from
a DB $record object, and is a string. The ID should always be an int.
2014-03-04 14:24:40 +08:00
Marina Glancy cd5be9a504 MDL-44321 events: make sure the full object is passed to add_record_snapshot() 2014-02-28 16:37:36 +08:00
sam marshall 0f1882ed1f MDL-43619 Roles: reset_role_capabilities unit test, cache fix 2014-01-14 13:46:25 +00:00
sam marshall 3978da9e2f MDL-43619 Roles: reset_role_capabilities function destroys overrides 2014-01-14 13:46:24 +00:00
Petr Škoda 19dc3b0b0d MDL-43367 stop returning of bogus context children when path unknown
This also prevents deletion of system context.
2013-12-22 15:58:30 +08:00
Simon Coggins 529b85b06f MDL-43049 accesslib: Fix typo in memory optimization code 2013-11-26 08:01:28 +13:00
Rajesh Taneja 045d913d11 MDL-42560 Events: Removed use of role->name
role->name is usually empty or localized, so should not be used in events
2013-10-28 11:06:47 +08:00
Petr Škoda 0aa535bf1d MDL-20045 add support for custom context levels 2013-08-31 11:47:44 +02:00
Damyon Wiese 74df2951d1 Revert "MDL-39876 Change get_record('course') calls to get_course"
This reverts commit ab7632b74c.
2013-08-21 13:42:30 +08:00
Sam Hemelryk 6eee89bc8f Merge branch 'MDL-39876-master' of git://github.com/sammarshallou/moodle
Conflicts:
	course/lib.php
2013-08-21 12:08:46 +12:00
Dan Poltawski 6f44a73369 Merge branch 'w33_MDL-39474_m26_debugdeveloper' of https://github.com/skodak/moodle
Conflicts:
	lib/upgrade.txt
2013-08-20 11:42:03 +08:00
sam marshall ab7632b74c MDL-39876 Change get_record('course') calls to get_course 2013-08-15 11:31:20 +01:00
Petr Škoda 96f81ea385 MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init 2013-08-12 13:01:47 +02:00
Rajesh Taneja a7524e354b MDL-40044 Roles: Added role_deleted event and replaced related add_to_log 2013-08-09 17:59:54 +08:00
Eloy Lafuente (stronk7) 18c4d7e68c Merge branch 'w30_MDL-40723_m26_creators' of https://github.com/skodak/moodle 2013-07-23 20:32:40 +02:00
Petr Škoda c6f5e84f9d MDL-40723 fix docs typo 2013-07-23 15:59:02 +02:00
Petr Škoda 54d5308ef0 MDL-40723 use guess_if_creator_will_have_course_capability() for the new weird function 2013-07-23 15:55:07 +02:00
Damyon Wiese c31909cb69 Merge branch 'w30_MDL-39846_m26_event2' of https://github.com/skodak/moodle 2013-07-22 15:05:53 +08:00
Petr Škoda a56ec91842 MDL-40723 add new will_have_course_capability() 2013-07-21 11:55:22 +02:00
Mark Nelson b645284403 MDL-40468 libraries: deprecated get_related_contexts_string() 2013-07-19 15:17:49 +08:00
Petr Škoda 5fef139cd9 MDL-39846 rename cached record to snapshot 2013-07-19 08:43:28 +02:00
Petr Škoda c4297815eb MDL-39846 rename 'extra' event property to 'other' 2013-07-19 08:43:28 +02:00
Petr Škoda 4b734e74ae MDL-39846 more fixing and cleanup of new events
* fix typos (thanks Rajesh)
* move log related data out from event API specification
* change callable key in definition to callback
* use event data in observers instead of cached records if possible
* event level is now a number 1…100
* improved event safety checks
* add event name and description method
* new can_view() method
* improve unit tests to test all callable types
* improved performance
2013-07-19 08:43:27 +02:00
Petr Škoda b474bec396 MDL-39846 sample conversion of role assignment events 2013-07-19 08:43:27 +02:00
Eloy Lafuente (stronk7) fb1788c598 Merge branch 'MDL-40424-master' of git://github.com/FMCorz/moodle
Conflicts:
	admin/oacleanup.php
2013-07-17 01:21:51 +02:00
Petr Škoda b0d1d941c9 MDL-40220 use new core_component::get_component_directory() 2013-07-16 22:42:37 +02:00
Petr Škoda 56da374e1e MDL-40220 use new core_component::normalize_component() 2013-07-16 22:41:00 +02:00
Petr Škoda 1c74b26090 MDL-40220 use new core_component::get_plugin_directory() 2013-07-16 22:38:38 +02:00
Petr Škoda bd3b3bba9f MDL-40220 use new core_component::get_plugin_list() 2013-07-16 22:36:11 +02:00
Damyon Wiese 1d1f7ac81f Merge branch 'MDL-40463-master' of git://github.com/FMCorz/moodle 2013-07-16 21:59:47 +08:00
Damyon Wiese 3fd74243a7 Merge branch 'wip-mdl-40467' of git://github.com/rajeshtaneja/moodle 2013-07-16 21:51:19 +08:00
Damyon Wiese 820ad5dfd8 Merge branch 'MDL-40465-master' of git://github.com/FMCorz/moodle 2013-07-16 21:35:38 +08:00
Damyon Wiese 259e3c2525 Merge branch 'MDL-40464-master' of git://github.com/ankitagarwal/moodle 2013-07-16 15:44:38 +08:00
Damyon Wiese 06c8b60936 Merge branch 'MDL-40462_master' of https://github.com/markn86/moodle 2013-07-16 15:00:46 +08:00
Damyon Wiese ed9e492087 Merge branch 'MDL-40431_master' of https://github.com/markn86/moodle 2013-07-16 14:49:25 +08:00
Damyon Wiese d981272e64 Merge branch 'wip-mdl-40428' of git://github.com/rajeshtaneja/moodle 2013-07-16 13:33:27 +08:00