Commit Graph

1069 Commits

Author SHA1 Message Date
Mark Johnson c6f329808c MDL-83541 question/quiz: restoring questions with identical stamps
Historically it was possible, through a series of question restores,
moves and edits, to end up with multiple questions in the same
category with the same stamp, but differences in other question
or answer fields. This, combined with changes in versions, led
to errors when restoring or duplicating quizzes using these questions.

While recent changes have made it impossible to create this situation
in current Moodle versions, as any edits will create a new question
version with a new stamp, this situation may exist on long-standing
Moodle sites which have been upgraded since pre-4.0.

This change performs a much wider-ranging comparison of restored
existing questions, generating a hash of all the data for a question in
a backup file, and a corresponding hash for each question in the target
category, to decide if a restored question matches a question already in
the database.
2025-03-14 10:10:18 +07:00
Sara Arjona 328b325fbc MDL-84416 backup: Add backup_import_badges setting
While MDL-43938 introduced badge importing, two tasks were left incomplete.

1) Creating the backup_import_badges setting for default import behaviour.
2) Preventing the inclusion of badges during activity duplication.

This commit implements them.
2025-03-10 08:16:36 +01:00
Sara Arjona 4c2d8b0205 NOBUG: Add upgrade notes 2025-03-04 16:14:27 +01:00
Amaia Anabitarte e29e633e16 MDL-75669 course_backup: Fixing behat issue 2025-02-17 08:13:48 +01:00
Mikel Martín 04975cd2b2 MDL-75669 theme_boost: Refactor custom form elements to BS5
- .custom-check is now .form-check.
- .custom-check.custom-switch is now .form-check.form-switch.
- .custom-select is now .form-select.
- .custom-file and .form-file have been replaced by custom styles on top of .form-control.
- .custom-range is now .form-range.
- Dropped .input-group-append and .input-group-prepend. You can now just add buttons
  and .input-group-text as direct children of the input groups.
2025-02-14 10:58:36 +01:00
Mikel Martín 5416483611 MDL-75669 theme_boost: Refactor BS5 data attributes
Data attributes for all Bootstrap5 JavaScript plugins are now namespaced
to help distinguish Bootstrap functionality from third parties and your own code.
For example, data-bs-toggle instead of data-toggle.
This commit refactor all old Bootstrap data-attributes to the new syntax.

Co-authored-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-02-14 09:10:33 +01:00
Sara Arjona ff0e03ff56 Merge branch 'MDL-84264-main' of https://github.com/pmaneggia/moodle 2025-01-29 16:52:52 +01:00
Daniel Ziegenberg 161cf71a48 MDL-73700 backup: remove old PHP version check
As MDL-73016 set the minimum supported PHP version for Moodle 4.4 and up
to PHP 8.1 we can now safely switch to php_serialize as the serialize
handler.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2025-01-28 18:58:01 +01:00
Paola Maneggia cb1c36f8b1 MDL-84264 backup: encode and decode urls for the new course section page 2025-01-20 18:49:42 +01:00
Sara Arjona 65a4277f85 Merge branch 'MDL-83336-main' of https://github.com/andrewnicols/moodle 2024-12-17 10:54:29 +01: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
Mikel Martín a973ea46d7 MDL-81825 core: Replace sr_text() with visually_hidden_text()
In core renderer, replace 'sr_text' method with 'visually_hidden_text' to be
consistent with Bootstrap 5 upgrade.
2024-12-10 14:02:34 +01: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
Shamim Rezaie 0af9b5ca7e Merge branch 'MDL-71378_main' of https://github.com/SimonasAdams/moodle 2024-11-25 18:21:18 +11:00
Andrew Nicols d2c5ae9f75 Merge branch 'MDL-83226' of https://github.com/paulholden/moodle 2024-11-21 11:44:32 +08:00
Jun Pataleta fcb39d60a9 Merge branch 'MDL-81521-main' of https://github.com/andrewnicols/moodle 2024-11-19 15:15:17 +08:00
Tim Hunt 68d369917e MDL-70556 core db: change course fullname to 1333 chars
This is mainly for the benefit of multilang users.

As well as changing the database schema, it is also necessary to change
where this is inforced in PHP code (forms, web services). This was missed
when shortname was changed from 100 to 255 chars some time ago, but I have
fixed that here.

Note, I have not changed the legacy mnet code, since as far as I am aware
that is deprecated.
2024-11-15 15:28:23 +00:00
Simon Adams 966b264cf3 MDL-71378 mod_qbank: Add question bank backup/restore and refactor tests 2024-11-15 15:18:47 +00:00
Andrew Nicols a6acb015a3 MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-15 12:50:55 +08:00
Huong Nguyen 9e8268a28c NOBUG: Add upgrade notes 2024-11-08 13:56:10 +07:00
Jun Pataleta fb0abbdfff Merge branch 'MDL-66873-main' of https://github.com/meirzamoodle/moodle 2024-11-07 11:00:11 +08:00
Paul Holden c60c6a5311 MDL-83226 customfield: set backup/restore configuration defaults. 2024-11-04 15:29:04 +00:00
Huong Nguyen 88c39c1766 Merge branch 'MDL-82904-main' of https://github.com/laurentdavid/moodle 2024-10-31 11:21:40 +07:00
Laurent David 85a3097f2b MDL-82904 core_badges: Display empty column for unset criteria
* In the report builder badges with unset criteria should have a empty
value for the criteria column
2024-10-23 08:17:09 +02:00
meirzamoodle b14ab12b1d MDL-66873 backup: Remove all MODE_HUB related code 2024-10-21 13:13:16 +07:00
Paul Holden edc012f7bb MDL-83463 backup: ensure defaults for course file inclusion are read. 2024-10-15 12:26:00 +01:00
Andrew Nicols d9863dbc94 MDL-83336 core: Update for deprecation of xml_set_object
From PHP 8.4, `xml_set_object()`, and passing a string helper to
`xml_set_.*_handler()` has been deprecated.

This commit updates all uses of these in core code.

Please note the following libraries have not been modified and will be
handled via library upgrades separately:
- simplepie
- phpxmlrpc
- tcpdf
2024-10-09 15:02:37 +08:00
Jun Pataleta 5b421c6db6 NOBUG: Add upgrade notes 2024-10-05 15:08:28 +08:00
Huong Nguyen 3a6640c461 NOBUG: Add upgrade notes 2024-10-04 21:06:11 +07:00
meirzamoodle 3229dda3d6 MDL-83332 core: Revert the slashargument removal on MDL-62640
Removing the option causes issues on MacOS.
2024-10-02 18:36:14 +07:00
Huong Nguyen 4d1c0cb04b NOBUG: Add upgrade notes 2024-10-01 19:37:15 +07:00
Huong Nguyen 282421ce6c NOBUG: Change upgrade notes version 2024-09-27 19:16:56 +07:00
Huong Nguyen 7b4ed9096f NOBUG: Add upgrade notes 2024-09-27 18:45:07 +07:00
meirzamoodle 4d2ad0bff7 MDL-62640 core: Adjust code for slashargument removal 2024-09-25 08:30:18 +07:00
Tim Hunt bab665dd40 MDL-77625 question restore: fix pre-parsing of questions
Restore of categories and questions happens in several phases.
First, the file is scanned for which questions and categories
it contains, to work out if these are new questions which need
to be restored, or if they already exist in the database in a
place that can be used.

That code had not been updated to cope with the Moodle 4.0
versioning changes, so it is updated here (while still keeping
the code to cope with the old backup format.)
2024-09-17 16:14:21 +01:00
Sara Arjona 2f4efdb879 MDL-82503 badges: Fix behat and PHPUnit tests 2024-09-03 20:27:51 +02:00
Sara Arjona 4cdeb79566 MDL-82503 badges: Prepare and make index.php default page
The badges/index.php and badges/view.php pages are quite similar and
have been merged into index.php.
This commit updates index.php to incorporate the missing information
previously found in view.php.
2024-09-03 19:55:49 +02:00
Huong Nguyen dca18ebca3 Merge branch 'MDL-81634-main' of https://github.com/andrewnicols/moodle 2024-08-20 09:30:44 +07:00
Huong Nguyen e2708aeacf NOBUG: Add upgrade notes 2024-08-16 08:37:50 +07:00
Mikel Martín 0a03018116 MDL-75671 theme_boost: Refactor spacing classes for BS5
- Add SCSS code for spacing utility classes to the Boostrap 5 bridge SCSS file
- Replace all occurrences in the codebase (pr-1 > pe-1, ml-auto > ms-auto, ml-sm-3 > ms-sm-3, ...)
2024-08-09 07:40:17 +02:00
Paul Holden 0f334dd5f3 MDL-81394 restore: format backup file metadata details safely. 2024-08-07 14:04:01 +08:00
Andrew Nicols 024e36be17 MDL-81634 core: Fix all implicitly defined nullables
Note: This does not impact third-party libraries.
2024-08-02 14:11:12 +08:00
Ilya Tregubov fdfdd02639 NOBUG: Add upgrade notes 2024-07-19 09:30:19 +08:00
Huong Nguyen abcac5bc8f NOBUG: Add upgrade notes 2024-07-12 08:41:57 +07:00
Huong Nguyen 28f62b717a Merge branch 'MDL-82245' of https://github.com/paulholden/moodle 2024-07-11 11:13:50 +07:00
Sara Arjona 092e2d1ec7 MDL-82057 backup: Badges independent of user data and activities
The dependency of badges on user data and activities has been
removed when copying, importing, or creating backups in courses.
Now, badges can be imported or copied even if user data and activities
are not selected:

- If user data is not selected (during backup or course copying), the badge
information (name, description, image, etc.) and criteria will be included,
but the users who have been awarded the badge will be excluded.

- If activities are not selected (during backup), the badge information
(name, description, image, etc.) will be copied, but the criteria and users
who have been awarded the badge will be excluded.
2024-07-09 07:49:57 +02:00
Ilya Tregubov c7af8d8afa NOBUG: Add upgrade notes 2024-07-05 09:01:53 +08:00
Ilya Tregubov 02ce2360c2 Merge branch 'MDL-82315' of https://github.com/paulholden/moodle 2024-07-04 10:37:29 +08:00
Sara Arjona 89dcf5066b Merge branch 'MDL-74251-main' of https://github.com/lucaboesch/moodle 2024-07-03 09:35:56 +02:00