Commit Graph

2343 Commits

Author SHA1 Message Date
sam marshall
557554f99f MDL-58957 Global search: Add time fields to block_instances 2017-06-29 15:14:47 +01:00
Mark Nielsen
7cde2bb313 MDL-58948 behat: Chrome driver has unique xpaths
Chrome driver has unique xpaths for clicking on all the
show more links.  So clicking on the first xpath X times
does not work.
2017-06-28 12:50:44 -07:00
Mark Nielsen
b5be387556 MDL-58948 behat: conditionally execute MoodleSelenium2Driver
There is some specific code being executed that only exists
in the MoodleSelenium2Driver.  Conditionally execute this
code to make it compatible with other Mink drivers.
2017-06-28 12:50:44 -07:00
Mark Nielsen
f5459099ae MDL-58948 behat: catch ElementNotFoundException
Another valid exception that can be thrown from a Mink driver
is the ElementNotFoundException when an element has gone missing.
2017-06-28 12:50:11 -07:00
Mark Nielsen
3cf0d01a61 MDL-58948 behat: Fix timeouts without a condition
The second parameter of the wait method should be a string
so passing boolean false was wrong.  The default on for the
script is 'false' which works cross Mink drivers.
2017-06-28 12:50:10 -07:00
Juan Leyva
bef201c7e0 MDL-58712 core_user: Do not count the root directory 2017-06-22 16:09:58 +02:00
Juan Leyva
f74ac6e704 MDL-58712 core_user: New WS core_user_get_private_files_info 2017-06-15 09:40:30 +01:00
Juan Leyva
0237571004 MDL-58712 core_user: New function for retrieving file area info 2017-06-13 11:22:33 +01:00
Eloy Lafuente (stronk7)
6fff2a911a Merge branch 'MDL-50265-master' of git://github.com/danpoltawski/moodle 2017-06-06 19:27:59 +02:00
Jake Dallimore
58a4dacf87 Merge branch 'MDL-57304_template_comments_fix' of https://github.com/gthomas2/moodle 2017-06-06 15:54:33 +08:00
Dan Poltawski
b6989e92ba MDL-50265 tests: remove deprecated useragent tests 2017-06-02 11:11:37 +01:00
Tony Levi
e705e69e7f MDL-49398 accesslib: Simplify role definition loading and cache
This change removes the complex and partial loading of role definition data for users.
It is replaced by keeping one system-wide definition for each role in MUC.

This is cheaper to regenerate as it avoids complex database queries (repeated LEFT JOIN to context).
Memory usage is kept low thanks to array CoW for each user access data.
2017-06-02 07:53:23 +01:00
gthomas2
bd87693fd6 MDL-57304 templates: Do not include comments via ajax 2017-05-31 09:09:53 +01:00
gthomas2
770f0532ef MDL-58761 behat: Fix regex in i_open_my_profile_in_edit_mode step 2017-05-24 13:54:49 +01:00
Iñaki Arenaza
67bebb69eb MDL-57558 ldap: fix ldap_get_entries_moodle()
While ldap_get_entries_moodle() PHPdocs state that it returns "array
ldap-entries with lower-cased attributes as indexes.", this is not true. It
uses ldap_get_attributes() internally, which returns both numerically indexed
attribute names, and dictionary-like entries indexed by attribute names.

Current code lowercases the dictionary-like entries, but then uses the
numerically indexed entries for the attribute names used as keys in the
returned array. The numerically indexed names might or might not be lowercased,
depending on the LDAP server and PHP version) version. E.g., OpenLDAP 2.x,
Novell eDirectory 8.x and MS Active Directory return mixed-cased attribute
names, and PHP 5.x and PHP 7.x don't lowercase them inside ldap_get_entries().

This is probably why all calls to ldap_get_entries_moodle() are followed by
calls to array_change_key_case(), even if that shouldn't be necessary.

So make sure we always return lower-cased attributs as indexes and add some
unit tests to avoid regressions in the future.
2017-05-16 10:48:27 +01:00
Jun Pataleta
e8d39b3926 MDL-58803 calendar: Require calendar/lib.php 2017-05-04 13:03:55 +08:00
Dan Poltawski
2e04d92718 Merge branch 'MDL-58692-master-authcfgnames' of git://github.com/mudrd8mz/moodle 2017-05-03 11:17:45 +01:00
David Mudrák
31bd102316 MDL-58692 auth: Improve the migration of auth setting names
Some auth plugins used to have a mix of the legacy style of plugin names
in config_plugins table (such as 'auth/mnet') and the new correct
style (such as 'auth_mnet'). Attempting to rename the setting plugin via
low level SQL UPDATE could lead to duplicate key violation.

The patch introduces a new helper function to safely migrate the old
settings to the new ones, eventually informing the admin about the
values mismatch.
2017-05-03 12:02:43 +02:00
Mark Nelson
685daf1aed MDL-58650 core_message: always use 'popup' processor for messages 2017-05-02 15:46:48 +08:00
Dan Poltawski
712a9b6481 Merge branch 'MDL-58643-master' of git://github.com/snake/moodle 2017-04-28 09:44:35 +01:00
Jake Dallimore
7b86f2208f MDL-58643 behat: ensure results are in first page + multi suite fix. 2017-04-28 12:47:55 +08:00
Ankit Agarwal
9743b2d4a9 MDL-58701 phpunit: Add tests for external_settings 2017-04-27 09:37:53 +05:30
David Monllao
ac0553aa64 Merge branch 'MDL-54901' of git://github.com/stronk7/moodle 2017-04-19 11:30:03 +08:00
Eloy Lafuente (stronk7)
55946a892a MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests
This includes:

- Changing PHPUnit's bootstrap to use https://www...
- Modify all existing expectations to the new wwwroot.
- Amend some tests now with different defaults because of is_https()
- Added a note to main upgrade.php about the change.
2017-04-18 03:40:17 +02:00
Dan Poltawski
48411a8843 Merge branch 'MDL-58486' of git://github.com/timhunt/moodle 2017-04-17 12:15:40 +01:00
Jun Pataleta
d3679c37af MDL-58563 group: Specify table alias in sort parameter for group test 2017-04-11 12:40:41 +08:00
Simey Lameze
daef59826a MDL-55611 core_tests: replace remaining I follow coursename steps 2017-04-06 15:22:15 +08:00
Dan Poltawski
5f5f71ea62 Merge branch 'MDL-57411-master' of git://github.com/jleyva/moodle 2017-04-05 12:44:03 +01:00
Juan Leyva
8c60d198c2 MDL-57411 groups: Fix tests for MSSQL 2017-04-05 13:17:46 +02:00
Andrew Nicols
c46ae2fbc1 Merge branch 'MDL-58361-master' of https://github.com/xow/moodle 2017-04-05 15:04:44 +08:00
Andrew Nicols
941cb7ce3c Merge branch 'MDL-58399-master' of git://github.com/jleyva/moodle 2017-04-05 14:22:39 +08:00
Dan Poltawski
1e4e5c52d7 Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
Tim Hunt
2524990d09 MDL-58486 user_prefs: always update $USER cache when applicable
set_user_preference and unset_user_preference let you pass the user to
set preferences for as an id. Previously, if you passed $USER->id there,
those methods did not update the Cache in $USER, which was surprising,
and not easy to debug.

Now, we always update the preference cache in $USER if the preference is
being changed for the current user.
2017-04-04 16:20:26 +01:00
Mark Nelson
23a29de7ee MDL-58424 core_calendar: moved logic from api.php to lib.php
Also moved related PHPUnit tests.

Part of MDL-55611 epic.
2017-04-04 11:01:52 +01:00
Jun Pataleta
966cbed632 MDL-58386 core: Fixed CI issues
Part of MDL-55611 epic.
2017-04-04 11:01:46 +01:00
Dan Poltawski
ab8aa88214 Merge branch 'MDL-55941-initialbar-ux' of https://github.com/ilya-catalyst/moodle 2017-04-04 06:56:26 +01:00
Dan Poltawski
a29cd3138c Merge branch 'MDL-57411-master' of git://github.com/jleyva/moodle 2017-04-03 17:59:34 +01:00
Damyon Wiese
1a911be57b MDL-58220 oauth2: Fix docs in test file
(and remove unused global $SESSION).
2017-04-03 13:43:26 +08:00
Damyon Wiese
8d90d29460 MDL-58220 oauth2: Use iputils to check domain
Allows wild cards and more strict checking against spec.
2017-04-03 13:43:25 +08:00
Damyon Wiese
99e3c347f9 MDL-58220 oauth2: Minor cleanups
Fixes spotted by Jun in peer review.
2017-04-03 13:43:25 +08:00
Damyon Wiese
fa78244d17 MDL-58220 oauth2: Fix unit tests and add more 2017-04-03 13:43:25 +08:00
Damyon Wiese
dece386586 MDL-58219 oauth2: Fix unit tests because we changed the model
We added 2 fields to the model and we needed to update the tests.

I also removed some error_log from the rest client (very useful while developing)

Part of MDL-58220
2017-04-03 13:41:18 +08:00
Damyon Wiese
931c023468 MDL-58090 oauth2: Add unit tests
Part of MDL-58220
2017-04-03 13:40:13 +08:00
Mark Nelson
9bd158a3c7 MDL-57878 core: fixed failing unit test
Part of MDL-55611 epic.
2017-04-03 11:37:09 +08:00
Simey Lameze
fdeeaff954 MDL-58265 core_test: replace I turn editing on steps
Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
3353cfd8c1 MDL-58265 core_test: add I am on course homepage in edit mode step
This commit also:
- Rename i_am_on_course_page to i_am_on_course_homepage.
- Pass false to out_as_local_url()

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
c987d1b2ef MDL-58265 core_test: replace all uses of I follow course steps
Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
95f11fde64 MDL-58265 core_test: add I am on course page behat step
Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Mark Nelson
12cbce0aa3 MDL-57888 core_calendar: moved functions from calendar/lib.php
Part of MDL-55611 epic.
2017-04-03 11:35:38 +08:00
Juan Leyva
a7d9c5373e MDL-57411 groups: New helper functions
- groups_get_groups_members
- groups_get_activity_shared_group_members
2017-03-31 09:04:58 +02:00