4922 Commits

Author SHA1 Message Date
Gordon Bateson
6e42736fde MDL-79863 qtype_ordering: Moodle.2x qtype/ordering add print_question_formulation_and_controls method required to display ordering questions in Moodle 2.0 2024-04-04 10:59:15 +08:00
Gordon Bateson
679067c9b3 MDL-79863 qtype_ordering: Moodle.2x qtype/ordering add print_question_formulation_and_controls method required to display ordering questions in Moodle 2.0 2024-04-04 10:59:15 +08:00
Gordon Bateson
cd7f80ef5c MDL-79863 qtype_ordering: Moodle.2x qtype/ordering use standard message to report DB insert/update errors 2024-04-04 10:59:15 +08:00
Gordon Bateson
3a109f946a MDL-79863 qtype_ordering: Moodle.2x qtype/ordering use standard message to report DB insert/update errors 2024-04-04 10:59:14 +08:00
Gordon Bateson
78afb838c6 MDL-79863 qtype_ordering: Moodle.2x qtype/ordering fix any badly formed ordering questions that were added by earlier versions of GIFT/XML import 2024-04-04 10:59:14 +08:00
Gordon Bateson
11492ba8c1 MDL-79863 qtype_ordering: Moodle.2x qtype/ordering fix error 'logical cannot be NULL' when importing from GIFT file 2024-04-04 10:59:14 +08:00
Gordon Bateson
ea499c3fef MDL-79863 qtype_ordering: Moodle.2x qtype/ordering add import/export GIFT/XML 2024-04-04 10:59:14 +08:00
Gordon Bateson
234b65450f MDL-79863 qtype_ordering: Moodle.2x qtype/ordering increment version number to be instep with Reader module 2024-04-04 10:59:14 +08:00
Gordon Bateson
b1e158e0b5 MDL-79863 qtype_ordering: Moodle.2x question/type/ordering remove debug statements which caused scoring of ordering questions to be lower than it should be 2024-04-04 10:59:14 +08:00
Gordon Bateson
20084542b5 MDL-79863 qtype_ordering: Moodle.2x question/type/ordering use md5 instead of fraction field as id in ordering questions 2024-04-04 10:59:14 +08:00
Gordon Bateson
05a43d9094 MDL-79863 qtype_ordering: Moodle.2x question/type/ordering use md5 instead of fraction field as id in ordering questions 2024-04-04 10:59:13 +08:00
Gordon Bateson
2da308c7dd MDL-79863 qtype_ordering: Moodle.2x question/type/ordering add first attempt at backup/restore 2024-04-04 10:59:13 +08:00
Gordon Bateson
abda90ead2 MDL-79863 qtype_ordering: Moodle.2x question/type/ordering add first attempt at backup/restore 2024-04-04 10:59:13 +08:00
Gordon Bateson
f91c9dba56 MDL-79863 qtype_ordering: Moodle.2x question/type/ordering tidy up and optimze javascript 2024-04-04 10:59:13 +08:00
Gordon Bateson
6b8ad4714e MDL-79863 qtype_ordering: Moodle.2x question/type/ordering tidy up and optimze javascript 2024-04-04 10:59:13 +08:00
Gordon Bateson
70fd1e4bc8 MDL-79863 qtype_ordering: populate GIT repository 2024-04-04 10:59:13 +08:00
Gordon Bateson
b8d5e936e6 MDL-79863 qtype_ordering: Initial commit 2024-04-04 10:59:12 +08:00
Huong Nguyen
1320a2a397
Merge branch 'main_MDL-81172' of https://github.com/mattporritt/moodle 2024-03-28 11:46:51 +07:00
Julien Boulen
735013c790 MDL-76317 questions: fix return and error message during import process 2024-03-27 13:13:21 +01:00
Julien Boulen
1ed6318d13 MDL-76317 questions: improve error message when importing invalid grades 2024-03-27 13:13:21 +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
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
Andrew Nicols
9e09693da3
Merge branch 'MDL-81039' of https://github.com/timhunt/moodle 2024-03-12 11:00:12 +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
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
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
05da465b7c MDL-78547 questions: a way to replace a attempt in a usage
... without keeping the old attempt

Co-authored-by: Khoa Nguyen Dang <khoanguyend7@nashtechglobal.com>
2024-03-07 16:14:47 +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
Mikel Martín
4ce883ae21 MDL-75670 theme: Refactor form-group helper class dropped in BS5
- Replace .form-group Boostrap helper class with .mb-3. The .form-group class was only
adding margin bottom styles, so it is an straightforward change.
- Replace .form-group references in SCSS files with .fitem now .form-group has been removed.
- There were some other .form-group occurrences in the code that were using it not for styling
but incorrectly for managing some logic. These have been also replaced with .fitem or removed.
2024-02-29 13:55:37 +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
Matthias Opitz
2dce0b3b9f MDL-52891 calculatedsimple question: forcing new gen. values into form
* forcing new generated sets of wildcard values into the question edit form so they can be saved.
* added Behat test to check new generated values are used.
2024-02-27 11:18:18 +00:00
Tim Hunt
02de9a1e3e MDL-81039 qtype_multichoice: better way to control feedback display 2024-02-23 22:36:06 +00:00
Tim Hunt
e73888a107 MDL-81039 question: Improve some comments in question_display_options 2024-02-23 22:36:06 +00:00
Sara Arjona
3bfec9398a
Merge branch 'mdl-79151-master' of https://github.com/Fragonite/moodle 2024-02-21 17:36:12 +01:00
Jun Pataleta
457274ab03
Merge branch 'MDL-79003-main' of https://github.com/andrewnicols/moodle 2024-02-21 10:36:21 +08:00
Huong Nguyen
e8d5dc93e0
MDL-76024 qtype calculated: Fix deprecation related to dynamic property 2024-02-20 16:38:49 +07:00
Alexander Van der Bellen
0aea55c3e6 MDL-79151 backup: Add custom field backup and restore API 2024-02-20 15:28:28 +08:00
Matthias Opitz
1c96f28569 MDL-76024 calculated questions: improving coding style 2024-02-16 10:20:48 +00:00
Matthias Opitz
97e3b9d657 MDL-76024 calculated questions: cast float type before comparison
* added calculated question for multiplication to tests/helper.php.
* added test_grading_of_negative_responses() test to question/type/calculated/tests/question_test.php
2024-02-16 10:20:48 +00:00
Andrew Nicols
74e0266abe
Merge branch 'MDL-36733-master' of https://github.com/PascalHamar/moodle 2024-02-08 15:32:28 +08:00
Ilya Tregubov
219510b7d9 Merge branch 'MDL-79527' of https://github.com/timhunt/moodle 2024-02-07 09:26:46 +08:00
Tim Hunt
049bff63bc MDL-79527 questions: category tree loading handling bad data
It should always be the case that a question category and its parent
category belong to the same context. However, over the years, we have
observed that this becomes violated by some data in some Moodle sites.
(The suspicion is that this is a backup/restor bug of some sort which
has never been tracked down.)

Since this happens, we should make the code robust to it, which is what
this change does. It ensure that when loading child categories, we only
consider ones in the same context.
2024-02-02 11:26:57 +00:00
Tim Hunt
cefcedebcb MDL-80537 question bank: escape plain text display of question text 2024-02-01 16:15:04 +00:00
Andrew Nicols
f457725b3a
MDL-79003 js: Use our own jsdoc wrapper
grunt-jsdoc is abandoned and only works with an older version of jsdoc.

This is a very simple wrapper around jsdoc itself.

This commit also includes a fix for broken docs.
2024-01-30 12:19:51 +08:00
Sara Arjona
8b36abdb9d
Merge branch 'MDL-80259-main' of https://github.com/roland04/moodle 2024-01-24 09:16:12 +01:00