233 Commits

Author SHA1 Message Date
Andrew Nicols
55126be4ad
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Huong Nguyen
d1f4ca4505
Merge branch 'MDL-81781-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE 2024-06-13 10:13:00 +07:00
Eloy Lafuente (stronk7)
1093256560
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 12:18:04 +02:00
Paul Holden
222fb603c0
MDL-81781 report_log: escape description selectively on display/export.
Per cd85e090f3 all content was escaped, however we should only do that
when displaying the value in browser or exporting to file format which
supports HTML.
2024-06-07 11:30:18 +01:00
SergioComeron
6de35b2623 MDL-77272 report: Enable module level report options 2024-04-25 17:13:03 +02:00
Daniel Neis Araujo
8a2929c1a9 MDL-81613 report_log: fix user fullname export for log report 2024-04-23 14:05:07 -03:00
Leon Stringer
cd85e090f3 MDL-80585 report_log: sanitize descriptions
Strip any HTML tags from values in the "Description" column.
2024-04-17 03:44:21 +00:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Andrew Nicols
a1ee9cdbdb MDL-81327 report_log: Make group filtering logstore agnostic
The original implementation of group filtering introduced in MDL-80565
assumed that the log table existed in Moodle's own database. This is not
the case of the database logstore, or any similar logstore implemetning
the database \core\log\sql_reader interface.

Furthermore this check was also applying the SQL when the user had the
`accessallgroups` capability, or when the course was not in SEPARATE
groups mode (no groupmode and/or visible groups).

Co-authored: Laurent David <laurent.david@moodle.com>
2024-04-09 15:10:37 +02:00
Laurent David
b418eff39d MDL-81327 report_log: Fix col_fullusername
* Avoid calling get_user_fullname too many times and
deal with the case that $event->userid is empty
2024-04-09 15:10:37 +02:00
Ilya Tregubov
fd7703ff69 Merge branch 'MDL-80565-main' of https://github.com/laurentdavid/moodle 2024-03-13 11:22:23 +08:00
Laurent David
e899219c20 MDL-80565 report_log: Prevent user from seeing other logs
* When no groups are selected we forcefully prevent
users from seeing users' logs from other groups
2024-03-11 14:27:01 +01:00
Laurent David
f92d5f9ca8 MDL-80565 report_log: Fix report log selector
* When using the report log and we select a group, the group
list should show the right list of users
2024-03-11 14:26:55 +01:00
Laurent David
2e138101ff MDL-80565 report: Revert MDL-41465 changes
* Partial revert of changes made in MDL-41465,
while keeping the API changes made in enrol/lib.
2024-03-11 11:00:05 +01:00
Eloy Lafuente (stronk7)
361dfe8145
MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces:
- https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
- https://www.php.net/manual/en/reflectionproperty.setaccessible.php
- https://www.php.net/manual/en/reflectionmethod.setaccessible.php

As of PHP 8.1.0, calling this method has no effect; all methods are
invokable by default. So, let's remove all uses from core, they are
no-op.
2024-03-10 21:15:00 +01:00
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
Paul Holden
5be06944e4
MDL-80199 report_log: remove duplicate "all logs" breadcrumb. 2024-01-10 10:07:48 +00:00
Stephan Robotta
dd07c7c042 MDL-41465 reports: In separate group mode, limit to same 2023-12-06 13:53:28 +07:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Jun Pataleta
1eb8ee32bb
MDL-78806 core: Remove redundant site name
MDL-78806 core: Remove redundant site name on page titles

* With the site name now being appended to the page titles, there
is no need to manually append the page titles.
2023-09-09 08:58:54 +08:00
Stephan Robotta
95f5e32f99 MDL-63759 iplookup: use OSM if Google is not used, use accuracy radius 2023-05-24 08:40:34 +02:00
Meirza
94bda23532 MDL-77350 report: Added class properties that are not declared
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-05-16 00:33:19 +07:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Amaia Anabitarte
d535182414 MDL-77178 report: Update reports tertiary navigation 2023-03-20 11:13:55 +01:00
Mathew May
00747e2641 MDL-52805 core: Remove references to old logging in behat 2023-03-07 13:08:46 +08:00
Mathew May
33ebbddde2 MDL-52805 core: Remove legacy log plugin and more calls 2023-03-07 13:08:46 +08:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Sara Arjona
b04f010a95 Merge branch 'wip_MDL-59545_master' of https://github.com/gjb2048/moodle 2022-04-06 12:42:07 +02:00
Ilya Tregubov
e20d28bffb Merge branch 'MDL-74363' of https://github.com/Chocolate-lightning/moodle 2022-04-06 11:08:24 +06:00
Mathew May
96304ae607 MDL-74363 navigation: Add breadcrumbs in course use sub pages 2022-04-05 19:50:50 +12:00
Gareth Barnard
8af8eeef69
MDL-59545 navigation: Missing editing icons on activity pages 2022-04-03 21:54:51 +01:00
Peter Dias
2c27a33213 MDL-74276 report: Update behat tests to account for new page. 2022-04-01 12:44:04 +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
Peter Dias
675b7eb234 MDL-73373 report: Disable module level report options 2022-02-08 09:04:04 +08:00
Andrew Nicols
6670c04c23 Merge branch 'MDL-73476' of https://github.com/stronk7/moodle 2022-01-18 09:31:44 +08:00
Ilya Tregubov
67adef891f Merge branch 'MDL-73358-master' of https://github.com/junpataleta/moodle 2022-01-17 16:11:32 +02:00
Eloy Lafuente (stronk7)
0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_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 lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +01:00
Jun Pataleta
a926979c0c MDL-73358 report: Add page content heading for report pages 2022-01-14 16:14:07 +08:00
Paul Holden
2ae0424bd7 MDL-73365 report_log: fix detection of site page logging.
In turn, this adds back the secondary navigation to the page.
2022-01-14 00:03:54 +00: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
Mihail Geshoski
e00da7e884 MDL-72287 behat: Update behat tests 2021-12-09 23:47:57 +08:00
Mihail Geshoski
d000b16a72 MDL-72287 report: Add back link and headings in user profile pages 2021-12-09 22:46:57 +08:00
Mathew May
b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
Andrew Nicols
9cba40c410 Merge branch 'MDL-71965-master' of git://github.com/bmbrands/moodle 2021-10-11 08:06:43 +08:00
Bas Brands
d1b9f7d1f1 MDL-71965 theme_boost: move footer content in popover 2021-10-06 11:32:08 +02:00
Jake Dallimore
3c7e486205 Merge branch 'MDL-72094-master' of git://github.com/mihailges/moodle 2021-10-06 10:51:29 +08:00
Mihail Geshoski
7d821080f0 MDL-72093 navigation: Update behat tests 2021-09-14 12:02:35 +08:00