530 Commits

Author SHA1 Message Date
Meirza
97ff68fd6b MDL-78159 lib: Added missing properties for core libraries
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-06-21 15:39:53 +07:00
Paul Holden
3894fa9460
MDL-76900 roles: improve Oracle support for entity description column.
Specifically during column grouping/aggregation, we need to avoid CLOB
datatype inconsistencies (ORA-00932).
2023-05-18 11:37:37 +01:00
Paul Holden
5404200d9d
MDL-76900 enrol: new enrolment method and role report entities.
The new entities encapsulate related data for easier re-use across
reports, and are also intended to replace similar columns/filters
from the current enrolment entity.
2023-05-15 14:12:31 +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
Andrew Nicols
a262ba5d6e Merge branch 'MDL-74936' of https://github.com/skodak/moodle 2023-04-04 11:22:49 +08:00
Petr Skoda
176191dab5 MDL-74936 core: tidy up context API 2023-03-31 23:09:39 +02:00
Amaia Anabitarte
fd5db65c0b MDL-77227 roles: Remove extra information for override page 2023-03-29 18:15:46 +02:00
Marina Glancy
594a8c5ab7 MDL-76356 various: avoid implicit conversion to arrays
PHP before version 8.1 automatically converted stdClass or 'false' to arrays if
function parameter expects array (for example, "reset").
PHP 8.1 shows notices in these situations
2023-01-10 12:16:52 +01:00
Paul Holden
253c041297 MDL-75805 admin: allow multiselect when editing site administrators. 2022-12-09 11:22:07 +00:00
Marina Glancy
a800e7e62f MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:20 +01:00
Brendan Heywood
68626c0c1f MDL-73685 admin: Fix regression from MDL-69498 2022-08-18 13:55:46 +10:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Ilya Tregubov
d5c8f25470 Merge branch 'MDL-74147' of https://github.com/paulholden/moodle 2022-06-10 13:11:25 +02:00
Jun Pataleta
e60e8bc629 Merge branch 'MDL-73423-master' of https://github.com/marinaglancy/moodle 2022-05-26 00:18:35 +08:00
Paul Holden
9085f5e28a MDL-74147 admin: support custom user profile fields selecting admins. 2022-05-09 10:14:16 +01:00
Eloy Lafuente (stronk7)
9f53b0e965 MDL-73971 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- 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:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Marina Glancy
a0398fdde8 MDL-73423 core_privacy: Calling reset() on objects deprecated PHP8.1 2022-04-29 16:16:07 +02:00
Sujith Haridasan
1bb972ae0a MDL-73848 administration: Add tests for breadcrumbs and nav highlights
This change includes addition of tests for verifying the secondary
and tertiary nav highlights.
It also includes the tests to verify the breadcrumbs for the pages.
2022-03-25 17:44:58 +08:00
Sujith Haridasan
aa1c2e2382 MDL-73848 administration: Fix the breadcrumbs and nav highlights
Create or update the breadcrumbs in the site administration
pages where it is required.
Highlight the corresponding site adminstration tab.
Highlight the primary nav to Site administration when user
is navigating to any of the site administration pages.

Also changed the boostnavbar so that the nodes in the secondary
navigation are not shown in the breadcrumbs when user is in site
administration page.
2022-03-25 17:44:47 +08:00
Mihail Geshoski
8469f9e724 MDL-73169 core_role: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Jun Pataleta
7ac5deaced Merge branch 'MDL-73462-master' of https://github.com/peterRd/moodle 2022-03-02 13:46:10 +08:00
Peter Dias
4d5a25ffde MDL-73462 navigation: Leverage participants bar for category 2022-03-02 12:27:02 +08:00
Jun Pataleta
d8cadf7ecf Merge branch 'MDL-73462-master' of https://github.com/peterRd/moodle 2022-03-01 18:32:05 +08:00
Peter Dias
f1959af7f6 MDL-73462 course: Introduce course category tertiary navigation
Update the category management page.
2022-03-01 17:57:24 +08:00
Bas Brands
dd95845bf1 MDL-73595 theme_boost: make tertiary nav more distinct 2022-02-28 13:07:52 +01:00
Luca Bösch
2894aa0964 MDL-73872 admin: align 'Save changes' and 'Cancel' 2022-02-18 18:37:08 +01:00
Peter Dias
81492f900f MDL-73373 roles: Enable tertiary navigation in module context 2022-02-08 09:04:04 +08:00
Paul Holden
20b8a47596 MDL-73178 roles: show both role names in permission table. 2022-01-14 12:18:34 +00: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
Eloy Lafuente (stronk7)
57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
All privacy_test and privacy_provider_test classes:

- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
2021-12-17 14:21:02 +01:00
Peter Dias
710c04d5ee MDL-72413 core: Disable the default activity header 2021-12-13 09:49:35 +08:00
abgreeve
fcd4de8639 MDL-72090 navigation: Update to behat feature files for navigation.
This updates feature files to use the new steps to navigate to certain
pages.
2021-12-09 11:13:35 +08:00
Peter Dias
e0d7dbd022 MDL-72875 course: Introduce tertiary nav in participants
- Introduce tertiary nav in the participants page
2021-12-02 13:09:12 +08:00
Brendan Heywood
5d5f165e26 MDL-69498 admin: Group site admins by email domain 2021-06-23 15:22:37 +10:00
sam marshall
9bc588a466 MDL-71466 admin: Add custom user field support to role screens
Implements custom user field support within the 'check capabilities'
and 'assign roles' screens.
2021-05-11 12:00:46 +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
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
Eloy Lafuente (stronk7)
3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00
Andrew Nicols
52aa532e64 Merge branch 'MDL-64764' of git://github.com/paulholden/moodle 2020-01-08 08:30:02 +08:00
Marina Glancy
95dfd8e0de MDL-64764 core_admin: allow to submit empty list of allowed roles.
Co-authored-by: Paul Holden <paulh@moodle.com>
2020-01-07 10:01:23 +00:00
Bas Brands
40ea67534c MDL-66999 theme_boost: @extend remove extends for tables 2019-12-12 11:27:56 +01:00
Bas Brands
6ac38de8d0 MDL-66999 theme_boost: @extend .table-warning
Use .table-warning classes directly instead of using custom styles
2019-12-09 10:49:39 +01:00
Paul Holden
7455b741c9 MDL-66762 user: escape extra/email user fields. 2019-11-07 09:00:19 +08:00
Bas Brands
d470c68b1f MDL-65083 theme_boost: update uses of pull-xs-right 2019-08-19 08:16:47 +02:00
Simey Lameze
3a18032dbf MDL-66034 core: delete role_capabilities_updated event triggers 2019-08-05 13:09:19 +08:00
Simey Lameze
32306e8390 MDL-66034 core_role: add more detail to role allow event classes 2019-08-05 13:09:19 +08:00
Simey Lameze
de4dc81b24 MDL-66034 core_role: implement role updated event 2019-08-05 13:09:19 +08:00
Brendan Heywood
1fc0c4bd4e MDL-58439 admin: Ignore guest logins for all admin pages 2019-06-11 13:44:58 +10:00
Shamim Rezaie
6786f6b6cc MDL-64523 core_access: Improve the title of the delete role links 2019-05-25 04:08:56 +10:00