574 Commits

Author SHA1 Message Date
Ilya Tregubov
fdfdd02639 NOBUG: Add upgrade notes 2024-07-19 09:30:19 +08:00
Paul Holden
a3c386af93
MDL-82463 reportbuilder: change non-numeric entity column types.
Where columns were previously of type `TYPE_INTEGER` or `TYPE_FLOAT`
but did not provide numeric data on output, we should change their
type to `TYPE_TEXT` (i.e. the default) to ensure that future work on
numeric aggregation doesn't affect them.
2024-07-15 10:42:01 +01:00
Huong Nguyen
abcac5bc8f
NOBUG: Add upgrade notes 2024-07-12 08:41:57 +07:00
Sara Arjona
e559a3c325
MDL-82168 badges: Fix and improve behat tests 2024-07-11 11:19:34 +08:00
Sara Arjona
8c006300e5
MDL-82168 badges: Move enable/disable badges to modal
Co-authored-by: Ferran Recio <ferran@moodle.com>
2024-07-11 11:19:34 +08:00
Sara Arjona
814753e558
MDL-82168 badges: Add WS to enable/disable badges 2024-07-11 11:19:34 +08:00
Sara Arjona
11b276fc1b
MDL-43938 badges: Bagde names are not unique anymore
The restriction for the badge name to be unique has been removed so,
from now on, the badge names can be duplicated, even inside a course.
2024-07-08 15:53:27 +02:00
Sara Arjona
71aca6e27e
MDL-43938 badges: Fix coding style 2024-07-05 10:11:39 +02:00
Sara Arjona
ae5fc380b5
MDL-43938 badges: Merge newbadge.php and edit.php
The newbadge.php and edit.php pages have been merged in edit.php
to make them easier to maintain because they were quite similar
(newbadge.php was only used for creating badges and edit.php for
editing badge details and messages).
2024-07-05 10:11:39 +02:00
Sara Arjona
89dcf5066b
Merge branch 'MDL-74251-main' of https://github.com/lucaboesch/moodle 2024-07-03 09:35:56 +02:00
Huong Nguyen
7e30a3d524
Merge branch 'MDL-73091-main' of https://github.com/laurentdavid/moodle 2024-07-01 14:05:02 +07:00
Adrian Perez
e1353c7649 MDL-74251 core: Remove old icon helper classes 2024-06-27 18:28:05 +02:00
Sara Arjona
062acb0529
MDL-82233 badges: Display awarded users only when it applies
The message with the number of uses who have awarded a badge
were displayed always (even when the badge was disabled).
2024-06-21 06:56:03 +02:00
Wolfgang Reichert
1264e3e0f0 MDL-73091 core_badges: Avoid undefined variable notice in review
* Fix review method for award_criteria_courseset when courseset is empty
* Add unit tests for coverage of the award_criteria_courseset class

@co-authored jz-reichert@web.de
2024-06-17 09:59:38 +02:00
Eloy Lafuente (stronk7)
674497a12c
MDL-81523 phpunit: Add all missing setUp/tearDown parent calls
All setUp(), tearDown(), setUpBeforeClass() and tearDownAfterClass()
must, always, call to parent, to ensure that everything is properly
set and cleaned.

While in a lot of situations this is not needed (parents may not
have anything to run), with PHPUnit >= 10 this can become more
important because we are going to move the reset code from current
placement @ runBare() to setUp()/tearDown().

Note that all the changes performed in this commit have been detected
and fixed by moodle-cs (ParentSetUpTearDownSniffTest).
2024-06-14 16:04:57 +02:00
Huong Nguyen
96d29ef71b
Merge branch 'MDL-81522' of https://github.com/stronk7/moodle 2024-06-12 08:46:31 +07:00
Eloy Lafuente (stronk7)
01148a0816
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 11:55:07 +02:00
Paul Holden
78f56cffde
MDL-76392 reportbuilder: migrate manual to native report aggregation.
Now that system reports support aggregation natively, we can replace
a whole bunch of similar code containing hand-rolled versions with much
simpler/consistent use of API.
2024-06-07 16:08:22 +01:00
Paul Holden
c9d2e72943
MDL-81282 dml: replace occurrences of large integers with new constant.
Where calling code was previously using either the 32-bit limit, or a
value equal to SQL_INT_MAX inside a database read/write, instead use
our new constant.
2024-05-24 22:19:54 +01:00
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
Paul Holden
9b827c09ce
MDL-81434 reportbuilder: ensure filter/condition parameter uniqueness.
This change fixes an edge case that could be triggered by creating a
custom report that contained a filter instance that was active as both
a filter and condition, where the filter instance provides parameters
to it's SQL fragment.

There is only one such filter present currently with which we can test
this, see 2f9001cbe9.
2024-05-10 09:48:52 +01:00
Daniel Ziegenberg
08027e408c
MDL-81281 phpunit: assertObjectHasAttribute is deprecated
To be integrated as part of MDL-81266

When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectHasProperty() instead."

So we replace all instances of assertObjectHasAttribute with
assertObjectHasProperty.

PHPUnit justifies the change with:
> PHPUnit currently refers to "fields" (see above) as "attributes". This
> is (or will become) confusing considering the introduction of
> attributes in PHP 8 and their support in PHPUnit.  PHPUnit will be
> changed to use the term "property" instead of "attribute" where "field"
> is meant.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-03-25 16:21:45 +01:00
Sara Arjona
a399be5f01
Merge branch 'MDL-81073' of https://github.com/paulholden/moodle 2024-03-19 23:18:13 +07:00
Paul Holden
ba1f9cb26c
MDL-81073 badges: better Oracle support for expiry filter.
Avoid the following error by casting the bound parameter:

ORA-00932: inconsistent datatypes: expected CHAR got NUMBER.
2024-03-18 19:53:29 +00:00
Sara Arjona
0d7af68082
Merge branch 'MDL-81073' of https://github.com/paulholden/moodle 2024-03-18 12:43:15 +01:00
Andrew Nicols
9cdc5850c5
Merge branch 'MDL-75952' of https://github.com/stronk7/moodle 2024-03-12 10:45:02 +08: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
Paul Holden
8fc9d3e242
Merge branch 'MDL-81128-main' of https://github.com/davidcerezal/moodle into main 2024-03-08 14:50:24 +00:00
David Cerezal
1ded2b9d48 MDL-81128 reportbuilder: use specific step instead workaround 2024-03-08 10:33:15 +01:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
Paul Holden
2f9001cbe9
MDL-81073 badges: implement badge entity version/expiry filtering.
Add the same to the manage badges report, plus pre-existing version
column.
2024-03-07 14:38:23 +00:00
Ilya Tregubov
a6fd25485e Merge branch 'MDL-80342' of https://github.com/paulholden/moodle 2024-03-07 08:51:25 +08:00
Sara Arjona
67a1d0b639
MDL-73426 badges: Final deprecation for print_badge_tabs 2024-03-05 13:25:02 +01:00
Sara Arjona
0b3b739370
MDL-80866 behat: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +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
Sara Arjona
b33ba0b9fb
Merge branch 'MDL-78967-main' of https://github.com/kevpercy/moodle 2024-02-27 12:49:06 +01:00
Paul Holden
958090edc6
MDL-80342 reportbuilder: use new cohort filter in related reports. 2024-02-21 16:34:35 +00:00
Angelia Dela Cruz
31ce6c87fb MDL-79792 core_badges: Behat test for awarding badge to group members 2024-02-21 13:55:45 +08:00
Kevin Percy
a72a810479 MDL-78967 core_grades: Removed advanced grade item and category options 2024-02-21 13:45:21 +08:00
Sara Arjona
ce7f3eef04
Merge branch 'MDL-79552' of https://github.com/paulholden/moodle 2024-02-14 09:30:09 +01:00
David Carrillo
10d2b5864b
MDL-80325 reportbuilder: Update 'Delete' links to red color
- Update all 'Delete' links on RB system report actions to red color
2024-01-12 15:38:19 +01:00
David Carrillo
76bed1480a
MDL-80052 badges: Convert Course badges report to use Report builder 2023-12-19 10:23:27 +01:00
David Carrillo
982581d5eb
MDL-80052 badges: Convert Badge recipients report to use Report builder 2023-12-19 10:23:26 +01:00
Paul Holden
4fb106506d
MDL-79552 cohort: add cohort data to user-focused custom reports. 2023-12-15 09:58:19 +00:00
Huong Nguyen
b671e89685 Merge branch 'MDL-79828-master' of https://github.com/andelacruz/moodle 2023-12-14 10:14:07 +07:00
Paul Holden
7143cf4cbc
MDL-79397 reportbuilder: update existing entity table definitions. 2023-12-07 17:19:01 +00:00
Paul Holden
c564a8249a MDL-80268 badges: require capability to view awarded badges. 2023-12-06 03:54:20 +01:00
Angelia Dela Cruz
b445e72c80 MDL-79828 core_badges: Delete already awarded course badges 2023-11-21 16:11:39 +08:00
Sara Arjona
95e50b59ea
MDL-75572 criteria: Only award badges to sucessfull completions
The UX team confirmed a badge shouldn't be awarded when the criteria
use a passing grade and the user gets a failing grade.
So the COMPLETION_COMPLETE_FAIL status won't be considered
completed for activities with completion that require a passing
grade.
2023-10-25 07:08:03 +02:00
Andrew Nicols
c81cf6a7b7
MDL-79583 core_badges: Remove unused AMD module
This module was removed by removed by MDL-78324, but added back due to a
merge conflict in MDL-79064.
2023-10-04 14:28:30 +08:00