188 Commits

Author SHA1 Message Date
Paul Holden
33a63ca639
MDL-76295 reportbuilder: implement default datasource sorting.
Update all existing report sources to use the new default sorting
API from 064eccd4, updating existing tests to assert behaviour.
2023-08-23 15:32:50 +01:00
Ilya Tregubov
88f0bd7675
Merge branch 'MDL-77723' of https://github.com/paulholden/moodle 2023-05-30 12:43:53 +08:00
Andrew Nicols
d8a7039f92
Merge branch 'MDL-77983-master' of https://github.com/rjnl/moodle 2023-05-24 21:14:41 +08:00
Nathan Nguyen
1452caac93 MDL-77353 core: examples of new user function usage 2023-05-24 13:05:13 +10:00
Rajneel Totaram
4def049e4f MDL-77983 core_user: Avoid passing nulls to base64_decode 2023-05-17 19:40:29 +12:00
Paul Holden
2881840cca
MDL-77723 user: ensure identity refers to a valid custom profile field. 2023-05-15 09:03:28 +01:00
Dan Marsden
3d95fe0bc3 MDL-78057 core_user: Use correct class for context check. 2023-04-28 13:15:56 +12:00
Sara Arjona
9ce4fb65fd Merge branch 'MDL-77164-master' of https://github.com/marinaglancy/moodle 2023-04-13 14:00:18 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Alex Morris
9bc236d48d MDL-76722 user: Add new update_user_device_public_key webservice 2023-04-11 08:58:27 +08:00
Paul Holden
25e8971b3a MDL-76873 user: method for returning profile field instance of type.
Re-factor implementation of profile field access within user fields
class to use that already provided by the fields themselves.
2023-02-20 09:24:05 +00:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Paul Holden
347bb143e7 MDL-76446 user: correct logic for multiple keyword search.
When the keyword participant filter was used with multiple values
in conjunction with other participants filters, the boolean logic
was effectively:

 X AND Y OR Z

When what we actually wanted was:

 X AND (Y OR Z)
2022-11-29 16:30:35 +00:00
Marina Glancy
064eccd4fc MDL-75525 reportbuilder: specify initial sorting for datasources 2022-11-07 15:43:45 +01:00
Marina Glancy
c5fd214ccd MDL-75519 reportbuilder: set default sortorder for Users datasource 2022-10-25 11:19:36 +02:00
David Woloszyn
7a9de2cb24 MDL-68868 core_user: Final deprecation of participants unified filter 2022-10-04 16:09:35 +11:00
Tomo Tsuyuki
68a5034b67 MDL-72509 core: De-couple participants filter from core_user to core
This implementation will de-couple the participant filter from
core user to core so its easily usable to any api in core or any
community plugin. This removes the dependency from the core_user
and creates a nice api where it can produce filterable objects.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Tomo Tsuyuki <tomotsuyuki@catalyst-au.net>

AMOS BEGIN
 MOV [addcondition,core_user], [addcondition,core]
 MOV [adverbfor_and,core_user], [operator_and,core]
 MOV [adverbfor_andnot,core_user], [operator_andnot,core]
 MOV [adverbfor_or,core_user], [operator_or,core]
 MOV [applyfilters,core_user], [applyfilters,core]
 MOV [clearfilterrow,core_user], [clearfilterrow,core]
 MOV [clearfilters,core_user], [clearfilters,core]
 MOV [filtersetmatchdescription,core_user], [filtersetmatchdescription,core]
 MOV [filterrowlegend,core_user], [filterrowlegend,core]
 MOV [filtertype,core_user], [filtertype,core]
 MOV [match,core_user], [match,core]
 MOV [matchofthefollowing,core_user], [matchofthefollowing,core]
 MOV [placeholdertypeorselect,core_user], [placeholdertypeorselect,core]
 MOV [selectfiltertype,core_user], [selectfiltertype,core]
AMOS END
2022-09-27 12:07:36 +08:00
Sara Arjona
c726705f6b Merge branch 'MDL-12643' of https://github.com/paulholden/moodle 2022-08-31 16:36:37 +02:00
Ilya Tregubov
96dbcc0840 Merge branch 'MDL-75245' of https://github.com/paulholden/moodle 2022-08-30 14:59:50 +04:00
Paul Holden
0304508926 MDL-75245 reportbuilder: re-factor current tag elements to new entity.
Update previous implementation of tags (9ebd801c) in report sources to
use equivalent tag entity columns and filters.
2022-08-18 17:01:21 +01:00
Paul Holden
ae369574b8 MDL-75360 user: relax initial parameter types of external method.
Defer cleaning of supplied text to inside the method, so we don't
throw confusing exceptions if a user enters "unsafe" characters in
the form input.
2022-08-02 20:55:34 +01:00
Paul Holden
c7d7c83abc MDL-12643 course: fix capabilities used for bulk participant actions.
Previously the `moodle/course:bulkmessaging` capability controlled
access to the entire bulk actions menu for course participants,
rather than just those actions related to messaging.
2022-07-18 15:10:37 +01:00
Shamim Rezaie
dea18d2f47 Merge branch 'MDL-73916-master' of https://github.com/dravek/moodle 2022-06-10 13:12:33 +02:00
David Matamoros
c6777c9cbf MDL-73916 reportbuilder: Allow to set default condition values
- Changes on datasource class to allow to set default condition values
- Added default condition 'suspended' set to 'no' on users datasource
2022-06-03 08:43:46 +02:00
Andrew Nicols
15e7c8d1b3 Merge branch 'MDL-73898' of https://github.com/paulholden/moodle 2022-06-03 13:30:50 +08:00
David Matamoros
5e68da7868 MDL-74497 reportbuilder: Use new methods in existing datasources
- Replace all individual calls to add all columns, filters and
conditions on the cohorts datasource with the new
method add_all_from_entities().

- Replace all individual calls to add all columns, filters and
conditions on the courses datasource with the new
method add_all_from_entities().

- Replace all individual calls to add all columns, filters and
conditions on the users datasource with the new
method add_all_from_entity().
2022-05-13 08:36:31 +02:00
Paul Holden
a95f637cfb MDL-73898 user: exclude guest user from participants table. 2022-05-10 17:21:01 +01:00
Jun Pataleta
1e533995dd Merge branch 'MDL-73233-master' of https://github.com/sarjona/moodle 2022-03-18 00:35:11 +08:00
Sara Arjona
e3d2fa41d0 MDL-73233 user: Review Start page user preferences
The "Start page" user preferences page has been reviewed to
consider the new $CFG->enabledashboard setting.
The "Dashboard" won't be displayed in the list if it's disabled.
Besides, the default value is now calculated calling the new
get_default_home_page() method.
2022-03-16 11:22:22 +01:00
Paul Holden
134773553d MDL-74144 user: add cancel button to user private files form. 2022-03-09 11:31:06 +00:00
Simey Lameze
8e153111af MDL-73608 user: add contact site support page
AMOS BEGIN
 CPY [subject,mod_forum],[subject,moodle]
 CPY [message,core_message],[message,moodle]
AMOS END
2022-02-18 11:54:44 +08:00
Paul Holden
ccd91bc753 MDL-73600 user: remove references to deleted user fields/strings.
Since f9e1c258 they are no longer valid.
2022-01-17 15:58:24 +00:00
Paul Holden
9e6bbb4fb8 MDL-73086 user: account for mixed casing of profile field shortname.
Custom profile fields allow for shortnames containing mixed character
casing, which should also be supported within the user fields API
when retrieving said custom fields.

Given that the DML libs convert all selected columns to lowercased
equivalent, we need to do the same when requesting custom fields to
ensure calling code doesn't try to access `->profile_field_Foo`
property when the DB returns `->profile_field_foo` instead.
2021-12-29 15:09:30 +00:00
Mathew May
54e098c5a5 MDL-73231 my: Allow my courses to be a homepage 2021-12-13 22:43:28 +08:00
David Matamoros
09b69d04e3 MDL-70795 reportbuilder: custom report filters editor.
Implement module for filters editing, allowing the report
editor to define which filters are available when users
are viewing the report.

These filters allow those users viewing the report to further
limit the data being displayed (after conditions have been
applied), by selecting their own values for each filter.

Co-authored-by: Paul Holden <paulh@moodle.com>
2021-10-19 13:56:04 +01:00
Paul Holden
ab596ec11a MDL-70795 reportbuilder: custom report condition editor.
Report conditions allow report creators to limit which data
is displayed when the report is viewed. Users viewing the
report cannot override these condition values.
2021-10-19 13:56:04 +01:00
Paul Holden
8ca9e04f9a MDL-70795 reportbuilder: beginnings of the report editor.
Implement UI elements for editing columns of a report, taking their
definitions from the selected datasource.

Co-authored-By: David Matamoros <davidmc@moodle.com>
Co-authored-By: Mikel Martín <mikel@moodle.com>
2021-10-19 13:56:02 +01:00
David Matamoros
22d896e063 MDL-70795 reportbuilder: add interface for creating reports.
Implement elements for creating/editing reports, along with
new system report for listing and accompanying JS modules for
user interaction.

Create "Users" datasource as proof-of-concept.

Co-authored-By: Paul Holden <paulh@moodle.com>
2021-10-19 13:55:30 +01:00
Nathan Nguyen
089ebc85b1 MDL-60917 core_search: add top result section 2021-10-12 14:49:36 +11:00
sam marshall
e332d1849d MDL-72643 core: Improve display_size
Allows display_size to use a fixed unit for easy comparison of
multiple results, and fixed decimal places for the same reason.

Improves behaviour by using consistent decimal places and a
consistent space before the unit (the previous one only has a space
before 'bytes', not before 'KB').

Of existing uses, all the ones that displayed a 'maxbytes' type
configuration setting (which are likely to have an 'exact' size
and would be better shown as 512 KB rather than 512.0 KB) have been
changed to use 0 decimal places, to preserve previous behaviour.
All the uses which were showing an actual file or memory size have
been left as default (1 decimal place).
2021-09-27 16:52:33 +01:00
Jun Pataleta
cb0b7fc9c5 MDL-71964 user: Fix preference lang string key
* Plus use example domain for user email in the Behat test
2021-09-23 14:11:20 +08:00
Dongsheng Cai
a2d5d43223 MDL-71964 dashboard: add welcome message for all users 2021-09-23 10:42:04 +08:00
Andrew Nicols
84556387ca Merge branch 'MDL-72153' of git://github.com/paulholden/moodle 2021-08-26 11:31:32 +08:00
Paul Holden
b45970de49 MDL-72153 privacy: correctly export user description/files. 2021-08-13 12:41:08 +01:00
David Mudrák
f9ee118e94 MDL-72325 user: Use the core_user::awaiting_action() in existing places
There were existing places each doing its own checks similar to the ones
covered by the newly added core_user::awaiting_action() method. This
patch replaces those custom checks with this new API call.
2021-08-12 13:05:38 +02:00
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