5347 Commits

Author SHA1 Message Date
Sara Arjona
36b966eaf2
NOBUG: Add upgrade notes 2025-01-09 15:21:35 +01:00
Jun Pataleta
c3e4f4af89
Merge branch 'MDL-82769_main' of https://github.com/cwarwicker/moodle 2025-01-09 10:16:23 +08:00
Huong Nguyen
5253a59c5b
Merge branch 'MDL-84080_main' of https://github.com/marxjohnson/moodle 2025-01-09 09:05:12 +07:00
Mark Johnson
5478e8b4ca
MDL-84080 question: Prevent overly-long qbank names
When a question bank is created by the system, it's name may be created
by combining a course of category name with a language string. If the
course name is already near the limit for its database field, the
resulting question bank name may be too long for that field, and cause
an error.

This implements a function for generating question bank names which will
trim string parameters down until the resulting name is below the
allowed length. It also implements some validation to prevent
manually-created banks with names that are too long.
2025-01-08 09:53:50 +00:00
Huong Nguyen
252418ae23
Merge branch 'MDL-84008-main' of https://github.com/lucaboesch/moodle 2025-01-08 09:40:56 +07:00
Huong Nguyen
173e502dd4
Merge branch 'MDL-79122_main' of https://github.com/cwarwicker/moodle 2025-01-08 09:25:44 +07:00
Conn Warwicker
d647b89089
MDL-82769 question: Update legacy filters on random questions.
- Adds the "cat" field to the converted legacy filter, which was
  missing.
- Does the conversion on the editrandom.php page as this was
  throwing a warning.
2025-01-06 14:15:36 +00:00
Luca Bösch
1523da0903 MDL-84008 qtype_match: keep question and answer together. 2025-01-06 13:35:20 +01:00
Luca Bösch
d805159525 MDL-84008 qtype_calculated: glue formula, tolerance, display, feedback. 2025-01-06 13:35:20 +01:00
Luca Bösch
23437ff6bb MDL-84008 qtype_multichoice: keep choice, grade and feedback together. 2025-01-06 13:35:20 +01:00
Luca Bösch
a5d3a624e5 MDL-82895 qbank_managecategories: Correct d'n'd hover text encoding 2025-01-03 08:50:06 +01:00
Huong Nguyen
e33a3f8bee
Merge branch 'MDL-84037_main' of https://github.com/marxjohnson/moodle 2024-12-24 15:22:47 +07:00
Mark Johnson
89b061a702
MDL-84037 quiz: Fix restore of shared questions
When a quiz that used shared questions was being restored without the
qbank the questions came from, if the qbank still existed on the target
site, the restored questions were being left in a category in an invalid
course context.

This changes the process so that if the original qbank does exist and
the user can access to it, we will find any references to the restored
copies of questions from that qbank, switch them to refer back to the
original qbank, then delete the category they were restored to from the
course context.

If the user does not have access to the qbank, a new one will be created
in the target course and the questions moved there, just as if the
original qbank did not exist.
2024-12-20 12:10:29 +00:00
Jun Pataleta
ff30f04299
NOBUG: Add upgrade notes 2024-12-19 20:07:48 +08:00
Huong Nguyen
7befed22d0
Merge branch 'versionbump' of https://github.com/junpataleta/moodle 2024-12-19 10:03:51 +07:00
Jun Pataleta
1ff50ac088
NOBUG: Bump versions for main to the current date 2024-12-18 23:53:12 +08:00
Huong Nguyen
b3aa2e1743
Merge branch 'MDL-83977_main' of https://github.com/marxjohnson/moodle 2024-12-18 09:09:40 +07:00
Mark Johnson
131803e8cf
MDL-83977 qbank: Fix migration issues for unused questions.
Previously, question categories which contained only questions with no
usages were deleted during migration to mod_qbank.

Also, contexts that contained no questions once unsused questions were
deleted were still migrated to a mod_qbank instance, which was empty.

The intention is that hidden questions with no usages should be deleted,
then any categories which are now empty should be deleted rather than
migrated. If there are no categories that contain questions left in a
context, creation of a mod_qbank to migrate those categories is not
necessary.

The unit tests did not cover the cases of categories containing only
non-hidden questions without usages, of categories containing only
unused questions with multiple hidden versions, or of empty categories
with children that were not empty.

This change now specifically checks whether a category or is children
are empty before deleting the category, rather than checking question
usage, since stale questions (hidden questions with no usage) are
already deleted before this point. It also expands the unit tests to
cover the above cases.
2024-12-17 15:44:03 +00:00
Sara Arjona
ba98c82406
Merge branch 'MDL-81952-main' of https://github.com/srobotta/moodle 2024-12-17 13:01:44 +01:00
Huong Nguyen
eb2be9fede
Merge branch 'MDL-77713' of https://github.com/cwarwicker/moodle 2024-12-17 09:11:56 +07:00
Huong Nguyen
fe5ce6d717
Merge branch 'MDL-83860_main' of https://github.com/marxjohnson/moodle 2024-12-17 09:06:57 +07:00
hieuvu
5dbded532a
MDL-82273 core_question: Fix behat failed 2024-12-16 18:48:38 +01:00
Mark Johnson
c87cffac88
MDL-83860 qbank_viewquestionname: Add question name filter condition 2024-12-16 11:07:21 +00:00
Huong Nguyen
5800e83c46
Merge branch 'MDL-79268-master' of https://github.com/danghieu1407/moodle 2024-12-16 10:55:03 +07:00
Huong Nguyen
3cbad54d6a
Merge branch 'MDL-83859_main' of https://github.com/marxjohnson/moodle 2024-12-16 10:46:52 +07:00
Huong Nguyen
adb94bf614
Merge branch 'MDL-83883_main' of https://github.com/marxjohnson/moodle 2024-12-16 10:24:44 +07:00
Huong Nguyen
ebc3b82b48
Merge branch 'MDL-82273-master' of https://github.com/NashTechOpenUniversity/moodle 2024-12-16 10:01:51 +07:00
Stephan Robotta
49a9803144 MDL-81952 questions: Fix warning in export of multitype 2024-12-14 13:16:19 +01:00
Conn Warwicker
d9d2388965
MDL-79122 question: Correct capability check for question comments link.
This makes the rendering of the question comments count additionally
check the core moodle/comment:post capability, since this capability
is required to make comments. Previously, this was not being checked
so users could open the modal to make a comment, which was causing
a javascript error due to expected elements being missing.
2024-12-13 15:31:47 +00:00
hieuvu
5e952377aa MDL-82273 core_question: get correct category for question bank view 2024-12-13 14:07:49 +07:00
danghieu1407
4eaefa2a0f MDL-79268 questions: Show version numbers in delete confirmation 2024-12-13 13:35:04 +07:00
Jun Pataleta
4929d6c3d1
Merge branch 'MDL-81520-main' of https://github.com/andrewnicols/moodle 2024-12-11 13:41:15 +08:00
Andrew Nicols
c2414e5a45
MDL-81520 core: Fix test finality 2024-12-11 12:30:23 +08:00
Huong Nguyen
7e497dedc4
Merge branch 'MDL-81825-main' of https://github.com/roland04/moodle 2024-12-11 09:52:51 +07:00
Mikel Martín
f9abc562f5 MDL-81825 theme_boost: Refactor .sr-only usages for BS5
- Add .visually-hidden to the Boostratp 5 bridge SCSS file
- Replace .sr-only occurrences with .visually-hidden
- Replace .dropzone-sr-only-focusable  with .dropzone-visually-hidden-focusable
  for consistency
2024-12-10 14:02:32 +01:00
Huong Nguyen
5988b6c49b
Merge branch 'MDL-82886-main' of https://github.com/lucaboesch/moodle 2024-12-10 09:34:03 +07:00
Huong Nguyen
448d08d48e
Merge branch 'MDL-83013-main' of https://github.com/lucaboesch/moodle 2024-12-10 09:29:08 +07:00
Huong Nguyen
158649ff5f
Merge branch 'MDL-83920-main' of https://github.com/lucaboesch/moodle 2024-12-10 09:22:42 +07:00
Mark Johnson
bfb057001b
MDL-83883 qbank_editquestion: Add status filter condition
This allows users to filter questions based on whether a question is in
"draft" or "ready" status.
2024-12-09 11:12:21 +00:00
Conn Warwicker
c5633888e2
MDL-81115 question: Question bank tag filter to use all available tags.
This makes the tags which are available to the user on the question
bank tag filter, use tags from all available contexts, not just
that course. This means they can filter by tags assigned to system
questions as well, for example.
2024-12-06 14:16:09 +00:00
Luca Bösch
7fbf8140a6 MDL-83920 core_question: Error when trying exporting 0 questions. 2024-12-06 08:36:12 +01:00
Luca Bösch
3c3b4b5573 MDL-83013 core_question: put "Delete" action last in menu. 2024-12-05 18:35:24 +01:00
Luca Bösch
c7feeb94be MDL-82886 qbank_managecategories: put "Delete" action last in menu. 2024-12-05 18:35:23 +01:00
Huong Nguyen
49c975b918
NOBUG: Add upgrade notes 2024-12-05 22:32:26 +07:00
Mark Johnson
e46a0c33ac
MDL-83859 qbank_viewquestiontype: Add type filter
This adds a new question bank filter for filtering by question type. The
filter can be applied with one or multiple question types, and can
either include or exclude the selected types.
2024-12-05 11:30:32 +00:00
Mark Johnson
1613a98102
MDL-83859 core_question: Update filter condition API
This corrects some definitions of the methods in the base condition
class to make things more obvious to developers implementing new
filters.

Previously if your filter wanted to use the default
`core/datafilter/filtertype` class, you still had to implement
`get_filter_class` to return `null`, since it was declared as abstract.
This change defines it as returning `null` by default, so this is no
longer necessary.

Also, this removes the default definitions for `get_condition_key` and
`build_query_from_functions`, and declares them abstract. Currently it
is necessary to override these to implement a functional filter so it
doesn't make sense to have a useless default definition.

This will not cause any breakages with existing filters. All filters
must already be defining the methods that are now abstract, otherwise
they will not function. Any filter that is now overriding
`get_filter_class` to return `null` will continue to work as before,
even though this is no longer necessary.
2024-12-05 11:30:32 +00:00
Conn Warwicker
3f36e1ca6a
MDL-77713 question: List question versions with most recent on top.
This makes the display of question versions consistent between
question preview and when users are building quizzes.
2024-12-05 11:17:06 +00:00
Huong Nguyen
488da643c6
Merge branch 'MDL-83606-master' of https://github.com/NashTechOpenUniversity/moodle 2024-12-05 12:09:24 +07:00
Jun Pataleta
e9cded4559
Merge branch 'MDL-83727-master' of https://github.com/NashTechOpenUniversity/moodle 2024-12-05 12:35:52 +08:00
Simey Lameze
80a26532bb MDL-82946 behat: use existing questions to validate bulk delete
This commit also changes the question names to something more logical
2024-12-05 08:27:23 +08:00