502 Commits

Author SHA1 Message Date
Paul Holden
534b2b1c69
MDL-84000 reportbuilder: move testcase helper to autoloaded namespace.
Clean up some class imports while we're at it.
2024-12-13 12:49:00 +00:00
Andrew Nicols
5be481d1d0
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Andrew Nicols
3d51aed3e2
MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-19 09:30:51 +08:00
Paul Holden
234d24dfea MDL-82390 badges: correct context check when deleting badges. 2024-08-02 01:40:24 +00:00
Angelia Dela Cruz
ab118d48f5 MDL-79792 core_badges: Behat test for awarding badge to group members 2024-02-21 14:06:09 +08:00
Huong Nguyen
033a59f9c5 Merge branch 'MDL-79828-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-12-14 10:16:22 +07:00
Paul Holden
7ace11d396 MDL-80268 badges: require capability to view awarded badges. 2023-12-06 04:00:22 +01:00
Angelia Dela Cruz
6aeecbdf46 MDL-79828 core_badges: Delete already awarded course badges 2023-11-21 17:45:47 +08:00
Sara Arjona
05fdc29294
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:20 +02:00
Sara Arjona
8baa08a6bc
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-28 13:34:06 +02:00
Simey Lameze
896763076e MDL-77695 behat: use automatic completion to award badges 2023-08-16 21:16:02 +08:00
Sara Arjona
78ec9c1c12 MDL-78572 badges: Improve debugging information for Badgr
This is a backport from MDL-77842.

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-06-25 17:40:32 +01:00
Sara Arjona
8e965a9661 MDL-78572 badges: Improve debugging
Display more information, like the status error, when the badge can't
be sent to the backpack.

Backport from MDL-77086
2023-06-25 17:40:03 +01:00
Sara Arjona
c047801eb6 Merge branch 'MDL-63120_Badges_cron_task_fails-MOODLE_401_STABLE' of https://github.com/mebis-lp/moodle into MOODLE_401_STABLE 2023-06-21 11:50:28 +02:00
Sara Arjona
7e74ec4a3c 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:52 +02:00
Paul Holden
1ff279717e
MDL-73648 badges: add Behat generator class for creating badges. 2023-05-26 12:19:27 +01:00
=
282a908540 MDL-63120 core_badges: Avoid multiple joins in sql statement 2023-05-24 13:36:41 +02:00
Andrew Nicols
50d1e69df6 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:51:30 +02:00
Andrew Nicols
cd48ae56c7 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
288620b0b4 MDL-75012 js: Full build of all grunt things 2023-03-02 12:15:25 +08:00
Marina Glancy
2dd7290ccb 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:16:06 +08:00
Paul Holden
4ecd652189 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:23 +00:00
David Woloszyn
0be376fdc0 MDL-76183 lib: Update Github URLs 2022-12-01 08:59:05 +03: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
Paul Holden
0304508926 MDL-75245 reportbuilder: re-factor current tag elements to new entity.
Update previous implementation of tags (9ebd801c) in report sources to
use equivalent tag entity columns and filters.
2022-08-18 17:01:21 +01:00
Amaia Anabitarte
205d990c2e MDL-74475 core_badges: Behat test using new step 2022-08-03 10:34:36 +02:00
Jun Pataleta
5b634ef13e Merge branch 'MDL-74656' of https://github.com/paulholden/moodle 2022-07-26 20:03:39 +08:00
Víctor Déniz
5087f56905 Merge branch 'MDL-75119' of https://github.com/paulholden/moodle 2022-07-19 13:48:58 +01:00
Paul Holden
0b616158cb MDL-74656 badges: add test generator class for creating badges. 2022-07-19 08:23:50 +01:00
Jun Pataleta
50598298ba Merge branch 'MDL-75152' of https://github.com/paulholden/moodle 2022-07-13 13:02:07 +08:00
Jun Pataleta
3c6fdb1993 Merge branch 'MDL-71062-master' of https://github.com/sharidas/moodle 2022-07-13 11:39:08 +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
399a922f0d Merge branch 'MDL-74784-master' of https://github.com/sarjona/moodle 2022-07-11 16:54:22 +08:00
Paul Holden
ec452a4e88 MDL-75152 reportbuilder: unique default tag aliases across entities. 2022-07-05 21:45:23 +01:00
Paul Holden
dc60fe6662 MDL-75119 reportbuilder: preload context data for column callbacks.
This prevents additional requests for context instances in the
callback methods, by preloading all required data in the initial
field select.
2022-07-04 13:07:02 +01:00
Paul Holden
e0b0908ba9 MDL-74713 admin: format custom profile fields in identify config. 2022-06-14 17:19:39 +01:00
Paul Holden
5274ee5a25 MDL-73988 badges: implement badges datasource for custom reporting.
Create two entities exposing reportable data on badges and their
recipients, via column and filter definitions.

Create report source bringing them together along with the user and
course entities to provide data for the reportbuilder editor.
2022-05-19 16:43:28 +01:00
Sara Arjona
1cedbd1e19 MDL-74784 core_badges: Fix exception with related badges
System badges with related badges were displaying an error before this patch,
because the is_guest($context) function expects a context_course.
2022-05-18 08:18:33 +02:00
Víctor Déniz
9746b8a6e2 Merge branch 'MDL-74612' of https://github.com/paulholden/moodle 2022-05-05 13:20:20 +01:00
Michael Hawkins
a0f47c8bc4 MDL-74333 badges: Check profile criteria valid when reviewing 2022-05-04 12:57:38 +08:00
Paul Holden
2fede32518 MDL-74612 cohort: use data generator for populating cohort members. 2022-04-29 16:09:35 +01:00
Peter Dias
d27e7e1950 MDL-74478 badges: Check completion_fail when awarding badge
Bring the award_criteria_activity checks in line with the observer checks
2022-04-28 12:14:45 +08:00
Mihail Geshoski
8d0ca00e95 MDL-74386 navigation: Remove redundant set_secondary_navigation() calls
Removes $PAGE->set_secondary_navigation(false) calls which certain pages
were using to prevent displaying secondary navigation menu in the system
context. This logic is now generally handled within the secondary
navigation class.
2022-04-08 15:11:31 +08:00
Peter Dias
62c086ee72 MDL-74313 badge: Disable secondary navigation in badges 2022-03-30 09:17:53 +08:00