362 Commits

Author SHA1 Message Date
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
Ilya Tregubov
788f0e6f0a NOBUG: Add upgrade notes 2024-06-14 08:56:53 +08: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
Jun Pataleta
c42c94279a
NOBUG: Add upgrade notes 2024-06-06 22:30:24 +08:00
Amaia Anabitarte
f185fdca52 MDL-81749 core_completion: Let custom rules to return failed state 2024-06-05 15:55:04 +02:00
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
Amaia Anabitarte
6bc8b45c85 MDL-81601 core_course: Add course index completion status behats 2024-05-09 19:38:45 +08:00
Amaia Anabitarte
bb93bcdb2d MDL-81601 core_course: Fix course index completion status 2024-05-08 08:16:11 +02:00
Jun Pataleta
91837d0553
MDL-70829 course: Mark up decorative images properly
* Decorative images should have an empty alt text and there's no need
to set a presentation role.
* Accessibility Behat tests added to cover the changes:
  - block_starredcourses uses the core_course/no-courses template
  - core_completion tests changes in core_course/activity instance and
    core_course/editdefaultcompletion
2024-04-12 10:42:10 +08:00
Sara Arjona
1f76843f25
MDL-81337 behat: Fix behat failures
A tooltip has been added to the + icons in between activities with the
same text as the "Add an activity or resource" button.
The easiest way to fix the behat failures is to click this
button in empty sections (that way, the button is unique).
2024-04-08 12:44:40 +02:00
Huong Nguyen
1320a2a397
Merge branch 'main_MDL-81172' of https://github.com/mattporritt/moodle 2024-03-28 11:46:51 +07:00
Ilya Tregubov
9e55042be1 Merge branch 'MDL-80302-main' of https://github.com/aanabit/moodle 2024-03-28 08:58:35 +08:00
Amaia Anabitarte
4a3a32b675 MDL-80302 completion: Improve default completion error tracking
Co-authored-by: Sara Arjona <sara@moodle.com>
2024-03-27 16:11:50 +01:00
Matt Porritt
5d74f366a0 MDL-81172 Backup: Async Backup on by default from install
Enable asynchronous backup and restore on new site install.
Existing behaviour is not changed for sites being upgraded.
Behat tests have been set to use synchronous mode.
2024-03-18 12:01:50 +11:00
Iñigo Zendegi
6868ee3ecd MDL-81127 filter: Support filters on course completion message 2024-03-08 13:28:54 +01:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
Sara Arjona
b2e5f3e746
MDL-80866 phpunit: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +01:00
Sara Arjona
0b3b739370
MDL-80866 behat: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +01:00
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Simey Lameze
7b7be30b4d MDL-80613 behat: convert manual completion steps to use generators 2024-02-15 17:52:38 +08:00
Juan Leyva
408d7c0c9c MDL-80392 completion: Fix exporter for Web Services 2024-02-06 11:01:42 +01:00
Ilya Tregubov
32fe5a74ed Merge branch 'MDL-80098' of https://github.com/paulholden/moodle 2024-01-25 10:20:05 +08:00
Sara Arjona
5585ccf048
Merge branch 'MDL-71950' of https://github.com/paulholden/moodle 2024-01-24 17:08:59 +01:00
Jun Pataleta
10744550e6
Merge branch 'MDL-79029-main' of https://github.com/ferranrecio/moodle 2024-01-23 09:26:30 +08:00
Ferran Recio
f4adbc8a11 MDL-79029 behat: replace deprecated behat steps 2024-01-22 11:12:28 +01:00
Jun Pataleta
21b39e2f53
Merge branch 'MDL-74238' of https://github.com/paulholden/moodle 2024-01-22 15:03:28 +08:00
Paul Holden
e187e13947
MDL-80098 core: correct arguments for invalidmoduleid exceptions.
The "invalid module ID" should be passed as the `$a` constructor
argument.
2024-01-17 08:58:49 +00:00
Angelia Dela Cruz
e8c8dbc54e MDL-80382 behat: Replace "Frist" typos in Behat tests to "First" 2024-01-09 10:44:15 +08:00
Paul Holden
7298d0762a
MDL-74238 completion: final removal of deprecated navigation methods. 2023-12-21 15:32:05 +00:00
Simey Lameze
8e1fcc268a MDL-80243 behat: make completion step more specific
Credit goes to Matthias Opitz
2023-12-18 09:25:09 +08:00
Amaia Anabitarte
3f3dc5a035 MDL-80233 completion: Use default for empty values 2023-12-12 16:31:00 +01:00
Sara Arjona
51a70cf44e
Merge branch 'MDL-79862-master' of https://github.com/aanabit/moodle 2023-12-05 16:35:20 +01:00
Jun Pataleta
e756edf18d
Merge branch 'MDL-79726-main' of https://github.com/sarjona/moodle 2023-12-04 12:09:26 +08:00
Sara Arjona
564031b183
Merge branch 'MDL-80209-main' of https://github.com/aanabit/moodle 2023-12-01 10:56:02 +01:00
Sara Arjona
032f39aeef
MDL-79726 completion: Overall should consider pass/fail states too
In MDL-78744, when the overallcompletion state was added to be displayed
in the activity card, only COMPLETE/INCOMPLETE status were considered.
However, depending on the activity completion settings, there are a
couple of states more that should also be included (COMPLETE_FAIL and
COMPLETE_PASS).

A new method has been added to the cm_completion_details class to
calculate whether a module should be considered or not completed,
based on their completion options and the current value for the
overall complete state.
2023-12-01 09:18:36 +01:00
Amaia Anabitarte
1a0a86c1c9 MDL-80209 mod_scorm: Save minimum score completion 2023-11-30 10:37:52 +01:00
Sara Arjona
9e3acd9f06
MDL-79915 backup: Improve the Restore main page
Júlia, from the PX team, has suggested a few improvements to make it easier to
understand the Restore main page:

- Displaying a notification instead of the empty table when there are no files
in an area.
- Improve the copy, removing the help buttons and moving this information to the
main page.
- Replacing "Import a backup file" with "Upload a backup file".
- Adding some space between the different areas.
- Displaying a different text in the different "Manage backup files" buttons.
2023-11-29 09:19:46 +01:00
Amaia Anabitarte
b4816367b7 MDL-79862 completion: Improve error handling for default completion 2023-11-20 09:51:21 +01:00
Paul Holden
80ddffea97
MDL-71950 completion: final removal of deprecated help_icon methods. 2023-11-15 15:06:17 +00:00
Mohamed Shehata
5d4f7ab46e MDL-78335 completion: standarize date format based on language 2023-10-25 16:44:01 +03:00
Sara Arjona
9ced468959
MDL-79367 availability: Fail grade does not mark activities as completed
The UX team confirmed that an activity shouldn't be considered completed
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 from now on.
2023-10-16 07:51:27 +02:00
Huong Nguyen
7ac9c99c74
Merge branch 'MDL-79351-master' of https://github.com/ferranrecio/moodle 2023-09-18 16:10:17 +07:00
Ferran Recio
f652b769fe MDL-79351 completion: fix form_trait code smells 2023-09-14 12:24:41 +02:00
Amaia Anabitarte
9e42ab938c
MDL-78527 core_completion: Fixing latest behat fails 2023-09-13 17:00:09 +02:00
Amaia Anabitarte
b87b72195c MDL-78527 core_completion: Fixing tests 2023-09-12 15:43:49 +02:00
Amaia Anabitarte
85d07564cb MDL-78527 core_completion: Improving core completion styling 2023-09-12 15:43:48 +02:00
Amaia Anabitarte
f367759123 MDL-78527 core_completion: Fixing a bug found in master
Changing from 'Must receive a PASSING grade' to 'Not grade required'
keeps the 'completionpassgrade' = 1 and we should reset setting to 0.
2023-09-12 09:59:36 +02:00
Sara Arjona
3c831861ec
Merge branch 'MDL-78530-master' of https://github.com/aanabit/moodle 2023-08-31 11:10:17 +02:00
Amaia Anabitarte
4c4e2224e1 MDL-78530 core_completion: Remove $CFG->completiondefault setting 2023-08-31 08:40:24 +02:00
Amaia Anabitarte
1f68fe635f MDL-78530 core_completion: Use site default completion or none
When creating a new activity we should use course level default completion
and site level completion if there is no course level default completion.

For non defined default completion values use COMPLETION_TRACKING_NONE
instead of COMPLETION_TRACKING_MANUAL.
2023-08-31 08:40:24 +02:00