Commit graph

919 commits

Author SHA1 Message Date
Dan Poltawski
bb0458aa7c Merge branch 'MDL-40403-master' of git://github.com/FMCorz/moodle 2013-07-09 13:38:10 +08:00
Frederic Massart
8e8891b76b MDL-40403 libraries: Deprecate get_parent_contexts() 2013-07-09 13:34:44 +08:00
Adrian Greeve
a327f25ef1 MDL-31776 - lib: Alternate name fields
Add support for additional name fields and flexible formating of
user names.
2013-07-09 11:45:50 +08:00
Sam Hemelryk
a13ee8e18a Merge branch 'MDL-40402-master2' of git://github.com/ankitagarwal/moodle 2013-07-09 14:42:03 +12:00
Damyon Wiese
64830bf658 Merge branch 'MDL-38314-master' of git://github.com/FMCorz/moodle
Conflicts:
	version.php
2013-07-08 15:10:58 +08:00
Frederic Massart
ce58136547 MDL-40466 libraries: Not deprecating get_sorted_contexts() 2013-07-05 16:15:24 +08:00
Ankit Agarwal
01546175d2 MDL-40402 libraries: update the mistake in comment 2013-07-04 15:46:15 +08:00
Ankit Agarwal
492ba9deb3 MDL-40402 libraries: Deprecate get_system_context() 2013-07-04 15:45:48 +08:00
Rajesh Taneja
85b2e46f23 MDL-40401 Libraries: load_temp_role() and remove_temp_roles() can not be used any more. 2013-07-04 15:04:09 +08:00
Frederic Massart
d802435e00 MDL-38314 repository: Delete repository instances on context deletion 2013-07-03 15:26:20 +08:00
Eloy Lafuente (stronk7)
7b2ca65574 Merge branch 'wip-mdl-35009' of git://github.com/rajeshtaneja/moodle
Conflicts:
	lib/accesslib.php
	lib/deprecatedlib.php
	lib/upgrade.txt
2013-07-02 21:22:30 +02:00
Ankit Agarwal
bea86e845e MDL-34472 libraries: Remove usage of get_context_instance() from core 2013-07-01 15:40:37 +08:00
Ankit Agarwal
61a0299a94 MDL-34472 libraries: add deprecated warning to get_context_instance() 2013-07-01 15:40:37 +08:00
Rajesh Taneja
ce2b21509e MDL-35009 Libraries: Deprecated get_context_instance_by_id 2013-07-01 14:55:23 +08:00
Eloy Lafuente (stronk7)
3093713382 Merge branch 'w26_MDL-17081_m26_roles2' of git://github.com/skodak/moodle 2013-06-24 15:39:07 +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
Ankit Agarwal
fbf4acdc9e MDL-39153 libraries: role_unassign doesn't accept context as parameter. Fixing incorrect doc. 2013-06-18 14:27:30 +08:00
sam marshall
0d9e5992b3 MDL-39454 Accesslib: is_siteadmin is a bit slow 2013-05-02 10:42:28 +01:00
Dan Poltawski
0ae1b8a294 Merge branch 'w14_MDL-39004_m25_roledocs' of git://github.com/skodak/moodle 2013-04-09 14:57:08 +08:00
Damyon Wiese
e497e90c76 Merge branch 'wip-mdl-31969' of git://github.com/rajeshtaneja/moodle
Conflicts:
	version.php
2013-04-09 14:09:14 +08:00
Rajesh Taneja
38c1dd194d MDL-31969 grades: Added user preference to show/hide/export suspended users.
User with course:viewsuspendedusers capability can now show/hide/export
enrolled users whose enrolment is suspended or enrolment time is expired.
2013-04-09 14:01:58 +08:00
Marina Glancy
30142c1905 MDL-38593 Merge code from /course/category.php into /course/index.php 2013-04-09 12:21:05 +10:00
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