667 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Alexander Van der Bellen
0aea55c3e6 MDL-79151 backup: Add custom field backup and restore API 2024-02-20 15:28:28 +08:00
Paul Holden
d0cab9a4a0
MDL-79256 customfield: add new valuetrust to data table schema. 2024-01-23 08:18:58 +00:00
Santosh Nagargoje
bfc9f17686 MDL-80498 group: Added required rule for filepicker field 2024-01-12 14:27:42 +05:30
Paul Holden
7143cf4cbc
MDL-79397 reportbuilder: update existing entity table definitions. 2023-12-07 17:19:01 +00:00
Paul Holden
bdbceebb57 MDL-80287 grade: escape current value in search templates. 2023-12-07 08:35:17 +08:00
Jun Pataleta
030def7a46
Merge branch 'MDL-80079-master' of https://github.com/andrewnicols/moodle 2023-12-06 21:59:47 +08:00
Jun Pataleta
04bc690557
Merge branch 'MDL-80221-main-enfix' of https://github.com/mudrd8mz/moodle 2023-12-04 16:12:07 +08:00
David Mudrák
7f67a96521 MDL-80221 lang: Use fixed strings in the tests, too 2023-12-01 06:27:36 +01:00
Paul Holden
cffa5199b5
MDL-79325 group: consistent name formatting in overview page/export. 2023-11-17 09:48:01 +00:00
Andrew Nicols
dab4a2b66f
MDL-80079 core: Correct incorrect arg to format_string::$options 2023-11-14 22:28:55 +08:00
Mark Johnson
b0bb97ee3b MDL-79213 groups: Add visibility checks in groups_get_members_join()
Group visibility was not taken into account when
generating SQL for getting enrolled users restricted
to a list of groups. This may have allowed users to
infer membership of groups they were not allowed to
see members of.
2023-10-04 01:24:20 +00:00
Paul Holden
dae1dcc8ae
MDL-78835 group: include custom fields in related report entities. 2023-08-28 13:55:59 +02:00
Ilya Tregubov
ccaa0c7143
Merge branch 'MDL-67186_master_v2' of https://github.com/TomoTsuyuki/moodle 2023-08-28 15:20:47 +08:00
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
Tomo Tsuyuki
d8a4cc9533 MDL-67186 group: add custom fields 2023-08-09 11:02:49 +10:00
Paul Holden
b3d00a8f0a
MDL-78872 grade: fix external class execute method visibility. 2023-08-07 15:19:25 +01:00
Mathew May
9bb91ce870 MDL-77991 filelib: Allow groups to generate svgs 2023-08-03 09:07:18 +08:00
Mathew May
a4b3b0d044 MDL-77991 core: Move tertiary search dropdown component 2023-08-03 09:07:18 +08:00
Paul Holden
1125af7857
MDL-78587 course: use tertiary nav selector on participant pages. 2023-07-12 18:26:23 +01:00
Paul Holden
39d0643340
MDL-77877 group: hide form fields dependent on group visibility. 2023-06-16 18:53:31 +01:00
Andrew Nicols
4d15a4ee32
Merge branch 'MDL-69231-master' of https://github.com/lameze/moodle 2023-06-15 10:58:56 +08:00
Andrew Nicols
f31d8f688e
Merge branch 'MDL-78026' of https://github.com/paulholden/moodle 2023-06-08 11:35:57 +08:00
Petr Skoda
e931e8029e MDL-76683 core_group: fix template 2023-06-06 14:04:19 +00:00
Simey Lameze
2367bc9ff6 MDL-69231 behat: remaining work for role capability generator
This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
2023-06-02 12:47:27 +08:00
Andrew Nicols
aa2fc4048e MDL-69231 behat: Update tests to use new generator 2023-06-02 12:47:27 +08:00
Paul Holden
7ee4e2afa0
MDL-73138 group: remove double encoding of group/role names. 2023-05-26 10:25:33 +01:00
Paul Holden
543dcf3e9c
MDL-78026 group: format retrieved group names from external methods. 2023-05-16 10:09:55 +01:00
Jake Dallimore
c5ac5bcfd5
Merge branch 'mdl-76270-master' of https://github.com/matthewhilton/moodle 2023-05-16 13:27:48 +08:00
Matthew Hilton
912bd8ad27 MDL-76270 group: Add bulk messaging actions
Added two new buttons to the group page to bulk enable or disable the
selected groups messaging settings.

Supporting Javascript modules were also added to disable/enable the
buttons depending on the groups selected in the picker.
2023-04-20 12:23:01 +10:00
Matthew Hilton
c5b6ab5ddc MDL-76270 group: Refactor group action handling
Previously group bulk actions were handled by prepending
_act in the value of the input, and then using a custom function that
accessed $_GET and $_POST to determine which was pressed.

This was refactored in favor of the more standard method of using
optional_param.
2023-04-20 12:20:32 +10:00
Matthew Hilton
661c8d3ddf MDL-76270 group: Update to match coding standards 2023-04-20 12:20:32 +10:00
Paul Holden
ba64c15814
MDL-77943 group: use shorter names for visibility report elements. 2023-04-17 19:36:55 +01:00
Víctor Déniz
b576b068bd MDL-77878 lang: Use fixed strings in tests 2023-04-17 08:49:59 +01:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
Paul Holden
f17ba9deb2
MDL-77119 group: custom report elements for group visibility data.
Allow for the reporting of group visibility/participation properties
introduced in 958da5b6, by implementing new entity columns & filters.
2023-03-20 15:44:57 +00:00
Mark Johnson
958da5b67e MDL-68093 groups: Add visibility and participation settings
These new settings are designed to enchance user privacy surrounding
groups. They allow groups to be configured so that users outside the
group cannot see the group, so that users in the group cannot see each
other, or so that users cannot see the group at all, even if they are in
it. This avoids issues where a group may be assigned based on sensitive
personal information (such as a person requiring special arrangements
due to a disability).

By default, groups are visible to all and available for participation in
activities, which maintains the current behaviour.

For performance, a new cache has been added to track the number of
groups on a course that are not visible to non-members. This allows us
to revert to the existing behaviour if the new features are not being
used at all on a course, and only apply the new visibility conditions if
they are.

Users who have the moodle/course:viewhiddengroups capability should be
concious of exposing hidden groups when showing their screen to other
users. The "Switch role to..." feature can be used to show a course page
on screen without exposing private availability conditions, for example.

The changes cover several specific areas:
* grouplib functions, which most code should use to get lists of groups
  and members (this includes the participants page).
* Activities supporting group overrides will not allow overrides for
  groups that are hidden from all users.
* Activities supporting separate/visible groups modes will only allow
  groups with the new "participation" flag enabled to be selected.
* Group messaging will be disabled for groups where members cannot see
  each other, or cannot see the group at all.
2023-03-14 08:52:25 +00:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Angelia Dela Cruz
9fded44344 MDL-77413 Behat: Minor changes to optimise the existing tests 2023-02-28 17:19:47 +08:00
Angelia Dela Cruz
4380682549 MDL-77413 Behat: Add coverage to verify groups can have a picture 2023-02-28 17:08:08 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Paul Holden
45818da292 MDL-76221 reportbuilder: improve report test generator methods.
Test generators for creating report columns, filters and conditions
now allow for setting all persistent properties.
2023-01-04 10:56:27 +00:00
Paul Holden
b10b89ec74 MDL-75349 group: implement groups datasource for custom reporting.
Create new entities for exposing report data on course groups and
groupings, joining to existing course/user entities to provide data
for the reportbuilder editor.
2022-10-20 12:30:06 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Anastasios Bithas
3df0908e72 MDL-22570 group: Export groups/groupings to ods/xls/txt
A new feature that enables teachers to export groups and
groupings through the groups overview page, making use of the dataformat api.
2022-05-11 03:00:36 +03:00
Mihail Geshoski
1060ee827c MDL-73645 core_group: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Eloy Lafuente (stronk7)
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00