1099 Commits

Author SHA1 Message Date
Huong Nguyen
2845d8cbde
Merge branch 'MDL-79717' of https://github.com/paulholden/moodle 2024-07-11 09:34:52 +07:00
Paul Holden
bd0f8a058f
MDL-79717 phpunit: ensure unique data provider keys in tests.
Duplicate data provider keys were overwriting and/or duplicating
one another, leading to some cases being skipped.

Other "duplicate array key" errors were picked up by `phpcs` in
this dragnet across all tests, which have also been fixed.
2024-07-10 14:08:49 +01:00
Huong Nguyen
6c6b17187b
Merge branch 'MDL-68211-main' of https://github.com/sarjona/moodle 2024-07-10 09:07:33 +07:00
Sara Arjona
5b064f958d Merge branch 'MDL-77834' of https://github.com/paulholden/moodle 2024-07-10 09:17:59 +08:00
Sara Arjona
8c0afe86ae
MDL-68211 feedback: Export percentage format
The feedback was exporting the percentage in the Analysis file using
a wrong value for the format, so instead of having only 2 decimals,
the number was not formatted.
2024-07-05 10:12:26 +02:00
Paul Holden
0dbfd10c0c
MDL-77834 mod_feedback: consistent HTML decoding of answer data.
Restores functionality from 72629ee8c0 that went missing along the way.
2024-07-01 16:21:58 +01:00
Adrian Perez
e1353c7649 MDL-74251 core: Remove old icon helper classes 2024-06-27 18:28:05 +02:00
Mikel Martín
7b0e95aec0 MDL-81743 mod_feedback: Add manage questions behat feature 2024-06-25 15:02:24 +02:00
Mikel Martín
fdb7f280c4 MDL-81743 mod_feedback: Fix multichoice items separation 2024-06-25 15:02:24 +02:00
Mikel Martín
ae01fe1ba4 MDL-81743 mod_feedback: Improve 'Edit' page UI
- Move styles in css to modules.scss
- Add new styles for questions
- Change Delete action to red colour
- Add "Page break" text to pagebreak elements in edit page
2024-06-25 15:02:20 +02:00
Sara Arjona
510e8db405
NOBUG: Add upgrade notes 2024-06-20 16:30:46 +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
Ilya Tregubov
788f0e6f0a NOBUG: Add upgrade notes 2024-06-14 08:56:53 +08:00
Jun Pataleta
48561939a3
MDL-81742 mod_feedback: Remove unnecessary whitespace 2024-06-12 11:39:06 +08:00
Jun Pataleta
03ca4e0bf8
Merge branch 'MDL-81742-main' of https://github.com/roland04/moodle 2024-06-12 11:13:51 +08:00
Huong Nguyen
96d29ef71b
Merge branch 'MDL-81522' of https://github.com/stronk7/moodle 2024-06-12 08:46:31 +07:00
Mikel Martín
f61201c947 MDL-81742 mod_feedback: Improve 'Edit' page navigation
- Remove 'Use template' from edit page tertiary navigation
- Create a new 'Actions' menu in the tertiary naviagation
- Move 'Import' tertiary navigation to the actions menu
- Move 'Export' button to the actions menu
- Move 'Save as new template' to the actions menu
- Convert add question select into an action menu
- Fix related behat scenarios
2024-06-11 15:30:33 +02:00
Eloy Lafuente (stronk7)
4f7631113c
MDL-81522 phpunit: Add missing void return type to all tests #2
This commit includes more changes, all them also adding the :void
return type to unit tests missing them.

The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.

All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
2024-06-11 11:55:08 +02: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
Mikel Martín
95f4f55648 MDL-81741 mod_feedback: Create a new 'Questions' secondary menu item 2024-06-03 16:35:45 +02:00
Sara Arjona
cb72a08193
MDL-81872 course: Improve the summary page for reset 2024-05-27 16:18:54 +02:00
Sara Arjona
b77c6c5c21
MDL-81872 feedback: Fix coding style 2024-05-27 09:23:24 +02:00
Huong Nguyen
bd9631bda5
Merge branch 'MDL-81125-main-alt' of https://github.com/andrewnicols/moodle 2024-05-21 15:33:09 +07:00
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
Paul Holden
ca42ec08a7
MDL-81904 mod_feedback: show export questions only if any present. 2024-05-20 09:27:41 +01:00
Jun Pataleta
78e5814a0f
MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-20 21:01:04 +08:00
Paul Holden
5a18d94dcb MDL-81135 mod_feedback: stricter cleaning of item type parameter. 2024-04-17 03:44:22 +00:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Helen Foster
dccc91f4bc MDL-81351 lang: Import fixed English strings (en_fix) 2024-03-26 23:13:15 +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
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
Eloy Lafuente (stronk7)
29a541724f
MDL-65292 style: Fix all the function declaration ordering
This has been generated running the following Sniff,
part of the Moodle's CodeSniffer standard:
- PSR2.Methods.MethodDeclaration

It just ensures all the function declarations have
the correct order for:
- abstract and final.
- visibility (public, protected, private).
- static.

So, all the lines modified by this commit are function declarations
and the only changes are in the positions of those keywords.
2024-02-28 23:47:47 +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
Huong Nguyen
3d36a37499
NOBUG: Fixed SVG browser compatibility 2024-02-23 08:37:37 +07:00
Huong Nguyen
0d8c9ed4ae
Merge branch 'MDL-78284-main' of https://github.com/sarjona/moodle 2024-02-21 09:49:41 +07:00
Luca Bösch
f4282b726e MDL-80082 mod_feedback: Output 'Nothing to display' as notification. 2024-02-19 15:10:32 +01:00
Sara Arjona
10f8e19f40
MDL-78284 mod: Replace activity icons with the new SVGs
The old monocromo.png activity icon files have been removed and
replaced with the new SVG files created by the UX team.

Special thanks to Sabina Abellán! :-)
2024-02-15 17:49:41 +01:00
Sara Arjona
5c69b393df
Merge branch 'MDL-79514' of https://github.com/paulholden/moodle 2024-02-08 15:32:00 +08:00
David Mudrák
e32bd37113 MDL-80725 lang: Fix Behat regressions related to the question rename 2024-02-01 20:02:22 +01:00
Helen Foster
ddbfeecb83 MDL-80725 lang: Import fixed English strings (en_fix) 2024-01-31 18:45:03 +01:00
Ferran Recio
f4adbc8a11 MDL-79029 behat: replace deprecated behat steps 2024-01-22 11:12:28 +01:00
Paul Holden
e02412b5ff
MDL-79514 mod_feedback: ensure base item class library is required. 2024-01-18 20:44:28 +00:00
Paul Holden
114605accc
MDL-80446 mod_feedback: stricter selector for getting draggable items.
Ensure we don't also match inner nodes of the label question.
2023-12-19 08:26:47 +00:00
Huong Nguyen
8db6218f7c Merge branch 'MDL-79512-master' of https://github.com/laurentdavid/moodle 2023-11-29 09:07:21 +07:00
Ilya Tregubov
61c53f00d2
Merge branch 'MDL-69819-master' of https://github.com/davewoloszyn/moodle 2023-11-23 10:35:07 +08:00
David Woloszyn
6547554ffa MDL-69819 mod_feedback: Param now nullable in feedback_save_tmp_values 2023-11-22 14:46:51 +11:00
David Woloszyn
78131051a1 MDL-69819 mod_feedback: Fix superfluous br tags in Excel
Co-authored-by: David Woloszyn <david.woloszyn@moodle.com>
2023-11-22 14:46:51 +11:00
Laurent David
2b2cf76577 MDL-79512 mod_feedback: Add toast dialog when saved
* Add notification to notify the user once the changes have been
successfully saved
2023-11-20 06:51:56 +01:00
Laurent David
33391e08c2 MDL-79512 mod_feedback: Fix issue with drag and drop
* A teacher can not change the order of the questions in feedback
as the order is not saved.
2023-11-20 06:51:56 +01:00
Andrew Nicols
525212f2d2
MDL-78496 core: Address phpcs issues with upgrade.php files 2023-11-19 21:20:53 +08:00