234 Commits

Author SHA1 Message Date
Paul Holden
de4e2a545a
MDL-82455 badges: link report recipients count to appropriate page. 2024-08-15 21:40:33 +01: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
Sara Arjona
e559a3c325
MDL-82168 badges: Fix and improve behat tests 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
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
Huong Nguyen
7e30a3d524
Merge branch 'MDL-73091-main' of https://github.com/laurentdavid/moodle 2024-07-01 14:05:02 +07: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
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
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
David Cerezal
1ded2b9d48 MDL-81128 reportbuilder: use specific step instead workaround 2024-03-08 10:33:15 +01: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
Sara Arjona
0b3b739370
MDL-80866 behat: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +01:00
Sara Arjona
b33ba0b9fb
Merge branch 'MDL-78967-main' of https://github.com/kevpercy/moodle 2024-02-27 12:49:06 +01: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
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
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
ee81bfabe8
Merge branch 'MDL-77061' of https://github.com/dravek/moodle 2023-09-05 10:53:19 +08:00
David Carrillo
f0770658fb
MDL-77061 badge: Convert "Manage badges" page to use Report Builder
- Manage badges page is now a Report Builder system report to show
the list of site and course badges.
2023-08-25 12:12:37 +02:00
Stefan Topfstedt
7b04638c52 MDL-71212 core_course: adds controls to the course index drawer. 2023-08-18 11:00:55 -07:00
Simey Lameze
74b25ba5fd MDL-77695 behat: use automatic completion to award badges 2023-08-16 11:03:46 +08:00
Sara Arjona
2fcdfc17c1
Merge branch 'MDL-78648-master' of https://github.com/rmady/moodle 2023-07-10 07:35:19 +02:00
Andrew Nicols
3d5afd6061
Merge branch 'MDL-75810' of https://github.com/paulholden/moodle 2023-07-09 22:23:29 +08:00
Sara Arjona
abcbeca33d
MDL-78184 badges: Improve user flow for connecting backpack 2023-07-07 08:53:43 +02:00
Rodrigo Mady
9a5eb76a56 MDL-78648 badges: Fix in unit tests for test_get_user_badge_by_hash 2023-07-06 09:41:03 -03:00
Sara Arjona
7ae114dd5f
MDL-74570 badges: Remove unnecessary hacks 2023-06-29 17:32:51 +08:00
Paul Holden
ccafa6e657
MDL-75810 badges: tag support in badge custom report sources. 2023-06-26 09:50:45 +01:00
Andrew Nicols
bd3a28eb2b
Merge branch 'MDL-74570-master' of https://github.com/rmady/moodle 2023-06-24 22:20:35 +08:00
Sara Arjona
5039f6980c Merge branch 'MDL-63120_Badges_cron_task_fails-master' of https://github.com/mebis-lp/moodle 2023-06-21 11:41:51 +02:00
Rodrigo Mady da Silva
4b26d1f784 MDL-74570 core_badges: Add webservice core_badges_get_user_by_hash 2023-06-20 21:14:17 -03:00
Paul Holden
697be4eaa3
MDL-75810 badges: allow tags to be specified in test data generator. 2023-06-16 16:06:09 +01:00
Jun Pataleta
620371e7d3 Merge branch 'MDL-73325-master' of https://github.com/ntdat1904/datnguyen_moodle 2023-06-15 11:31:22 +08:00
Sara Arjona
3878c85440 MDL-78102 badges: Check empty backpack email/password
For backpack connection using OBv2.0, email and password can't be
blank.
This patch adds some extra checks to validate this and displays an
error to the users before trying to connect to the backpack.
Besides, the error displayed when any error is returned by the
backpack (like invalid credentials), has also been improved, to
make it clearer for the users.
2023-06-13 11:21:13 +02:00
Damian Hippisley
faa41cd791 MDL-73325 core_badges: Add tags field to BadgeClass 2023-06-09 13:41:07 +01:00
Paul Holden
12bc873b26
MDL-73648 badges: add Behat generator class for creating badges. 2023-05-26 12:19:14 +01:00
=
a076a80dec MDL-63120 core_badges: Avoid multiple joins in sql statement 2023-05-24 13:37:59 +02:00