5210 Commits

Author SHA1 Message Date
Huong Nguyen
1320a2a397
Merge branch 'main_MDL-81172' of https://github.com/mattporritt/moodle 2024-03-28 11:46:51 +07:00
Jun Pataleta
556347c4f1
Merge branch 'MDL-81266' of https://github.com/stronk7/moodle 2024-03-26 10:34:47 +08: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
Andrew Nicols
430c63b39e
MDL-80300 mod_quiz: Integration coding fixups 2024-03-25 15:07:16 +08:00
Andrew Nicols
8bd1242d78
Merge branch 'mdl-80300-main-refactor' of https://github.com/matthewhilton/moodle 2024-03-25 15:06:50 +08:00
Ilya Tregubov
9f10899178 Merge branch 'MDL-80099_main' of https://github.com/marxjohnson/moodle 2024-03-22 11:07:55 +08:00
Paul Holden
011619dbd3
MDL-71734 lang: final removal of deprecated 400 strings. 2024-03-21 09:44:15 +00:00
Mark Johnson
ee952d6556
MDL-80099 quiz: Add attempt_state_changed hook
This creates a new hook which is dispatched when a quiz attempt is set
to a new state, or deleted. This is then used by quiz_statistics to
trigger a recalulation, replacing the old event observer (for
submissions) and class callback (for deletions).
2024-03-20 14:58:17 +00:00
Mark Johnson
9a2f82a709
MDL-80099 quiz: Replace quiz_structure_modified callback with hook
This adds a new structure_modified hook to mod_quiz, deprecating the
quiz_stucture_modified class callback used in
recompute_quiz_sumgrades(). The callback will be removed in Moodle 4.8.

The quiz_statsitics plugin which used this callback now defines a hook
callback instead.
2024-03-20 14:58:16 +00: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
Matthew Hilton
3a1ea0c945
MDL-80300 mod_quiz: Updated override edit form validation 2024-03-15 08:18:56 +10:00
Matthew Hilton
68dcb5d736
MDL-80300 mod_quiz: Add quiz override webservices 2024-03-15 08:18:56 +10:00
Matthew Hilton
2c6a746578
MDL-80300 mod_quiz: Add override manager class 2024-03-15 08:18:56 +10:00
Simey Lameze
f0dbf61e47 MDL-80479 behat: improve new test for quiz timer 2024-03-14 10:17:09 +08:00
Angelia Dela Cruz
955d8693bf MDL-80479 mod_quiz: Behat to set quiz opening and closing time 2024-03-14 10:15:47 +08:00
Andrew Nicols
9cdc5850c5
Merge branch 'MDL-75952' of https://github.com/stronk7/moodle 2024-03-12 10:45:02 +08:00
Mathew May
886d86623e MDL-72438 question: Final deprecations 2024-03-11 13:26:18 +08: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
Huong Nguyen
57610d2bd9
MDL-78547 quiz: Remove unnecessary call to clear_regrade_date_cache()
This method is designed to clear the values but these values are never set anywhere
It's safe to remove it out of the test now
2024-03-08 12:38:30 +07:00
Huong Nguyen
7701e6a079 Merge branch 'MDL-78547' of https://github.com/timhunt/moodle 2024-03-08 08:51:57 +07:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
Tim Hunt
e008a85689 MDL-78547 quiz: fix how deprecated add random calls structure 2024-03-07 16:14:47 +00:00
Tim Hunt
3020d180d8 MDL-78547 quiz: in a preview, if a question has been edited, update it
As part of implementing this, there is a new more efficient method
get_version_information_for_questions_in_attempt to see if any
questions in a quiz need to be updated. The regrade code was updated
to take advantage of this.

Co-authored-by: Khoa Nguyen Dang <khoanguyend7@nashtechglobal.com>
2024-03-07 16:14:47 +00:00
Tim Hunt
76bcbc5ddb MDL-80900 quiz: refine attempt summary
* Move State to above all the times, rather than in the middle.
* Changed 'Completed on' to 'Completed' and 'Submitted on' to 'Submitted'.
2024-03-06 13:50:43 +08:00
Ilya Tregubov
8e99589f77 Merge branch 'MDL-80880' of https://github.com/timhunt/moodle 2024-03-06 13:16:42 +08:00
Angelia Dela Cruz
6e6caf1fe7 MDL-79278 mod_quiz: Teacher can set how quiz questions behave behat
Co-authored-by: Simey Lameze <simey@moodle.com>
2024-03-06 09:40:02 +08:00
Tim Hunt
a57d88b383 MDL-80880 quiz: change display of previous attempts summary
Rather than a table (neither reponsive nor very accesible) we now
represent a student's previous attempts with cards. The content
of the cards is now the same table as at the top of the review
attempt page.
2024-03-05 12:02:11 +00:00
Tim Hunt
8feeacc425 MDL-80880 quiz: summary of an attempt output changed to a templateable
The new class is attempt_summary_information. Switching to using this
has required some rendere methods to be changed. See upgrade.txt.
2024-03-05 12:02:11 +00:00
Sara Arjona
e1034deb8b
Merge branch 'MDL-75670-main' of https://github.com/roland04/moodle 2024-03-04 16:05:18 +01:00
Mikel Martín
d0d62fd06c MDL-75670 theme: Refactor form-inline helper class dropped in BS5
- Replace .form-inline Bootstrap helper class with .d-flex.flex-wrap.align-items-center
- Refactor .form-inline occurrences in SCSS files or remove when unneeded
2024-02-29 13:56:46 +01:00
Andrew Nicols
d9c6bca91f
Merge branch 'MDL-81042-main' of https://github.com/micaherne/moodle 2024-02-29 09:21:22 +08: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
Sara Arjona
0da6228503
Merge branch 'MDL-80834' of https://github.com/timhunt/moodle 2024-02-28 16:34:34 +01:00
Sara Arjona
b33ba0b9fb
Merge branch 'MDL-78967-main' of https://github.com/kevpercy/moodle 2024-02-27 12:49:06 +01:00
Huong Nguyen
e4bfa1498b
Merge branch 'MDL-67259_main' of https://github.com/PhilippImhof/moodle 2024-02-26 14:44:32 +07:00
Michael Aherne
06fe259a6a MDL-81042 quiz: Typo in renamed class. 2024-02-24 21:52:32 +00:00
Neill Magill
6ff5e7aabd MDL-77965 unit tests: Add covers annotation 2024-02-23 09:32:07 +00:00
Neill Magill
79150cf9bb MDL-77965 quiz: Improve efficiency of the data export
Before this change the query used an index scan to perform the
export, this could be really expensive on the database.

After the change the the query will use far more efficient joins,
on a large MySQL instance this can take minutes off of the query
time.

In additon the query was returning two columns that are not used
in the function. The layout column was causing the UNION to fail
on Oracle as it cannot compare text columns, removing these
columns from the returned data should further increase
performance further.
2024-02-23 09:32:07 +00:00
Philipp Imhof
7b284a8e04
MDL-67259 mod_quiz: show time of last autosave 2024-02-23 09:00:51 +01:00
Huong Nguyen
3d36a37499
NOBUG: Fixed SVG browser compatibility 2024-02-23 08:37:37 +07:00
Huong Nguyen
939d1c5050
Merge branch 'MDL-62404' of https://github.com/timhunt/moodle 2024-02-22 10:49:38 +07:00
Kevin Percy
a72a810479 MDL-78967 core_grades: Removed advanced grade item and category options 2024-02-21 13:45:21 +08:00
Huong Nguyen
0d8c9ed4ae
Merge branch 'MDL-78284-main' of https://github.com/sarjona/moodle 2024-02-21 09:49:41 +07:00
Jun Pataleta
457274ab03
Merge branch 'MDL-79003-main' of https://github.com/andrewnicols/moodle 2024-02-21 10:36:21 +08:00
Luca Bösch
307aee2c42 MDL-80082 quiz_grading: 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
lihidor
78c1a0a3e5 MDL-62404 mod_quiz: Delete previews after repaginate 2024-02-15 10:59:23 +00:00
Sara Arjona
cd655be112
Merge branch 'MDL-79321-master' of https://github.com/andelacruz/moodle 2024-02-14 09:35:22 +01:00
Angelia Dela Cruz
8754dc0724 MDL-79321 mod_quiz: Behat to set quiz as interactive with multiple tries 2024-02-13 16:22:16 +08:00
Jun Pataleta
c9c65a1b95
Merge branch 'MDL-80402-main' of https://github.com/andelacruz/moodle 2024-02-13 15:52:16 +08:00