Adrian Greeve
7c8afa8ff8
MDL-51833 tool_monitor: Improve access check for monitor.
2017-02-27 08:59:45 +08:00
Ankit Agarwal
5e80c61df4
MDL-57027 accesslib: Improve perf of sql
2017-02-01 13:01:29 +08:00
Petr Skoda
a6210651a9
MDL-57027 fix get_users_by_capability()
...
Change-Id: I98dc88784dfa0293f88a19c3d36e7a46a3f52672
2017-02-01 13:01:28 +08:00
Damyon Wiese
2fedc0da7c
MDL-57001 roles: Do access check for switchroles
...
Put it in the API so it can't be skipped.
2016-11-24 15:11:19 +08:00
Marina Glancy
e938ea398c
MDL-57007 behat: assume all capabilities during installation
2016-11-17 13:07:09 +08:00
John Beedell
10c4fce520
MDL-27072 Quiz: Remove get_users_by_capability from quiz reports
2016-10-10 11:05:15 +01:00
John Beedell
9121bb2d23
MDL-31243 access/enrol libs: new fns returning useful SQL fragments
...
Refactor similar SQL generation code from get_users_by_capability
and get_enrolled_uses to make get_with_capability_sql.
Modified files: accesslib.php, enrollib.php, grouplib.php, new tests.
2016-09-30 09:27:56 +01:00
John Beedell
9f5170e955
MDL-31243 access/enrol libs: move enrol functions
2016-09-30 09:27:53 +01:00
Alexandru Elisei
03856ac5e8
MDL-55423 accesslib: Prevent get_role_users() false debugging messages
2016-08-17 20:43:39 +03:00
Tim Hunt
795efd9c1b
MDL-54582 accesslib: improve performance of load_course_context
...
The new query is logically equivalen, but much, much faster, at
least on Postgred. (15ms, instead of 700ms, in one example I tried
on the database for the OU's main Moodle site.)
2016-05-13 20:36:33 +01:00
Andrew Nicols
83fc2cbd0d
MDL-52574 core: Remove ASC/DESC when adding params from sort
2016-03-16 10:58:04 +08:00
Alexandru Elisei
b6d1286414
MDL-52574 accesslib: Prevent get_role_users() fail in certain cases
...
The function get_role_users() requires the caller to include the $sort fields in
the $fields argument. On PostgreSQL this will cause the function to fail when
the default $sort fields aren't part of the requested fields. The behavior of
the function is augmented to add the $sort fields to $fields if they are not
already present.
2016-03-11 13:10:01 +02:00
Oleg Sychev
87b2ed6c1f
MDL-51746 accesslib: Describe instanceid in context_something::instance
...
With no PHPDocs and $instanceid as name some module developers confuse
context_module::instance argument to be instanceid of the module while
it actually should be cmid.
2015-12-03 11:11:05 +01:00
Marina Glancy
5667e60249
MDL-41042 coursecat: reset course contacts cache more often
2015-10-07 10:23:03 +08:00
Eloy Lafuente (stronk7)
188458a604
MDL-50049 deprecation: Extra minor fixes.
...
- complete and cleanup upgrade.txt
- replace remaining uses in comments.
- fix some incorrect bulk-replacement in previous commit.
2015-07-10 01:59:31 +02:00
Dan Poltawski
a0dffaa946
MDL-42192 accesslib: tweak get_all_capabilities
...
Tony thinks its bike shed painting, I think its a bit more readable
and memory efficient. I am using integrator dictatorship for sure.
2015-06-18 07:13:37 +02:00
Tony Levi
aa7017432a
MDL-42192 accesslib: Cache capabilities list
...
With thanks to Andrew Nicols <andrew@nicols.co.uk> for some ammendments.
2015-05-14 11:23:47 +09:30
Neill Magill
9d72ae249c
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:34:45 +01:00
Tony Levi
a7e4cff20a
MDL-49395 accesslib: Make get_suspended_userids more efficient
2015-04-02 13:53:49 +10:30
Andrew Nicols
558354df81
MDL-48807 accesslib: Change create_level_instance to recordset
2015-02-23 16:01:58 +08:00
Simey Lameze
5a39b24b9a
MDL-48807 accesslib: table locking fix on all create_level_instance
2015-02-23 14:25:21 +08:00
Michael Aherne
c3acc77965
MDL-48830 accesslib: Add sort field to query
2015-01-15 10:12:23 +00:00
David Monllao
a8e60d97d9
MDL-22309 accesslib: Preventing incorrect get_role_users() uses
2014-11-24 10:46:04 +08:00
Mark Nelson
6c271ab5e6
MDL-47780 core: corrected docs for get_user_capability_course()
2014-10-21 00:52:54 -07:00
Kordan
f656df787f
MDL-47594 core_accesslib: removed three useless lines of code
2014-10-09 11:04:36 +02:00
Marina Glancy
a3f234edfb
Revert "Merge branch 'MDL-47012-m' of git://github.com/micaherne/moodle"
...
This reverts commit 0e88fe02274f15b8ca8bfc1470a56b82f553d0d0, reversing
changes made to de62e57a9b8a535d661bd93a3c800bc5f83d5d30.
2014-09-10 11:18:52 +08:00
Michael Aherne
38b8d3e7f1
MDL-47012 core_enrol: remove desc and fix alias from ordering
2014-09-01 10:10:27 +01:00
Marina Glancy
274dc06881
MDL-34189 cohorts: Allow admin/manager to see all cohorts on one page
2014-07-28 15:02:27 +08:00
Sam Hemelryk
03ecddb440
MDL-45678 cache: renamed new cache and better comments
2014-07-08 09:52:41 +12:00
Damien Bezborodov
eeb9ee8ebf
MDL-45678 assignsubmission_comments: Improve performance for permissions checking
2014-07-04 14:24:31 +09:30
Sam Hemelryk
78c12cdb0f
MDL-43365 lib: converted text and plugin deprecated classes to new scheme
...
Four core library classes renamed for autoloading with deprecated stubs
have been converted to the new scheme for autoloading.
They are:
* textlib
* collatorlib
* plugin_manager
* plugininfo_base
These will be removed in 2.9 by MDL-46124
2014-06-25 09:30:38 +12:00
Tim Hunt
5bcfd504df
MDL-45618 Fix @since PHPdoc tags.
2014-05-19 17:03:04 +01: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 ab7632b74c331540c90229bf03d13aa2e6bdd9be.
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