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
Ankit Agarwal
2149326b8c
MDL-50049 deprecation: Remove usage of deprecated api and cleanup
2015-06-29 17:15:50 +05:30
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
3a92084c6b
MDL-49613 access: Unit test for count_role_users
2015-04-22 09:34:44 +01:00
Andrew Nicols
78db0d13de
MDL-49395 core: add more unit tests for get_enrolled_sql
2015-04-07 15:30:07 +08:00
Tony Levi
a7e4cff20a
MDL-49395 accesslib: Make get_suspended_userids more efficient
2015-04-02 13:53:49 +10:30
Ankit Agarwal
f9b7be4f95
MDL-34550 libraries: Final deprecation - get_context_instance_by_id()
2014-12-10 13:50:08 +05:30
David Monllao
655f737187
MDL-22309 accesslib: Adding unit test to expose the issue
2014-11-24 09:45:50 +08:00
sam marshall
061e6b2864
MDL-44725 Availability: Replace groupmembersonly - upgrade, core (1)
...
* Upgrades existing data so that the groupmembersonly option is
replaced with equivalent data for the new availability API.
* Removes the database field and admin setting used for
groupmembersonly.
* Changes core modinfo library to remove/deprecate groupmembersonly
data and functions.
* Changes other core library files to remove groupmembersonly
references.
Includes deprecation of several functions, listed in lib/upgrade.txt.
2014-09-02 13:03:07 +01:00
Russell Smith
d2c58b95bb
MDL-43835 phpunit: Correct unit tests.
...
When different ID's are set for each sequence a number
of unit test failures appear. They have been corrected
to allow unit tests to pass with the new generator in place.
2014-06-17 19:08:01 +10:00
Charles Fulton
2f9c7f45dc
MDL-45148 unit testing: pass role id instead of user id
2014-04-16 20:46:00 -07:00
Ankit Agarwal
b63f773296
MDL-44717 events: Fix multiple issues in events
...
Fix various incorrect urls
Fix incorrect phpdocs and other minor code style issues
Fix missing/incorrect strings
AMOS BEGIN
MOV [eventblogassociationcreated, core_blog],[eventblogassociationadded, core_blog]
AMOS END
2014-04-01 15:08:34 +08:00
Russell Smith
74b63eae76
MDL-43440 unit testing: Use cmid in unit tests when it should be used.
...
instance is has been used instead of cmid. This works as all id's are 1
in most cases, but not always.
accesslib_clear_all_caches_for_unit_testing was updated to clear the
$USER->access cache which would fail test when the wrong user's data was used.
2014-01-25 08:57:32 +11:00
sam marshall
0f1882ed1f
MDL-43619 Roles: reset_role_capabilities unit test, cache fix
2014-01-14 13:46:25 +00:00
Russell Smith
038f546777
MDL-41198 lib: Allow PHP to generate random seed on script start
...
Most srand instances are removed to allow PHP to do the work.
srand was left for group randomization due to the method used.
2013-12-18 16:45:34 +11:00
Petr Škoda
fc4365d0fe
MDL-42555 fix moodle_url typo in namespaces
2013-10-29 17:03:58 +08: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
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
487caf6b65
Revert "MDL-39876 update_course_record function to update global COURSE"
...
This reverts commit c290ac5510ca06b3eae557c2165c2f106dde46aa.
Conflicts:
course/lib.php
2013-08-21 15:21:06 +12:00
sam marshall
c290ac5510
MDL-39876 update_course_record function to update global COURSE
2013-08-15 11:31:21 +01:00
sam marshall
ab7632b74c
MDL-39876 Change get_record('course') calls to get_course
2013-08-15 11:31:20 +01:00
Rajesh Taneja
35e4eb42c0
MDL-40044 Roles: Updated role_assigned and role_unassigned event to remove add_to_log
2013-08-09 18:02:02 +08:00
Rajesh Taneja
1613ffa55f
MDL-40044 Roles: Added role_allow_*_updated events to replace add_to_log on role allow page
...
Added events:
1. role_allow_assign_updated
2. role_allow_override_updated
3. role_allow_switch_updated
2013-08-09 17:59:54 +08:00
Rajesh Taneja
82ddcad0a3
MDL-40044 Roles: Added role_capabilites_updated event and replaced related add_to_log
2013-08-09 17:59:54 +08: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
Ankit Agarwal
320aee339c
MDL-40935 phpunit: Remove assertLegacyEventName() since get_legacy_eventname() is public now
2013-08-06 14:58:30 +08:00
Sam Hemelryk
b09abb05ab
Merge branch 'w32_MDL-40901_m26_phpunitcleanup2' of https://github.com/skodak/moodle
2013-08-06 08:53:24 +12:00
Petr Škoda
aed2b9ba9c
MDL-40901 use assertInternalType()
2013-08-04 22:16:03 +02:00
Frederic Massart
d6277b0ca0
MDL-40997 phpunit: Assertions for events legacy data
2013-08-02 18:30:02 +08:00
Petr Škoda
4c9be79acd
MDL-39915 cleanup core_accesslib_testcase
2013-07-27 11:10:58 +02:00
Eloy Lafuente (stronk7)
18c4d7e68c
Merge branch 'w30_MDL-40723_m26_creators' of https://github.com/skodak/moodle
2013-07-23 20:32:40 +02:00
Petr Škoda
54d5308ef0
MDL-40723 use guess_if_creator_will_have_course_capability() for the new weird function
2013-07-23 15:55:07 +02:00
Petr Škoda
dba745265f
MDL-40723 use will_have_course_capability() to verify future course creator capabilities when creating courses
2013-07-21 17:03:20 +02:00
Petr Škoda
a56ec91842
MDL-40723 add new will_have_course_capability()
2013-07-21 11:55:22 +02:00
Petr Škoda
82b1fb5184
MDL-39846 make all legacy info protected so that it is not used accidentally outside of trigger()
2013-07-19 09:00:42 +02:00
Petr Škoda
006f2724a5
MDL-39846 fix forgotten object event property
...
Thanks Dan!
2013-07-19 08:43:31 +02:00
Petr Škoda
890e3e6415
MDL-39846 improve role assignment tests
2013-07-19 08:43:29 +02:00
Eloy Lafuente (stronk7)
fb1788c598
Merge branch 'MDL-40424-master' of git://github.com/FMCorz/moodle
...
Conflicts:
admin/oacleanup.php
2013-07-17 01:21:51 +02:00
Eloy Lafuente (stronk7)
2be1185132
Merge branch 'w29_MDL-40611_m26_accesslibtest' of https://github.com/skodak/moodle
2013-07-17 00:32:32 +02:00
Petr Škoda
701b063791
MDL-40611 fix context cache size expectation
2013-07-13 15:37:31 +02:00
Frederic Massart
2e4c0c9181
MDL-40424 libraries: Deprecate context_instance_preload_sql()
2013-07-12 17:41:49 +08:00
Frederic Massart
b123a543a6
MDL-40463 libraries: Deprecate get_courseid_from_context()
2013-07-11 15:54:36 +08:00
Frederic Massart
a439b2f9b4
MDL-40465 libraries: Deprecate fetch_context_capabilities()
2013-07-11 14:33:25 +08:00
Mark Nelson
4c9c06488a
MDL-40462 libraries: added another PHPUnit test to ensure deprecated function returns the same as the replacement
2013-07-11 13:28:45 +08:00
Mark Nelson
dd33f4af0a
MDL-40462 libraries: deprecated get_course_context()
2013-07-11 13:28:45 +08:00
Mark Nelson
9c03dff2c9
MDL-40431 libraries: added another PHPUnit test to ensure deprecated function returns the same as the replacement
2013-07-11 13:23:45 +08:00
Mark Nelson
6c89d4e1c0
MDL-40431 libraries: deprecated get_context_url()
2013-07-11 13:23:45 +08:00
Rajesh Taneja
c592eea2d3
MDL-40428 Libraries: Deprecated delete_context
2013-07-11 12:18:55 +08:00
Adrian Greeve
1de02d62c9
MDL-40426 - Libraries: Deprecate mark_context_dirty().
2013-07-11 12:16:47 +08:00
Adrian Greeve
329846f198
MDL-40430 - Libraries: Deprecate print_context_name().
2013-07-09 16:11:55 +08:00