Commit graph

5242 commits

Author SHA1 Message Date
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
Paul Holden
d0cab9a4a0
MDL-79256 customfield: add new valuetrust to data table schema. 2024-01-23 08:18:58 +00:00
Mikel Martín
a198884333 MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5 2024-01-23 08:27:23 +01:00
Ilya Tregubov
1fdd34a08f MDL-67335 qtype_calculatedmulti: Fix upgrade query. 2024-01-17 17:22:30 +08:00
Jun Pataleta
06146da7cb
Merge branch 'MDL-80005-main-squashed' of https://github.com/andrewnicols/moodle 2024-01-17 16:52:33 +08:00
Philipp Imhof
cf62f5cc76
MDL-67335 qtype_calculatedmulti: allow HTML in answer options 2024-01-17 08:03:14 +01:00
Andrew Nicols
b05fc42db9
MDL-80005 core: Emit deprecation notices for params
Most params are formally deprecated here. This was originally planned
for MDL-80042, but I realised that having an emit, and final param is a
very useful option going forward.

This patch also moves the is_deprecated(), and related methods to the
\core\deprecated attribute.
2024-01-17 12:19:45 +08:00
Jun Pataleta
c67b184f4c
Merge branch 'MDL-79780' of https://github.com/timhunt/moodle 2024-01-11 10:44:41 +08:00
Paul Holden
b98fd96084
MDL-71733 behat: final removal of deprecated 400 step definitions. 2024-01-04 12:43:52 +00:00
Tim Hunt
9ee42d0a34 MDL-79780 quiz_statistics: take advantage of get_fieldset method
This updates the MDL-79639 code.
2023-12-22 12:09:42 +00:00
Ilya Tregubov
b642d2710b MDL-79708 question_bank: Fix legacy filter condition.
build_query_from_filter method expects includesubcategories
to be inside filteroptions array
2023-12-11 11:27:21 +08:00
Huong Nguyen
e1d02270eb Merge branch 'MDL-77136-main' of https://github.com/lucaboesch/moodle 2023-12-07 08:36:27 +07:00
Jun Pataleta
a6ee7e7396
Merge branch 'MDL-80127' of https://github.com/timhunt/moodle 2023-12-06 22:12:25 +08:00
Jun Pataleta
030def7a46
Merge branch 'MDL-80079-master' of https://github.com/andrewnicols/moodle 2023-12-06 21:59:47 +08:00
Luca Bösch
9c2c8c63de MDL-77136 qtype_randomsamatch: Newest versions for shortanswer questions 2023-12-06 14:02:14 +01:00
Luca Bösch
b53ab7e800 MDL-77136 core_question: Newest versions get_questions_from_categories 2023-12-06 14:02:14 +01:00
Jun Pataleta
04bc690557
Merge branch 'MDL-80221-main-enfix' of https://github.com/mudrd8mz/moodle 2023-12-04 16:12:07 +08:00
Ilya Tregubov
37737a92d6 Merge branch 'MDL-79890-master' of https://github.com/andrewnicols/moodle 2023-11-30 10:44:35 +08:00
Pascal Hamar
38ac75d674 MDL-36733 qtype_calculated: Wildcards in calculated question hints
The placeholders for the hints are properly replaced by this change and any formulas present are replaced.

The validation is performed by the existing function qtype_calculated_find_formula_errors(),
which is called by the calculate() function,
which in turn is called by the variable substituter "vs" using the replace_expressions_in_text() function.

vs -> replace_expressions_in_text() -> calculate() -> qtype_calculated_find_formula_errors().
2023-11-28 19:02:27 +01:00
Helen Foster
de4f02d809 MDL-80221 lang: Import fixed English strings (en_fix) 2023-11-22 22:48:47 +01:00
Andrew Nicols
525212f2d2
MDL-78496 core: Address phpcs issues with upgrade.php files 2023-11-19 21:20:53 +08:00
Andrew Nicols
545b36cd4a
MDL-78496 upgrade: remove all the < 4.1.0 upgrade steps
Also includes an upgrade step to prevent upgrading from any
version < 2021112802 (v4.1.0) as anti-cheating measure.
2023-11-17 23:25:36 +08:00
Tim Hunt
0336443db6 MDL-80127 question engine: prevent fatal errors from old bad data 2023-11-15 16:34:35 +00:00
Tim Hunt
64bac5f4cc MDL-80127 question engine: don't convert null to '' before storing 2023-11-15 16:34:35 +00:00
Andrew Nicols
75587e23c6
MDL-79890 core: Update uses of array_keys with multiple params
These now call the newly minted `moodle_array_keys_filter` method.
2023-11-15 09:14:40 +08:00
Andrew Nicols
dab4a2b66f
MDL-80079 core: Correct incorrect arg to format_string::$options 2023-11-14 22:28:55 +08:00
Mikel Martín
2ea44fb45e
MDL-79629 core_question: Improve autocomplete categories UI 2023-11-02 14:50:10 +00:00
Mark Johnson
58c0f91375 MDL-79639 quiz_statistics: Prevent database deadlocks
This changes the cache purge code to select IDs for deletion
first, rather than using a subquery in a DELETE, since this
risks causing a deadlock in MySQL.
2023-10-19 08:59:07 +01:00
Paul Holden
9117e62a4d
Merge branch 'MDL-79642-q_tags_off' of https://github.com/leonstr/moodle 2023-10-10 21:18:53 +01:00
Sara Arjona
7b83434dbf
Merge branch 'MDL-79626-master' of https://github.com/junpataleta/moodle 2023-10-10 15:13:02 +02:00
Leon Stringer
35c7163184 MDL-79642 qbank_tagquestion: Fix Return type err
Previously if $CFG->usetags was not enabled the course question bank
page would show:

  Exception - qbank_tagquestion\plugin_feature::get_question_filters():
  Return value must be of type array, none returned

This is now fixed.
2023-10-10 12:14:34 +01:00