596 Commits

Author SHA1 Message Date
Huong Nguyen
cbf64b53fe
MDL-82503 badges: Fix Behat failure 2024-09-04 15:23:23 +07:00
Sara Arjona
2f4efdb879
MDL-82503 badges: Fix behat and PHPUnit tests 2024-09-03 20:27:51 +02:00
Sara Arjona
9b58ab3e87
MDL-82503 badges: Deprecate badges/view.php 2024-09-03 20:00:18 +02:00
Sara Arjona
c6d7cf85f6
MDL-82503 badges: Deprecate showmanage button from action_bar 2024-09-03 19:59:29 +02:00
Sara Arjona
6adbe05d9f
MDL-82503 badges: Deprecate course_badges report 2024-09-03 19:59:28 +02:00
Sara Arjona
4cdeb79566
MDL-82503 badges: Prepare and make index.php default page
The badges/index.php and badges/view.php pages are quite similar and
have been merged into index.php.
This commit updates index.php to incorporate the missing information
previously found in view.php.
2024-09-03 19:55:49 +02:00
Jun Pataleta
abc6e9d11e
Merge branch 'MDL-82953-main' of https://github.com/sarjona/moodle 2024-09-03 10:37:05 +08:00
Sara Arjona
3c47fbe3b6
MDL-82953 badges: Fix redirect when form is cancelled
From the new badge page, when the form is cancelled, a redirect should
be done to the badges/index.php.
This is a regression introduced when newbadge.php and edit.php pages
were merged.
2024-08-30 11:37:02 +02:00
Paul Holden
5d0e981eed
MDL-82804 badges: define no results notice inside report instances.
When doing so from calling code, the property is not persisted when
filtering/paging (or any AJAX interaction); instead, it should be
set from within the report instance itself.
2024-08-29 16:10:30 +01:00
Daniel Ureña
33717237aa MDL-82105 Badges: Get badge by badge id. 2024-08-28 10:14:15 +02:00
Sara Arjona
7ce18d2edb
NOBUG: Add upgrade notes 2024-08-23 16:04:48 +02:00
Sara Arjona
b628db7abe
Merge branch 'MDL-82742-main' of https://github.com/albertgasset/moodle 2024-08-21 16:43:44 +02:00
Sara Arjona
78530eca1c
Merge branch 'MDL-82455' of https://github.com/paulholden/moodle 2024-08-19 16:45:51 +02:00
Huong Nguyen
e2708aeacf
NOBUG: Add upgrade notes 2024-08-16 08:37:50 +07:00
Paul Holden
de4e2a545a
MDL-82455 badges: link report recipients count to appropriate page. 2024-08-15 21:40:33 +01:00
Albert Gasset
d9ea6bc804 MDL-82742 badges: Include recipient in web services that return badges 2024-08-09 15:24:56 +02:00
Mikel Martín
0a03018116 MDL-75671 theme_boost: Refactor spacing classes for BS5
- Add SCSS code for spacing utility classes to the Boostrap 5 bridge SCSS file
- Replace all occurrences in the codebase (pr-1 > pe-1, ml-auto > ms-auto, ml-sm-3 > ms-sm-3, ...)
2024-08-09 07:40:17 +02:00
Paul Holden
19d2552caa MDL-82390 badges: correct context check when deleting badges. 2024-08-07 04:12:45 +00:00
Jun Pataleta
902f9535b6
NOBUG: Add upgrade notes 2024-07-26 13:35:25 +08:00
Sara Arjona
b2f66d477b
MDL-70983 badges: Remove OBv1.0 support
The only backpack implementing OBv1.0 was Mozilla Backpack. It closed
in 2019 and their badges were moved to https://backpack.openbadges.org/
by Badgr.
However, as Badgr is supporting OBv2.0 too, it makes no sense keep OBv1.0
implementation in Moodle: it has caused some issues and over-complicates
current code.
2024-07-19 10:39:38 +02:00
Sara Arjona
1a74342bf4
MDL-72354 badges: Fix behat tests 2024-07-19 09:41:38 +02:00
Huynh
879901ef24
MDL-72354 badges: Show always issuer details when creating badges
Co-author: Huynh Nguyen
2024-07-19 09:41:38 +02:00
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