143 Commits

Author SHA1 Message Date
Paul Holden
4098af1c52 MDL-26171 user: implement method for retrieving fullname via SQL. 2021-06-29 16:35:35 +01:00
sam marshall
007cde2eab MDL-71559 core_user: Fields support for PROFILE_VISIBLE_TEACHERS 2021-06-03 11:23:06 +01:00
Ilya Tregubov
430746d3a2 MDL-66431 core: Remove activity chooser user preference.
This commit removes activity chooser user preference and
course preference page. Separate dropdowns to activity and
resource is also removed.
2021-05-01 16:21:59 +02:00
Ruslan Kabalin
3bf770c801 MDL-71051 core_user: fix issues and address review issues 2021-04-28 11:47:26 +02:00
Marina Glancy
8974874018 MDL-71051 core_user: create user profile field form is now modal form 2021-04-28 11:47:22 +02:00
Marina Glancy
4a159a0947 MDL-71051 core_user: move user profile edit field form to classes 2021-04-28 11:47:22 +02:00
Marina Glancy
60b95cd46f MDL-71051 core_user: editing user profiles - modal form, template 2021-04-28 11:47:22 +02:00
Marina Glancy
880aff7bf9 MDL-71051 core_user: move edit profile category form to classes 2021-04-28 11:47:22 +02:00
Marina Glancy
5682b9a585 MDL-71051 core_user: always use API when working with profile fields 2021-04-28 11:39:04 +02:00
Bas Brands
f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00
Eloy Lafuente (stronk7)
3ed772f418 Merge branch 'MDL-71099-master' of https://github.com/sammarshallou/moodle 2021-03-27 10:17:43 +01:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
Mikel Martín
8de59fc435 MDL-70871 user: Move 'Show all X' functionality to dynamic_table 2021-03-23 09:55:24 +01:00
Eloy Lafuente (stronk7)
c9912e2c0e Merge branch 'MDL-70565' of git://github.com/paulholden/moodle 2021-03-16 22:48:57 +01:00
David Mudrák
f51d3a81d6 MDL-67748 user: Add a new core_user_search_identity external function
The purpose of this external function is to provide data for
asynchronous user selectors and similar widgets. It allows to search
users matching the given query in their name or other available identity
fields.
2021-03-15 21:24:05 +01:00
Paul Holden
be2862fe6f MDL-70565 user: filter course participants by country. 2021-03-12 09:50:05 +00:00
sam marshall
e86ead1d91 MDL-45242 Course: Participants list supports custom profile fields 2021-03-10 10:57:11 +00:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
sam marshall
3f003455f3 MDL-45242 Lib: Replace direct references to ->showuseridentity 2021-03-08 09:20:18 +00:00
Paul Holden
73bffed8f6 MDL-70995 user: format group names in course participants filter. 2021-02-24 19:22:21 +00:00
Andrew Nicols
d6e50d14d2 Merge branch 'MDL-64554-master' of git://github.com/andrewnicols/moodle 2021-02-18 10:21:55 +08:00
Marina Glancy
440073ff20 MDL-64554 user: make private files editor modal/ajax form 2021-02-17 18:06:57 +01:00
François Moreau
3776fbafb2 MDL-69762 core_contentbank: let users hide their content 2021-02-15 13:26:32 -05:00
Paul Holden
0cfa744fd9 MDL-63387 user: show both role names on course participants page. 2020-09-01 12:05:20 +01:00
Paul Holden
ca02422d66 MDL-69214 user: correct participant table forced group SQL. 2020-07-07 14:31:31 +01:00
Andrew Nicols
8bcf74e9bc MDL-69026 user: Wrap sub-query in brackets
It is perfectly valid to have a query like:

Match None of the following:
- Role is ANY of the following:
-- 'Teacher'
-- 'Editing teacher'
-- 'Manager'; AND
- Keyword is NONE of the following:
-- 'Kevin'

However, due to the way in which the query is constructed, this leads to
a query which includes

    WHERE NOT ef.id IS NOT NULL
    AND NOT
        u.id IN (SELECT userid FROM {role_assignments} WHERE roleid IN (...) AND contextid IN (...))
    AND NOT
        NOT (u.firstname || ' ' || u.lastname LIKE '%Kevin%')

The use of NOT NOT is valid in Postgres, MariaDB, MySQL, and MSSQL, but
not in Oracle.

To counter this when the outer jointype is of type NONE, we must wrap
each of the inner WHERE clauses in a set of brackets, which makes the
query:

    WHERE NOT ef.id IS NOT NULL
    AND NOT
        (u.id IN (SELECT userid FROM {role_assignments} WHERE roleid IN (...) AND contextid IN (...)))
    AND NOT
        (NOT (u.firstname || ' ' || u.lastname LIKE '%Kevin%'))

Whilst Oracle does not support the use of `AND NOT NOT ...`, it does support
`AND NOT (NOT ...)`
2020-06-12 10:03:06 +08:00
Jun Pataleta
15823a94c1 Merge branch 'MDL-68989-master' of git://github.com/mickhawkins/moodle 2020-06-11 00:03:54 +08:00
Michael Hawkins
f2972e1dcb MDL-68989 user: Apply none filterset join correctly on keyword filter
Also improved behat coverage for filterset joins and keyword filtering.
2020-06-09 15:49:31 +08:00
Michael Hawkins
8ddfc963b9 MDL-68984 user: Ensure first/last name filtering is always applied
This ensures the firstname and surname filtering is applied in addition
to any other filtering, rather than using the filterset join type.
2020-06-09 12:36:11 +08:00
Jun Pataleta
618b13e1f5 Merge branch 'MDL-67883-squash' of https://github.com/Chocolate-lightning/moodle 2020-06-05 11:52:36 +08:00
Mathew May
16d77f1884 MDL-67883 core: Make core ready for MoodleNet. 2020-06-05 11:47:42 +08:00
Michael Hawkins
3d60881d5d MDL-68612 user: Participants filter row accessibility improvements
More clearly defining each filter row and its ability to remove
filter selections for screen readers.
2020-05-29 12:18:39 +08:00
Michael Hawkins
03cb6064ea MDL-68612 user: Unified filter deprecations - renderer and renderable 2020-05-29 12:18:39 +08:00
Michael Hawkins
d85315ee8c MDL-68612 user: Update participants group filtering to enforce groups
This is required to ensure regardless of user applied filters, only
members of groups visible to the user are ever fetched. This also
includes a fix to remove the groups filter option where no groups
mode is applied.
2020-05-29 10:10:33 +08:00
Michael Hawkins
a4bd55725b MDL-68829 user: Update participants SQL for Oracle/MSSQL compatibility
This refactors the SQL to join on a distinct list of users, removing
the need for GROUP BY statements, and fixing the related errors in
Oracle/MSSQL
2020-05-28 00:28:34 +02:00
Andrew Nicols
028ec17c94 MDL-68169 user: Add keyword filter
Part of MDL-67743
2020-05-27 10:49:44 +08:00
Andrew Nicols
fbcc657713 MDL-68169 user: Add accesssince filter
Part of MDL-67743
2020-05-27 10:49:43 +08:00
Andrew Nicols
fa3d57fe7e MDL-68169 user: Add enrolment instance filter
Part of MDL-67743
2020-05-27 10:49:43 +08:00
Andrew Nicols
de83d4357f MDL-68169 user: Add groups filter
Part of MDL-67743
2020-05-27 10:49:43 +08:00
Andrew Nicols
ffc933ad46 MDL-68169 user: Add roles filter
Part of MDL-67743
2020-05-27 10:49:43 +08:00
Andrew Nicols
77ba77f10a MDL-67917 user: Add skeleton for new participants filter
Part of MDL-67743

AMOS BEGIN
  CPY [select,core],[selectfiltertype,core_user]
AMOS END
2020-05-27 10:49:43 +08:00
Michael Hawkins
6a54e58a8c MDL-68348 user: User filter match types support - enrol method & status
Completed support for all join types (any/all/none) for enrolment
method and status filtering. This includes handling forced status
filtering where a user does not have the capability to view suspended
users, as well as handling front page (whole site) participants page.
2020-05-25 18:35:08 +08:00
Michael Hawkins
03397c817b MDL-68348 lib: User filter match types support - groups
Updated groups_get_members_join to support different filter match types
2020-05-25 18:35:08 +08:00
Michael Hawkins
25d9dabdcf MDL-68348 user: User filter match types support - keywords/last access
The last access implementation also fixes an existing bug,
where it was assumed never accessed would be 0, when it also needed to
handle null to return correct results. Related userlib unit tests also
updated to reflect this, as well as some incorrect comment wording.
2020-05-25 18:35:08 +08:00
Michael Hawkins
25d5be444f MDL-68348 user: User filter match types support - filterset and roles 2020-05-25 18:10:53 +08:00
Andrew Nicols
07c9106476 MDL-68463 user: Remove old selectall attribute 2020-05-18 20:03:38 +08:00
Michael Hawkins
86e71acc0c MDL-68246 user: Adding the participants_search class
This class introduces support for multiple values per filter to the
participants page.
2020-05-14 15:47:34 +08:00
Andrew Nicols
5615a772a6 MDL-68454 table: Move guessing of base URL to flexible 2020-05-04 11:52:19 +08:00
Andrew Nicols
56143dd622 MDL-68454 table: Move filterset functionality to flexible_table 2020-05-04 11:52:19 +08:00
Andrew Nicols
c00552b3b0 MDL-68454 table: Move get_context from dynamic to flexible 2020-05-04 11:52:19 +08:00