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
Eloy Lafuente (stronk7)
babbab1449
Merge branch 'MDL-27040' of git://github.com/timhunt/moodle
2011-07-06 19:25:47 +02:00
Aparup Banerjee
728ebac7f2
MDL-28135 general Updating all hardcoded "docs.moodle.org/en/Development:" type doc links to "docs.moodle.org/dev/"
2011-07-05 14:27:31 +08:00
Tim Hunt
abc2575493
MDL-27040 get_users_by_capability generates u.id IN () when no uesrs have accessallgroups
2011-07-04 18:50:21 +01:00
Petr Skoda
cf717dc26b
MDL-27148 use new get_in_or_equal() param prefix instead of start
2011-04-14 15:15:01 +02:00
Petr Skoda
82053cb192
MDL-26805 cleanup default role selections
...
Frontpage role selection now allows only guest and frontpage roles. Default forntpage role is selected duuring install. Unused nodefaultuserrolelists option was removed completely. Coding style improvements.
2011-04-11 13:10:50 +02:00
Petr Skoda
431ac39634
MDL-26623 fix file permissions
...
The permissions are now going to be verified as part of the weekly release process.
2011-03-01 12:26:49 +01:00
Petr Skoda
28765cfcb5
MDL-25575 fix broken block support in get_courseid_from_context()
2011-02-13 18:59:53 +01:00
Eloy Lafuente (stronk7)
e030faee3e
Take out debugging & merge branch 'w05_MDL-26198_20_completion' of git://github.com/skodak/moodle
2011-01-31 17:43:22 +01:00
Petr Skoda
ff03c5b6b5
MDL-26198 make user_has_role_assignment() check parent contexts too
2011-01-30 21:49:22 +01:00
Eloy Lafuente (stronk7)
afa559e9bc
MDL-25708 recordsets - fix accesslib and datalib uses
2011-01-25 19:58:59 +01:00
Dan Poltawski
047c3b6cd3
lib/accesslib.php MDL-25709 - fix docs
2011-01-03 23:41:10 +00:00
David Mudrak
61869c550f
MDL-25316 capabilities defined in subplugins are available when overriding the module permissions
2010-12-02 16:51:41 +00:00
Sam Hemelryk
ed1d72ea70
navigation MDL-25142 Fixed up differences in navigation between guest and normal user.
...
As part of this patch I also introduced a new method in accesslib can_access_course that can be used
to check a users access to a course.
I also fixed a minor issue with guest access flag caching in require_login
2010-11-11 03:37:56 +00:00
Petr Skoda
090b958641
no return necessary after exception thrown
2010-11-11 00:39:53 +00:00
Andrew Davis
46505ee75e
message MDL-24694 removed references to user->emailstop. the column itself will be removed in a later version
2010-11-05 08:04:40 +00:00
Petr Skoda
1fa894b374
fixed table name typo
2010-10-27 08:09:32 +00:00
Petr Skoda
d0e538ba1c
MDL-19702 rewritten context caching by Sam Marshall + tweaks for potential problems caused by drift
2010-10-26 16:21:23 +00:00
Petr Skoda
79556891f8
MDL-24847 fixed problem when default roles have probibit capabilities
2010-10-26 07:51:09 +00:00