20 Commits

Author SHA1 Message Date
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
Juan Leyva
408d7c0c9c MDL-80392 completion: Fix exporter for Web Services 2024-02-06 11:01:42 +01:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Peter
90acd8d381 MDL-52206 core: Add completion criteria to course_modules 2021-10-04 19:44:02 +08:00
Dongsheng Cai
36bc7b07db MDL-71235 webservices: add activity completion data to web services 2021-04-29 13:52:32 +10:00
Mark Johnson
7672471236 MDL-64123 webservices: Add valueused to completion data 2018-12-19 16:26:35 +00:00
Jake Dallimore
fdae6f77d6 MDL-61859 core_completion: fix unit tests expecting exceptions twice
We can't expectException twice in the same test, so split this out into
another test.
2018-04-06 17:30:31 +08:00
Juan Leyva
0e8b3d929d MDL-61312 completion: Return completion for teachers via WS
core_completion_get_activities_completion_status was not returning
completion information for users with the teacher role only (when it
wasn’t a role allowed to track completion).
2018-01-30 12:19:52 +01:00
Pau Ferrer Ocaña
15ead7a176 MDL-60835 completion: Add overrideby field to completion status WS 2017-11-16 16:35:43 +01:00
Jake Dallimore
b08337c35e MDL-37361 completion: Consolidate icon logic and clarify web service
- Icon generation logic moved to the course renderer.
- Web service should return the completion info only, not HTML.
- JS modified to handle icon rendering in relevant cases.
2017-10-10 17:12:22 +08:00
Jake Dallimore
8fbc41d8d5 MDL-37361 completion: minor code fixes. 2017-10-10 17:12:09 +08:00
Jake Dallimore
86f359bf68 MDL-37361 completion: automatic completion disabled when overridden
Changes:
- Activities with auto completion and a completion status overridden to
COMPLETION_COMPLETE are no longer processed by normal completion
triggers.
- All activities can still be completed by students when their
completion status has been overridden to COMPLETION_INCOMPLETE, via
either auto or manual triggers.
- Completion unit tests updated
2017-10-10 17:10:49 +08:00
Eiz Eddin Al Katrib
60a6b36cd5 MDL-37361 completion: Modified and Added phpunit tests 2017-10-10 17:10:37 +08:00
Andrew Nicols
4ceed4dfa6 MDL-55981 core: Remove site:accessallgroups from teacher 2016-10-21 08:55:58 +08:00
Juan Leyva
23b398fc81 MDL-50930 completion: New WS core_completion_mark_course_self_completed 2015-09-11 11:31:12 +02:00
Juan Leyva
b5e6063803 MDL-49313 webservices: Unit tests for the external function
core_completion_get_course_completion_status
2015-04-02 21:58:14 +02:00
Juan Leyva
ea2f0e3e87 MDL-49314 webservices: Fix unit tests for handling hidden activities 2015-04-01 12:22:08 +02:00
Juan Leyva
f578820b3b MDL-49314 webservices: Unit tests for the new external function 2015-04-01 10:19:25 +02:00
Juan Leyva
1490586ea8 MDL-49444 webservices: Tests for update_activity_completion_status 2015-03-24 09:50:02 +01:00