Commit Graph

5581 Commits

Author SHA1 Message Date
Philipp Memmel cd54407e40 MDL-86382 qbank_bulkmove: Fix selecting placeholder in qbank selector
@Co-authored-by: Luca Bösch <luca.boesch@bfh.ch>
2025-09-26 13:54:57 +00:00
Mihail Geshoski 5ce8b33ea8 Merge branch 'MDL-86432-500' of https://github.com/timhunt/moodle into MOODLE_500_STABLE 2025-09-25 14:12:59 +08:00
Andrew Nicols c146d00c9f MDL-86432 qtype_ordering: Fix broken data provider 2025-09-24 17:52:06 +01:00
Amaia Anabitarte 00cb0cdff3 Merge branch 'MDL-86488-500-2' of https://github.com/junpataleta/moodle into MOODLE_500_STABLE 2025-09-24 17:17:55 +02:00
Mihail Geshoski e807bf8d35 Merge branch 'MDL-86297-MOODLE_500_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_500_STABLE 2025-09-24 11:49:39 +08:00
Jun Pataleta e419d66acf MDL-86488 qbank_columnsortorder: Use action menu Behat steps 2025-09-18 19:27:36 +08:00
Mihail Geshoski e74db295a9 Merge branch 'MDL-85551_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-09-02 09:23:05 +08:00
Mihail Geshoski cd1ae95751 Merge branch 'MDL-86339-500' of https://github.com/rjnl/moodle into MOODLE_500_STABLE 2025-09-02 09:16:36 +08:00
Mihail Geshoski 8f07f08c91 Merge branch 'MDL-86362-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-09-01 23:11:22 +08:00
Mihail Geshoski b25b9a5505 Merge branch 'MDL-85018_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-09-01 22:29:02 +08:00
Philipp Memmel 6b9b6ea399 MDL-86297 core_question: Fix limit when retrieving qbank instances 2025-09-01 08:43:46 +02:00
Luca Bösch 140ec8196d MDL-86362 questions: Fix question bank table styles 2025-08-30 14:59:58 +02:00
Rajneel Totaram 46892613b0 MDL-86339 qtype_numeric: Coding style improvements 2025-08-27 16:24:39 +12:00
Rajneel Totaram facdd9c203 MDL-86339 qtype_numeric: Display units dropdown on the same line 2025-08-27 16:24:39 +12:00
Paul Holden 0182b73e82 MDL-86311 question: fixes for PHPUnit related warnings/notices.
* Correct component generator name;
* Add missing required object properties;
* Assert expected debugging messages
2025-08-19 09:16:53 +01:00
Mark Johnson ed6e1c2db9 MDL-85551 questions: Creating a default category with a questions mod
When a new module that publishes questions is created, it does not have
a default question category created until it is viewed. This means that
other parts of the system that want to use the bank while its empty
(such as bulk moving questions) cannot see it.

This adds a step to the common edit_module_post_actions() function so
that any module supporting the FEATURE_PUBLISHES_QUESTIONS feature will
have its default category created with the module instance.

This can be overridden by setting skipdefaultcategory to true
in the $moduleinfo argument to edit_post_module_actions().
2025-08-12 14:04:04 +01:00
Mark Johnson f94db1c8e8 MDL-85018 qtype_multianswer: Prevent errors on backup/restore
If a multianswer question has its question_multianswer record missing
for some reason, attempting to backup and restore a bank containing the
question will result a dml_missing_record exception.

The qtype_multianswer::get_question_options() method already copes with
the sequence from this record being empty, so we can just remove the
MUST_EXIST check and let it fall back to that.
2025-08-11 10:09:11 +01:00
Mihail Geshoski 7f9b287f42 NOBUG: Add upgrade notes 2025-08-08 10:48:06 +08:00
Sara Arjona 2b97cc0de3 NOBUG: Fixed file access permissions 2025-08-07 16:44:58 +02:00
Mihail Geshoski 3f7b1ab5b5 Merge branch 'MDL-79540_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-08-07 10:19:42 +08:00
Huong Nguyen c7399d8aaf Merge branch 'MDL-85510-500' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_500_STABLE 2025-08-06 08:30:11 +07:00
Khoa Nguyen Dang e417341fe1 MDL-85510 Questions: clearfix from MDL-84708 affects spacing
Co-authored-by: Mikel Martín Corrales <mikel@moodle.com>
2025-08-05 15:54:20 +07:00
Mihail Geshoski 1f497d91ac Merge branch 'MDL-86001-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-08-05 11:43:18 +08:00
Mihail Geshoski 42a3afdd97 Merge branch 'MDL-85565_500' of https://github.com/PhilippImhof/moodle into MOODLE_500_STABLE 2025-08-05 11:36:18 +08:00
Huong Nguyen 3b786b87c3 Merge branch 'MDL-85897-500' of https://github.com/andrewnicols/moodle into MOODLE_500_STABLE 2025-07-31 08:58:27 +07:00
Andrew Nicols bf18273a08 MDL-85897 core: Move all deprecations to emit_deprecation 2025-07-30 13:53:27 +08:00
Philipp Imhof 8c22b5537a MDL-85565 phpunit: check for <select> before <option>
Make sure that assert_select_options() will fail when the output does
not contain a <select> and therefore does not have the given options.
2025-07-25 13:13:09 +02:00
Rajneel Totaram 8c0157a7e0 MDL-85295 qtype_ordering: render feedback properly
'answertext' is already passed through format_text(), so no need to escape it in the template.
2025-07-22 11:40:26 +12:00
Mihail Geshoski 9a9adc8069 NOBUG: Add upgrade notes 2025-07-18 14:52:33 +08:00
Mihail Geshoski eac831f04f Merge branch 'MDL-84466_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-16 13:16:21 +08:00
Mark Johnson 7b45a898b0 MDL-84466 question/qbank: Update pending transfer notification
This updates the logic and text of the notification that is shown while
the question transfer task is still pending, to include instances of the
new transfer_questions task. It also ensures the notification is shown
if a user tries to access the question editing screen from outside the
question bank.
2025-07-15 12:03:25 +01:00
Mark Johnson 60f58afc5f MDL-84466 qbank: Transfer question files and tags in separate tasks
On a large site, the task to transfer question categories to the new
mod_qbanks contexts could take a very long time, as of any transferred
categories contain questions using files, each file has to be updated
individually.

This change splits up the transfer into 2 stages. The first stage
(transfer_question_categories) updates the context IDs on each question
category and moves them to their new top category, then spawns an
instance of transfer_questions for each category that was moved.
transfer_questions then handles moving the files and tags for questions
in a single category at a time. This allows the transfer process to be
parallelised by using multi cron or ad-hoc task runners, so should speed
things up on larger sites.
2025-07-15 12:03:25 +01:00
Mihail Geshoski ca2bbff2b3 Merge branch 'MDL-85754_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-15 10:31:41 +08:00
Paul Holden b64e870f28 MDL-86001 qbank_columnsortorder: populate preview data question text. 2025-07-11 15:23:41 +01:00
Mark Johnson 57553a1b19 MDL-79540 qbank_managecategories: Don't allow own child as parent
When we build the options for a question category selector, the
"nochildrenof" option isn't correctly compared to the category ID. This
means we can select a category's own children as its new parent.
2025-07-11 10:08:33 +01:00
Michael Hawkins 96b1cd1700 NOBUG: Add upgrade notes 2025-07-11 12:48:56 +08:00
Mark Johnson 3bc23527e7 MDL-85721 qtype_multianswer: Update find_duplicated_subquestions for Oracle compatibility 2025-07-10 10:28:48 +07:00
Mihail Geshoski c71ca318f5 MDL-84695 mod_qbank: Fix illegal whitespace 2025-07-10 11:08:27 +08:00
Mark Johnson dd87321d18 MDL-84695 mod_qbank: fix unit test for MS SQL server 2025-07-10 10:29:25 +08:00
Mihail Geshoski e27a882ce7 Merge branch 'MDL-85939-500' of https://github.com/paulholden/moodle into MOODLE_500_STABLE 2025-07-09 23:25:46 +08:00
Mihail Geshoski 577411727e MDL-85721 qtype_multianswer: Fix version bump 2025-07-09 11:38:03 +08:00
Mihail Geshoski 0d1f74f1e3 Merge branch 'MDL-85721_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-09 10:20:35 +08:00
Paul Holden 265f24bd4f MDL-85939 qbank_columnsortorder: improve preview page table alignment. 2025-07-08 17:58:34 +01:00
Mihail Geshoski 6e4e00b0fe Merge branch 'MDL-85069_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-08 22:28:36 +08:00
Mihail Geshoski 9416ffd303 Merge branch 'MDL-84695-500' of https://github.com/lucaboesch/moodle into MOODLE_500_STABLE 2025-07-08 22:21:25 +08:00
Mihail Geshoski c3c2b58a7f Merge branch 'MDL-85881_500_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_500_STABLE 2025-07-08 22:14:31 +08:00
Mark Johnson 563280c99a MDL-85754 question: Don't show banks where user has no permission
The Switch Banks UI was listing all question banks on the course where
the use had the managecategory permission, plus the other banks they had
used recently.

This conflicted with the check when it tried to load a selected bank,
which checked the useall/usemine permissions. This could lead to errors
if this permission had been removed.

This applies consistent checks to both lists with the useall/usermine
permissions instead.
2025-07-08 12:01:43 +01:00
Mark Johnson 84d7c6ce6d MDL-85754 question: Only use current context in question_edit_contexts
Due to the changes in question sharing, it no longer makes sense to look
at parent contexts when establishing permissions in the question bank.

Questions now belong to a single activity module, and we should be able
to inherit and override permisions at that level like we do with any
other.

In the longer term, we probably want to replace question_edit_contexts
with something simpler, but for the time being this should apply the
correct permission checks where it's used without requiring a big
refactor of existing code.
2025-07-08 12:01:42 +01:00
Luca Bösch e2e5de61da MDL-84695 mod_qbank: More precise get_qbank_ids_of_type_in_course query. 2025-07-06 12:14:37 +02:00
Mark Johnson 3094adbb91 MDL-41924 quiz: Annotate questions for backups
Find question bank entries for all questions referenced by a question
slot, and for all questions matching a question bank referenced used for
a random question, and record their IDs so they can be included in
backups.
2025-07-03 14:50:53 +01:00