Commit Graph

20 Commits

Author SHA1 Message Date
Rod Norfor 73841c3908 MDL-48914 admin: check maxuserperpage in existingroleholders->find_users 2015-01-23 16:01:46 +00:00
Tim Hunt 25a487b90a MDL-47426 assign local roles: rewrite query for better performance.
This is an extremely dangerous query, because it includes the user
table twice, along-side two other potentially large tables,
role_assignments and user_enrolments.

The solution is to rewrite the query so that:

1. The subquery is JOINed, not WHERE ... INed. Typically query
   optimisers handle the JOIN case better.

2. Before the join was role-assignments <-> users <-> subquery.
   That is, everything was linked to u.id.

   Now the linking is role-assignments <-> subquery <-> users,
   so the SELECT DISTINT eu1_u.id FROM {enrolled users} is central.
   That seems to send a strong hint to the query optimiser about
   a good order to execute the query.
2014-10-02 17:10:57 +01:00
Frederic Massart d019ffd21f MDL-45596 roles: Escape filter value before using it in form field 2014-07-04 11:49:42 +08:00
Petr Škoda 0aa535bf1d MDL-20045 add support for custom context levels 2013-08-31 11:47:44 +02:00
Petr Škoda 2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Frederic Massart a439b2f9b4 MDL-40465 libraries: Deprecate fetch_context_capabilities() 2013-07-11 14:33:25 +08:00
Adrian Greeve 329846f198 MDL-40430 - Libraries: Deprecate print_context_name(). 2013-07-09 16:11:55 +08:00
Petr Škoda 1415127ebc MDL-40337 fix some more deprecated calls in role code 2013-06-27 22:41:14 +02:00
Petr Škoda 5089cca0b4 MDL-40337 use full frankenstyle in get_string() calls 2013-06-27 22:17:46 +02:00
Petr Škoda 07364397cd MDL-40337 fix remaining code checker troubles in admin/roles/* 2013-06-27 22:17:45 +02:00
Petr Škoda 72de139a6e MDL-40337 cleanup role permissions code 2013-06-27 22:17:45 +02:00
Petr Škoda d7797b7924 MDL-40337 cleanup role override code 2013-06-27 22:17:45 +02:00
Petr Škoda bb061951a0 MDL-40337 cleanup role definition code 2013-06-27 22:17:45 +02:00
Petr Škoda aac13d6728 MDL-40337 cleanup role assign pages 2013-06-27 22:17:45 +02:00
Petr Škoda 67ab75e521 MDL-40337 cleanup role allow pages 2013-06-27 22:17:45 +02:00
Petr Škoda d6c4544d63 MDL-40337 cleanup admin select UI 2013-06-27 22:17:44 +02:00
Petr Škoda bc7b53fb49 MDL-40337 use class loader for admin/roles/* 2013-06-27 22:17:44 +02:00
Petr Škoda 4dd680c74e MDL-17081 allow role reset to self
The use case is importing of incomplete XML preset - keep current + preset changes. This also discards any pending changes.
2013-06-25 15:15:46 +02:00
Petr Škoda fcd75b6e6d MDL-17081 store also CAP_INHERIT in role export files 2013-06-25 00:24:55 +02:00
Petr Škoda 5e72efd498 MDL-17081 add role export/import
This includes improved role creation, allowed roles are editable and other improvements.
2013-06-24 12:40:59 +02:00