522 Commits

Author SHA1 Message Date
Paul Holden
b6e85266da
MDL-79334 badges: fix return URL of activate action in system report.
We cannot rely on `qualified_me()` to work reliably upon report reload
events (paging, sorting, filtering, etc. are all performed via AJAX).

Small cleanup after f0770658.
2023-09-12 15:13:22 +01:00
Andrew Nicols
ee81bfabe8
Merge branch 'MDL-77061' of https://github.com/dravek/moodle 2023-09-05 10:53:19 +08:00
Andrew Nicols
0235a368da
Merge branch 'MDL-78179-master' of https://github.com/sarjona/moodle 2023-09-01 11:25:22 +08:00
Andrew Nicols
af7719682d
MDL-79064 core: Update all get_strings as uses 2023-08-29 10:57:54 +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
Sara Arjona
f2199b5c2d
MDL-78179 badges: Clean SESSION when user disconnect backpack
The token information was not being properly cleared from the $SESSION.
As a result, certain errors were occurring when users attempted to
reconnect within the same session.
2023-08-23 07:35:44 +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
Damian Hippisley
26407c6ca1 MDL-78545 core_badges: Fix PHP 8.2 dynamic properties
Issue MDL-73325 added the option to tag badges, however
it introduced a dynamic property on the badge object.
In PHP 8.2 dynamic properties are deprecated, this patch
fixes this.
2023-08-07 11:04:04 +10: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
Andrew Nicols
e82aed72e6
Merge branch 'MDL-78012' of https://github.com/paulholden/moodle 2023-05-25 12:02:55 +08:00
=
a076a80dec MDL-63120 core_badges: Avoid multiple joins in sql statement 2023-05-24 13:37:59 +02:00
Andrew Nicols
03e4afdb39 MDL-78132 badges: move apiBase consumption to backpack
The logic to create the issuer has been moved to the backpack form
in order to improve the workflow and update the apiBase with the
proper value comming from the badgeconnect.json manifest file.

So, as part of this change in the workflow, the following changes
has been also implemented (to make the UI easier for users):

- The "Open Badges" oAuth issuer button has been removed from the
"OAuth Services" admin page. As they are created/updated when a backpack
is saved, this button is not required anymore.
- The "OAuth2 services" and "Backpack API URL" parameters have been
removed from the Manage backpacks form, because they are created on
the fly each time the backpack is saved.
2023-05-23 08:46:39 +02:00
Paul Holden
46d12cfa11
MDL-78012 badges: final removal of deprecated 311 backpack methods. 2023-05-16 14:58:10 +01:00
Meirza
3895529b74 MDL-77350 badges: 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 01:03:01 +07:00
Andrew Nicols
bd214de282 MDL-75552 badges: move apiBase consumption to backpack
The apiBase in .well-known/badgeconnect.json was ignored and it was
causing some failures when connecting or sending badges to an
external backpack.
For OBv2.1, it has been changed to always use the apiBase defined
in the badgeconnect.json backpack provider.
2023-05-09 08:50:42 +02:00
Sara Arjona
ed53d81dc7 MDL-77842 badges: Improve debugging information for Badgr
In MDL-77086 some extra information was added when a badge can't be
sent to a backpack. However, as the Badgr is not following the
specification, it's still hard to debug it when it fails (as
raised in MDL-75552, Badgr is not working because, in some cases,
it's returning the "Method Not Allowed / Request method 'POST'
not supported" error.
2023-04-14 13:47:23 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
9ffbcce0ac MDL-77164 various: fix mustache template name 2023-04-13 09:43:15 +01:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Sara Arjona
597564d7b4 MDL-77086 badges: Improve debugging
Display more information, like the status error, when the badge can't
be sent to the backpack.
2023-02-13 08:40:45 +01:00
Andrew Nicols
edd1fa9218 Merge branch 'MDL-76933' of https://github.com/paulholden/moodle 2023-01-30 11:25:27 +08:00
Sara Arjona
ae53d04144 Merge branch 'MDL-75337-master' of https://github.com/laurentdavid/moodle 2023-01-24 16:07:35 +01:00
Laurent David
fc72a1d7b1 MDL-75337 core: Single button - core changes
* Change all core calls toward single_button to use single_button::BUTTON_PRIMARY
    when needed
2023-01-24 06:01:35 +01:00
Marina Glancy
b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Paul Holden
ab670ab286 MDL-76933 badges: create user-focused datasource for custom reporting.
This report source differs from the original badges source (5274ee5a)
by making `user` the primary table of the report, allowing for reports
on all users regardless of whether they have been awarded badges.
2023-01-20 10:20:01 +00:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Paul Holden
45818da292 MDL-76221 reportbuilder: improve report test generator methods.
Test generators for creating report columns, filters and conditions
now allow for setting all persistent properties.
2023-01-04 10:56:27 +00:00
David Woloszyn
126028cc76 MDL-76183 lib: Update Github URLs 2022-11-30 14:01:31 +11:00
Shamim Rezaie
535e997ac3 Merge branch 'MDL-75525-master-2' of https://github.com/marinaglancy/moodle 2022-11-11 12:48:22 +11:00
Marina Glancy
064eccd4fc MDL-75525 reportbuilder: specify initial sorting for datasources 2022-11-07 15:43:45 +01:00
Huong Nguyen
d4d666cdf4 MDL-74996 Quiz: Change the submission confirmation dialogue content
- Changed the title from "Confirm" to "Submit all your answers and finish?"
 - Changed the content from "Once you submit, you will no longer be able to change your answers for this attempt."
   to "You will no longer be able to change your answers for this attempt."
 - Changed some Behat scenarios to match with the new dialogue content
2022-11-07 09:40:04 +07:00
Marina Glancy
5a9590dfad MDL-76073 badges: badge RB entity should have nullable callbacks 2022-10-25 10:49:06 +02:00
Paul Holden
b40d438fbf MDL-75708 reportbuilder: consider stress tests as requiring longtest.
We should respect the value of the PHPUNIT_LONGTEST constant in the
report source stress tests, as it was discovered after 165e26fa that
the default configuration of some CIs (GHA) was not sufficient to run
them.

Hence, use the PHPUNIT_LONGTEST to determine whether to execute said
tests. Note this constant is enabled on internal CI.
2022-09-09 11:11:39 +01:00
Paul Holden
208adcf3d1 MDL-73938 reportbuilder: better Oracle support of long text columns.
Specifically during column grouping/aggregation, we need to avoid CLOB
datatype inconsistencies (ORA-00932).
2022-09-05 12:08:54 +01:00
Paul Holden
165e26fad9 MDL-73938 reportbuilder: helper methods for automating report tests.
Implement stress tester methods for iterating over report columns,
aggregation and conditions. Assert that each works correctly in
isolation, and when used in conjunction with other columns.
2022-09-05 12:07:17 +01:00