947 Commits

Author SHA1 Message Date
Petr Škoda
fa0ad435f5 MDL-39004 improve role docs 2013-04-07 17:39:29 +02:00
Petr Škoda
77a5c09354 MDL-37742 simplify dirty one-space oracle hack 2013-03-24 13:43:18 +01:00
Petr Škoda
ab633dafac MDL-38319 make role_get_names() faster and more useful 2013-03-17 20:15:59 +01:00
Andrew Davis
c90e6b4644 MDL-36091 added debugging() calls in blocks of code marked as "should never happen" 2013-02-11 13:24:52 +08:00
Dan Poltawski
0efd8de527 Merge branch 'w02_MDL-36898_m25_ccontact' of git://github.com/skodak/moodle 2013-01-15 13:57:39 +08:00
Petr Škoda
2c4bccd5b8 MDL-35685 attempt to improve slow USER access array init 2012-12-20 22:51:29 +01:00
Petr Škoda
49ee37d3ac MDL-36898 use only enrolled users as course contacts 2012-12-20 22:38:50 +01:00
Adrian Greeve
3370f216a2 MDL-37026 - lib: The function user_can_assign() returns true for admins. 2012-12-06 10:52:09 +08:00
Tim Hunt
9695ff811b MDL-34657 user sorting: consistent sorting everywhere.
This commit coverts everything in the codebase to use the new
users_order_by_sql function when sorting lists of users. More details in
the bug.

Note that this does not change places where users are displayed in a
sortable table, and the sort order comes from the table.
2012-09-27 12:41:42 +01:00
Tim Hunt
34bc5e2f3a MDL-35133 accesslib: context_module::get_context_name should format_string
Otherwise activites with multilang names are displayed badly.
2012-08-30 22:38:24 +01:00
Tim Hunt
157583b862 MDL-34704 couse, accesslib: improve $CFG->courselistshortnames
1. get_context_name should respect the $CFG->courselistshortnames
setting.

2. When $CFG->courselistshortnames is on, what to display should use a
language string, rather than string concatenation. This makes it
possible for people to configure the display. For example, they might
want 'My first course [M101]' instead of 'M101 My first course'.
2012-08-03 13:01:05 +01:00
Petr Škoda
c8b3346cfd MDL-33180 delete the last traces of SimpleTest - ciao and thanks 2012-07-21 10:11:50 +02:00
Tim Hunt
ab0c7007c5 MDL-23219 check permissions: show relevant role-assignments.
Adding this list of role assignments should make it much easier for
admins to work out why, when the permissions shown in the check
permisisons page are now what they expect.

I thought about making the links go more directly to, for example, the
assign roles pages for each context, but because of things like
enrolments in courses that is hard. It is only two clicks to go to the
context, then click the right link in the settings block there.

I also re-orderd some of the code in check.php to try to get all the DB
code before all the output code.
2012-07-13 15:16:57 +01:00
Petr Skoda
c52551dc3c MDL-8249 localise standard role names and descriptions if empty 2012-07-06 08:22:34 +02:00
Andrew Robert Nicols
a386e6e017 MDL-33916 Ensure that capabilities are checked for cached user enrolments 2012-06-20 17:07:30 +01:00
Dan Poltawski
a0a87e85f0 Merge branch 'w17_MDL-32477_m23_cloneperm' of git://github.com/skodak/moodle 2012-04-23 16:35:26 +08:00
Tim Hunt
33af12eb8c MDL-32462 accesslib: fix context_user::build_paths performance
The problem was that the query was updating every row whether it needed
it or not. This turns out to be a really bad thing to do on Postgres,
because it then triggers a long expensive vacuum, which lock the context
table for a long time a really bad thing to do.
2012-04-20 10:09:44 +01:00
Petr Skoda
a36e170f7c MDL-32477 allow cloning of plugin permissions from core
Please note it is discouraged to clone from different plugin type because the upgrade order is not guaranteed.
2012-04-19 22:09:32 +02:00
Petr Skoda
a3d5830a0a MDL-32149 PHPUnit test support - part 2
Includes:
* constants refactoring
* reworked db table init
* support for $CFG->debug = -1
* functional DB tests
* fixed $DB->get_indexes() to not throw exceptions when table does not exist
* fix handling of user passwords in test db
* add debug info to exception messages
* removed unnecessary PHP debug errors from mathslib
* fixed @error suppression in get_string
* fixed PHPUnit error handler setup
* added timezone info to default install
2012-04-03 22:30:53 +02:00
Marina Glancy
b2cb00c2e9 MDL-31789: Allowing context object to be passed to JS using json_encode()
Classes with magic properties such as context do not pass through json_encode().
The solution is to implement iterator in such classes and convert what we
feed to json_encode to array using 'foreach' before we pass it to json_encode():
- class context implements IteratorAggregate
- added function convert_to_array() that converts anything to array
- before calling json_encode we convert the argument to array
2012-03-30 08:27:53 +08:00
Petr Skoda
5bd4040866 MDL-31857basic phpunit support
Thanks Eloy Lafuente, Tim Hunt and Sam Hemelryk for valuable feedback and ideas.
2012-03-21 10:31:37 +01:00
Sam Hemelryk
34223e03e6 MDL-30964 Fixed up phpdocs during integration review 2012-02-28 15:53:59 +01:00
Petr Skoda
f76249cc25 MDL30964 fix core_access API docs 2012-02-27 07:19:03 +01:00
Gerard (Gerry) Caulfield
ce8df92df1 MDL-31107 Fixing instaces of below where it is written as bellow (two L's) 2012-02-10 15:40:04 +08:00
Dan Marsden
2be99ddee8 MDL-31360 use extra param in get_in_or_equal - one less line of code... 2012-02-01 23:11:03 +13:00
Dan Marsden
d14c00e239 MDL-31360 Don't use get_in_or_equal if array is empty, tidy up structure of $extracaps array 2012-01-27 19:35:38 +13:00
Eloy Lafuente (stronk7)
dc978ceb99 Merge branch 'w03_MDL-31053_m23_contextpreloading' of git://github.com/skodak/moodle 2012-01-17 02:18:46 +01:00
Petr Skoda
843ca76111 MDL-31127 init USER->access when switching roles
Only admins were affected by this problem because has_capability() does not init USER->access for them.
2012-01-15 00:14:44 +01:00
Petr Skoda
8ab5c8ec0a MDL-31053 fix invalid context preloading in get_user_capability_course() 2012-01-14 21:36:02 +01:00
Petr Skoda
9fcbc4640d MDL-31005 fix strict coding style warning in context_helper
PHP54 compatibility
2012-01-08 15:39:03 +01:00
Eloy Lafuente (stronk7)
e968c5f910 MDL-30761 make it work under Oracle. To revisit after MDL-29765 is done. 2011-12-20 22:36:31 +01:00
Eloy Lafuente (stronk7)
311b953168 Merge branch 'w51_MDL-30761_m23_slowmysql' of git://github.com/skodak/moodle 2011-12-20 22:17:21 +01:00
Petr Skoda
af18993548 MDL-30787 fix use of module and section edit capabilities 2011-12-18 13:54:38 +01:00
Petr Skoda
e7f2c2cc9f MDL-30761 improve get_user_access_sitewide() performance 2011-12-16 16:27:01 +01:00
Aparup Banerjee
0fa557d5fd Merge branch 'MDL-30260_disable_messages' of git://github.com/andyjdavis/moodle 2011-12-01 11:24:47 +08:00
Andrew Davis
d8aa5ec7a0 MDL-30260 message: added /message/upgrade.txt, checked calls to message_send() are supplying user.emailstop and improved message_send() to handle message requests that don't 2011-11-30 10:02:45 +08:00
Sam Hemelryk
1ae9aa2b8f Merged MDL-29108 Advanced grading 2011-11-14 22:01:05 +13:00
David Mudrak
9e32368b29 MDL-29108 Remove all associated grading areas when the context is being deleted 2011-11-13 13:50:00 +01:00
Petr Skoda
bbfdff344c MDL-30131 improve current user enrol caching 2011-11-06 09:40:06 +01:00
Petr Skoda
0f14c8273e MDL-29982 fixed missing $userid
Thanks Eloy!
2011-10-30 10:53:42 +01:00
Petr Skoda
1344b0ca7f MDL-29982 improve can_access_course()
Hopefully faster and more accurate.
2011-10-29 09:45:54 +02:00
Petr Skoda
99ddfdf4c4 MDL-29918 improve accesslib inline docs 2011-10-25 14:20:22 +02:00
Petr Skoda
2020594f13 MDL-29863 fix order of context and context_helper class definitions
The switched order may create problems in older PHP versions or opt caches. In any case it is more logical to define the classes in this order. Sorry for the trouble.
2011-10-23 12:50:56 +02:00
Petr Skoda
e922fe23b6 MDL-29602 accesslib improvements
Refactoring and improvements of the accesslib.php library including prevention of access for not-logged-in users when forcelogin enabled, improved context caching, OOP refactoring of contexts, fixed context loading, deduplication of role definitions in user sessions, installation improvements, decoupling of enrolment checking from capability loading, added detection of deleted and non-existent users in has_capability(), new function accesslib test, auth and enrol upgrade notes.

More details are available in tracker subtasks.
2011-10-16 14:05:18 +02:00
Aparup Banerjee
7eae2c5ae2 Merge branch MDL-29187-master of git://github.com/samhemelryk/moodle
- resolved conflict.
2011-09-13 13:52:31 +08:00
Sam Hemelryk
63390481c4 MDL-29187 multilang Reviewed the uses of category name and ensured things are being formatted correctly 2011-09-08 09:37:07 +12:00
Sam Hemelryk
8ebbb06adf MDL-29189 mutlilang Reviewed the uses of course shortname and ensured things are being formatted consistently 2011-09-08 09:30:27 +12:00
Sam Hemelryk
7fe0effd00 Merge branch 'w29_MDL-27653_m22_usercasting' of git://github.com/skodak/moodle 2011-07-25 10:59:08 +08:00
Petr Skoda
2b55aca7b7 MDL-27653 fix incorrect int | object detection 2011-07-24 15:04:17 +02:00
Petr Skoda
b7d7aafada MDL-28392 validate capability names 2011-07-23 00:09:08 +02:00