Moodle - the world's open source learning platform https://moodle.org/
Find a file
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
.github MDL-83470 gha: Bump min PHP version to 8.2 for web installer workflow 2024-11-28 14:01:00 +07:00
.grunt MDL-83298 core: Trim trailing whitespace on upgrade notes 2024-09-27 20:05:58 +08:00
.phpstorm.meta.php MDL-82668 core: Move phpstorm meta to di.php 2024-08-14 16:32:23 +08:00
.upgradenotes Merge branch 'MDL-83641' of https://github.com/paulholden/moodle 2024-12-05 11:29:03 +07:00
admin NOBUG: Add upgrade notes 2024-12-05 22:32:26 +07:00
ai Merge branch 'MDL-83396-main' of https://github.com/davewoloszyn/moodle 2024-12-05 11:54:48 +07:00
analytics Merge branch 'MDL-83529-main' of https://github.com/sammarshallou/moodle 2024-11-22 10:50:48 +07:00
auth MDL-83470 core: Remove upgrade steps from 4.1 2024-11-27 10:27:09 +08:00
availability Merge branch 'MDL-83670-main' of https://github.com/sammarshallou/moodle 2024-12-02 10:30:33 +07:00
backup Merge branch 'MDL-71378_main' of https://github.com/SimonasAdams/moodle 2024-11-25 18:21:18 +11:00
badges MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
blocks Merge branch 'MDL-81821-main' of https://github.com/roland04/moodle 2024-11-28 13:23:54 +08:00
blog MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
cache MDL-83823 lang: Import fixed English strings (en_fix) 2024-12-02 21:25:01 +01:00
calendar MDL-83412 core: Coding style fixes 2024-11-28 11:54:31 +08:00
cohort MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
comment MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
communication MDL-82989 communication_matrix: Apply helper to mock http_client 2024-10-27 15:56:22 +07:00
competency Merge branch 'MDL-76889' of https://github.com/paulholden/moodle 2024-08-22 16:16:15 +02:00
completion MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
contentbank MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
course MDL-80303 theme_boost: Clean and reorder course SCSS 2024-12-03 10:57:29 +01:00
customfield Merge branch 'MDL-83776' of https://github.com/paulholden/moodle 2024-11-28 13:23:55 +08:00
dataformat MDL-83309 versions: Bump all versions and requires near release 2024-10-02 17:04:53 +08:00
enrol MDL-83823 lang: Import fixed English strings (en_fix) 2024-12-02 21:25:01 +01:00
error MDL-81821 theme_boost: Refactor font utility classes for BS5 2024-11-26 15:17:30 +01:00
favourites MDL-81634 core: Fix all implicitly defined nullables 2024-08-02 14:11:12 +08:00
files MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
filter MDL-83470 core: Remove upgrade steps from 4.1 2024-11-27 10:27:09 +08:00
grade Merge branch 'MDL-81821-main' of https://github.com/roland04/moodle 2024-11-28 13:23:54 +08:00
group MDL-81821 theme_boost: Refactor font utility classes for BS5 2024-11-26 15:17:30 +01:00
h5p MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
install Automatically generated installer lang files 2024-10-29 00:07:57 +00:00
iplookup MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
lang MDL-82379 core_user: Move email change token to user private access key 2024-12-05 13:37:56 +08:00
lib NOBUG: Add upgrade notes 2024-12-05 22:32:26 +07:00
local MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
login MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
media MDL-83470 core: Remove upgrade steps from 4.1 2024-11-27 10:27:09 +08:00
message Merge branch 'MDL-81821-main' of https://github.com/roland04/moodle 2024-11-28 13:23:54 +08:00
mnet MDL-83309 versions: Bump all versions and requires near release 2024-10-02 17:04:53 +08:00
mod MDL-83977 qbank: Fix migration issues for unused questions. 2024-12-17 15:44:03 +00:00
moodlenet MDL-75502 core: Added MoodleNet share progress page 2023-09-12 15:14:39 +10:00
my MDL-82500 my: Move CTA from the menu to buttons 2024-08-29 16:14:41 +02:00
notes MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
payment MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
pix NOBUG: Fixed SVG browser compatibility 2024-10-04 21:02:58 +07:00
plagiarism MDL-71326 plagiarism: Final deprecation of plagiarism functions 2024-08-21 23:25:25 +02:00
portfolio MDL-83470 core: Remove upgrade steps from 4.1 2024-11-27 10:27:09 +08:00
privacy MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
question MDL-83977 qbank: Fix migration issues for unused questions. 2024-12-17 15:44:03 +00:00
rating MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
report Merge branch 'MDL-83710' of https://github.com/paulholden/moodle 2024-12-05 09:55:03 +08:00
reportbuilder NOBUG: Add upgrade notes 2024-12-05 22:32:26 +07:00
repository MDL-83470 core: Remove upgrade steps from 4.1 2024-11-27 10:27:09 +08:00
rss MDL-81523 phpunit: Add all missing setUp/tearDown parent calls 2024-06-14 16:04:57 +02:00
search Merge branch 'MDL-83470-main' of https://github.com/junpataleta/moodle 2024-11-28 13:23:53 +08:00
sms MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
tag MDL-82963 Tag: Improve validation for users tagged with sepecified tag 2024-12-05 11:01:56 +08:00
theme Merge branch 'MDL-80303-main' of https://github.com/roland04/moodle 2024-12-03 15:55:50 +01:00
user MDL-82379 core_user: Move email change token to user private access key 2024-12-05 13:37:56 +08:00
userpix
webservice MDL-81521 core: Update all possibly data providers to be static 2024-11-15 12:50:55 +08:00
.eslintrc MDL-74301 eslint: Enable 'reportUnusedDisableDirectives' eslint setting 2023-07-03 15:21:53 +01:00
.gherkin-lintrc
.gitattributes
.gitignore MDL-82668 core: Move phpstorm meta to di.php 2024-08-14 16:32:23 +08:00
.jshintignore
.jshintrc
.nvmrc MDL-79003 core: Bump NodeJS to lts/iron (NodeJS 20) 2024-01-30 12:19:39 +08:00
.shifter.json
.stylelintrc MDL-79003 js: Bump stylelint and components 2024-01-30 12:19:53 +08:00
behat.yml.dist MDL-78934 behat: Move to BrowserKit in extension and other custom code 2023-08-18 13:59:17 +02:00
brokenfile.php
composer.json MDL-83470 composer: Require behat/gherkin 4.9.0 for now 2024-11-29 10:39:12 +07:00
composer.lock MDL-83470 composer: Require behat/gherkin 4.9.0 for now 2024-11-29 10:39:12 +07:00
config-dist.php Merge branch 'MDL-71378_main' of https://github.com/SimonasAdams/moodle 2024-11-25 18:21:18 +11:00
CONTRIBUTING.md MDL-80577 core: Update and rewrite contribution guidelines 2024-01-15 22:47:44 +08:00
COPYING.txt
draftfile.php MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
editmode.php MDL-78934 behat: Replace all the rest of goutte by browserkit 2023-08-18 13:59:17 +02:00
file.php MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Gruntfile.js MDL-76802 core: Create a grunt task to get upgradable libs 2023-03-13 11:53:23 +01:00
help.php
help_ajax.php
index.php MDL-82349 courseformat: add reactivity to frontpage topic 2024-11-12 12:02:16 +01:00
install.php MDL-83852 core: Fix web install fatal error 2024-12-03 13:07:32 +11:00
INSTALL.txt
npm-shrinkwrap.json MDL-81125 core: Add tooling to generate developer upgrade notes 2024-05-20 22:26:44 +08:00
package.json MDL-81125 core: Add tooling to generate developer upgrade notes 2024-05-20 22:26:44 +08:00
phpcs.xml.dist MDL-83470 core: Bump version in phpcs.xml.dist 2024-11-22 23:48:22 +08:00
phpunit.xml.dist MDL-81924 core_sms: Add SMS gateway management UI 2024-09-23 10:53:30 +07:00
pluginfile.php
r.php MDL-82158 core: Remove uses of cache/lib.php 2024-08-20 15:47:14 +08:00
README.md MDL-80577 core: Rewrite and update README 2024-01-15 22:47:44 +08:00
security.txt MDL-81278 core: Update security.txt expiry 2024-09-16 14:48:50 +08:00
tokenpluginfile.php MDL-77054 files: Allow CORS in tokenpluginfile.php 2023-11-30 12:22:26 +01:00
TRADEMARK.txt MDL-77376 Licensing: Update trademark.txt 2023-02-23 15:35:25 +11:00
UPGRADING.md NOBUG: Add upgrade notes 2024-12-05 22:32:26 +07:00
version.php weekly release 5.0dev 2024-12-05 22:32:27 +07:00

Moodle

The Moodle Logo

Moodle is the World's Open Source Learning Platform, widely used around the world by countless universities, schools, companies, and all manner of organisations and individuals.

Moodle is designed to allow educators, administrators and learners to create personalised learning environments with a single robust, secure and integrated system.

Documentation

Community

moodle.org is the central hub for the Moodle Community, with spaces for educators, administrators and developers to meet and work together.

You may also be interested in:

Installation and hosting

Moodle is Free, and Open Source software. You can easily download Moodle and run it on your own web server, however you may prefer to work with one of our experienced Moodle Partners.

Moodle also offers hosting through both MoodleCloud, and our partner network.

License

Moodle is provided freely as open source software, under version 3 of the GNU General Public License. For more information on our license see