180 Commits

Author SHA1 Message Date
Juan Leyva
6db2423551 MDL-60738 webservice: Clean theme and lang properly
Sometimes the "theme" and "lang" fields in the user and course tables
in the database are set to incorrect values (uninstalled or
non-existent themes and language packs).
This makes Web Services functions to fail because the WS server
validate the returned data using the validate_param function that clean
parameters.
2017-11-20 09:37:30 +01:00
Andrew Nicols
446b21b512 MDL-60579 user: Check filter strings have correct part count 2017-11-09 09:07:02 +08:00
David Monllao
cae37299f3 Merge branch 'MDL-59758-master' of git://github.com/damyon/moodle 2017-11-07 12:37:30 +01:00
Damyon Wiese
b5b81de3d6 MDL-59758 core_user: Replace old bulk actions
The participants page has some clunky multi page forms for bulk actions. Replaces it with an ajax alternative.
2017-11-07 14:18:49 +08:00
Jun Pataleta
a56833d49d Merge branch 'MDL-60611' of git://github.com/stronk7/moodle 2017-11-07 10:14:24 +13:00
Mark Nelson
e2d635bbaf MDL-60590 core_user: added Behat test for cohort list presence 2017-11-06 12:39:31 +08:00
Eloy Lafuente (stronk7)
796e48a58b MDL-60611 phpunit: remove deprecated stuff and other minor fixes
Thanks @scara for MDL-60611 phpunit: improved redis skipping reasons
2017-11-05 01:45:04 +01:00
Juan Leyva
8c4d7cee79 MDL-51945 core_user: Prevent duplicated emails in update_users WS 2017-10-30 17:42:03 +01:00
David Monllao
43b8618b40 Merge branch 'MDL-60179_master' of git://github.com/markn86/moodle 2017-10-19 15:26:27 +02:00
Mark Nelson
af835c24b2 MDL-60179 core: make it clear what enrolment instance is being edited 2017-10-19 14:57:23 +08:00
David Monllao
b1a9a6a19a Merge branch 'wip-MDL-60281-master' of git://github.com/marinaglancy/moodle 2017-10-17 09:45:44 +02:00
Jun Pataleta
a3bfb41cdd MDL-59984 enrol: Apply more filters to multiple filters scenario 2017-10-16 09:47:39 +08:00
Marina Glancy
78da366b56 MDL-60281 general: various strict corrections for PHP7.2
- count() can only be called on arrays or Countable, it can not be called on null
- recordset is neither so iterator_count() should be used
- instanceof or get_class() can not be applied to non-objects
- class methods must have the same arguments as methods in parent class
2017-10-16 09:37:20 +08:00
Andrew Nicols
e61ad18e70 Merge branch 'MDL-55356-master' of https://github.com/sammarshallou/moodle 2017-10-12 11:28:04 +08:00
sam marshall
66e3702680 MDL-55356 core_search: Change existing search areas to new API
This change considers all existing search areas in Moodle and makes
necessary changes.

Custom change to course search, supported by helper in base.php:

* course/classes/search/mycourse.php

Custom change to message search:

* message/classes/search/message_received.php
* message/classes/search/message_sent.php

Custom change to user search:

* user/classes/search/user.php

Custom changes to module areas, supported by helper in base_mod.php:

* mod/book/classes/search/chapter.php
* mod/data/classes/search/entry.php
* mod/forum/classes/search/post.php
* mod/glossary/classes/search/entry.php
* mod/survey/classes/search/activity.php
* mod/wiki/classes/search/collaborative_page.php

(Note: the unit tests do not exhaustively check every context type
for these, given that's mainly handled by the helper function
which was already tested in the base_activity test.)

Handled by block base class (no change):

* blocks/html/classes/search/content.php

Handled by activity base class (no change):

* mod/assign/classes/search/activity.php
* mod/book/classes/search/activity.php
* mod/chat/classes/search/activity.php
* mod/choice/classes/search/activity.php
* mod/data/classes/search/activity.php
* mod/feedback/classes/search/activity.php
* mod/folder/classes/search/activity.php
* mod/forum/classes/search/activity.php
* mod/glossary/classes/search/activity.php
* mod/imscp/classes/search/activity.php
* mod/label/classes/search/activity.php
* mod/lesson/classes/search/activity.php
* mod/lti/classes/search/activity.php
* mod/page/classes/search/activity.php
* mod/quiz/classes/search/activity.php
* mod/resource/classes/search/activity.php
* mod/scorm/classes/search/activity.php
* mod/url/classes/search/activity.php
* mod/wiki/classes/search/activity.php
* mod/workshop/classes/search/activity.php
2017-10-11 17:17:09 +01:00
Eloy Lafuente (stronk7)
ae2f169a08 Merge branch 'MDL-60046-master' of git://github.com/damyon/moodle 2017-10-10 19:10:52 +02:00
Damyon Wiese
1bf6dcc507 MDL-60046 participants: Update behat tests
The filter button was removed, so it needs to be removed from the tests.
2017-10-10 10:54:27 +08:00
Andrew Nicols
2a77813b51 MDL-59882 behat: Update known uses of dialogue CSS 2017-10-02 12:44:37 +08:00
Jake Dallimore
4266786b48 MDL-58953 user: additional test case for user_can_view_profile() 2017-09-07 10:53:34 +02:00
Jun Pataleta
7800e6881c MDL-59759 core_user: Use SAVE_CANCEL modal for unenrol dialog 2017-09-04 10:44:51 +08:00
Andrew Nicols
5d09e9d890 Merge branch 'MDL-59907' of git://github.com/stronk7/moodle 2017-08-28 08:25:20 +08:00
Eloy Lafuente (stronk7)
5e3ee3748b MDL-59907 behat: Fix features to be collation independent
Before the patch there were some problems with sorting
causing student1@ and student10@ to be sorted inconsistently
between databases.

Where that is not an important problem in real use, was
causing tests to fail consistently in sqlsrv.

So, adding student0@ to the tests in order to make them
stable collation-wise.
2017-08-24 03:08:02 +02:00
Jake Dallimore
067accce47 MDL-59825 user: user_can_view_profile() checks all of a $user's courses
This function used to check only those courses shared by both users
when it should have been checking all courses in which $user is
enrolled. Managers can view a user's course profile without necessarily
sharing the course (being enrolled in) with the $user.
2017-08-18 08:29:37 +08:00
Jun Pataleta
654f52d288 MDL-59756 user: More Behat tests for the status field and friends
* Add coverage for the rendering of the edit/unenrol icons in the status
  column.
* Add coverage for the rendering of the edit icon in the enrolment
  details modal.
* Avoid usage of xpath_element selectors whenever possible.
2017-08-15 14:33:23 +08:00
Dan Poltawski
9ebc67f4a2 Merge branch 'MDL-59172-master' of https://github.com/snake/moodle 2017-08-07 16:20:11 +01:00
Jun Pataleta
e004de157c MDL-59727 core_user: Fix Behat tests for bulk enrolment test 2017-08-07 10:49:07 +08:00
Jake Dallimore
4d068a6708 MDL-59172 user: user_can_view_profile() now checks viewalldetails cap 2017-08-07 09:27:04 +08:00
Jun Pataleta
b29c2fad0b MDL-59366 user: Be more specific on which autocomplete is being opened
* Specify that the autocomplete in the student's row in the
  participants table is being opened
2017-08-04 09:15:50 +08:00
Dan Poltawski
e3a2d7a473 Merge branch 'MDL-59366-master' of git://github.com/junpataleta/moodle 2017-08-01 10:36:14 +01:00
David Monllao
7190f330b4 Merge branch 'MDL-59602_coursenav' of https://github.com/mrmark/moodle 2017-07-31 13:21:09 +02:00
Jun Pataleta
9651e491d8 MDL-59366 user: Create a unified filter for participants page
Part of MDL-59290.
2017-07-31 13:04:06 +08:00
Andrew Nicols
722f67d5b2 MDL-59564 user: Whitespace fix 2017-07-31 11:35:45 +08:00
Damyon Wiese
5c734b0ce7 MDL-59564 user: Add behat for bulk enrolment
Cover bulk enrolment changes from the participants page with a behat.
2017-07-31 09:29:37 +08:00
Damyon Wiese
e640eb5cc3 MDL-59367 behat: Close the autocomplete
Close the auto complete suggestions list so it does not obscure the save changes button in chrome
2017-07-26 13:48:16 +08:00
Jun Pataleta
642bea179c MDL-59369 user: Behat tests involving the Status column 2017-07-26 09:44:33 +08:00
Mark Nielsen
197e2bca5b MDL-59602 behat: make use of new course nav steps 2017-07-21 13:50:47 -07:00
Damyon Wiese
73d0d56284 MDL-59367 user: Tests and coding style
Add a unit test for user_roles_editable.
Coding style fixes.
Don't show duplicate roles.
2017-07-21 10:25:25 +08:00
Damyon Wiese
5d0b4765d8 MDL-59367 roles: Add roles to participants page. 2017-07-21 09:52:14 +08:00
Damyon Wiese
b7386d0034 MDL-59437 participants: Add sort/pagination behat 2017-07-13 11:48:43 +08:00
Mark Nelson
a6a65da4f3 MDL-59395 core_user: removed unnecessary Behat javascript tags
1) Fixes a failing Behat test.
2) Speeds up two tests (including one fixed above).

Part of MDL-59290.
2017-07-06 21:26:02 +08:00
Mark Nelson
7a1c830b0b MDL-59395 core_user: fixed random PHPUnit failure
Part of MDL-59290.
2017-07-06 14:54:41 +08:00
Mark Nelson
ba6645daa0 MDL-59395 core_user: added unit tests for new participation functions
Part of MDL-59290.
2017-07-05 14:51:41 +08:00
Juan Leyva
bef201c7e0 MDL-58712 core_user: Do not count the root directory 2017-06-22 16:09:58 +02:00
Dan Poltawski
6252f44d84 Merge branch 'MDL-58712-master' of git://github.com/jleyva/moodle 2017-06-19 14:20:06 +01:00
Juan Leyva
f74ac6e704 MDL-58712 core_user: New WS core_user_get_private_files_info 2017-06-15 09:40:30 +01:00
Tim Lock
d621396fee MDL-58161 user: tests: user_can_view_profile fails under certain cases 2017-06-13 08:12:08 +09:30
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
93be3f730c MDL-58265 core_test: remove unnecessary steps
This commmit removes steps that take behat to site home page
to actually get to a course page.

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
Eloy Lafuente (stronk7)
79262cb681 Merge branch 'MDL-57840-33-get_users_by_field' of https://github.com/roperto/moodle 2017-03-21 01:05:47 +01:00