3164 Commits

Author SHA1 Message Date
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
Ilya Tregubov
784b7962be Merge branch 'MDL-82220' of https://github.com/paulholden/moodle 2024-09-02 10:09:40 +08:00
Huong Nguyen
dca18ebca3
Merge branch 'MDL-81634-main' of https://github.com/andrewnicols/moodle 2024-08-20 09:30:44 +07:00
Paul Holden
968ae422c0
MDL-82220 group: check valid mapping when restoring custom fields. 2024-08-16 10:08:57 +01:00
Paul Holden
27b384e0fa
MDL-82220 backup: ensure correct group/ing custom fields are included.
We should include only the custom field values that belong to those
groups and/or groupings that are being backed up.
2024-08-16 10:08:57 +01: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
Paul Holden
687f735387 MDL-82392 blocks: consistent cleaning of block instance names. 2024-08-07 04:12:45 +00: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
b964baf06e
Merge branch 'MDL-75025_final-deprecation-of-base_controller-set_copy' of https://github.com/ziegenberg/moodle 2024-07-17 14:20:50 +07: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
Huong Nguyen
2845d8cbde
Merge branch 'MDL-79717' of https://github.com/paulholden/moodle 2024-07-11 09:34:52 +07:00
Paul Holden
bd0f8a058f
MDL-79717 phpunit: ensure unique data provider keys in tests.
Duplicate data provider keys were overwriting and/or duplicating
one another, leading to some cases being skipped.

Other "duplicate array key" errors were picked up by `phpcs` in
this dragnet across all tests, which have also been fixed.
2024-07-10 14:08:49 +01: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
Sara Arjona
f385fe16da
Merge branch 'MDL-75022_final-deprecation-of-core_backup-copy' of https://github.com/ziegenberg/moodle 2024-07-01 16:47:20 +02:00
Sara Arjona
4fcea1f716
Merge branch 'MDL-80191-main-v06' of https://github.com/ferranrecio/moodle 2024-07-01 12:26:46 +02:00
ferranrecio
b5f14e895a MDL-80191 backup: add subsections to restore form
This commit adds two new levels to the restore course structure form:
subsection (a delegated section that belongs to a course module) and
subactivity (a course module in a subsection).

Restore form can only use information from the backup file. To allow
activities to know if they are inside a subsection, the backup now
incorporates an "insubsection" attribute. This attribute is used only
for the form display but not for the restore logic.
2024-07-01 10:48:32 +02:00
ferranrecio
c997f91db6 MDL-80191 backup: add subsections to backup form
The patch adds two new levels to the backup form structure: subsection
(a delegated section which parent is a course module) and subactivity
(an activity inside a subsection). Those new elements are displayed as a
inner section below the parent activitiy.

For now the UI is the same as a regular section but future issues will
define how the UX should be. The new two levels have their own classes
to represents settings and have extra dependencies.
2024-07-01 10:48:32 +02:00
Paul Holden
012b65fd78
MDL-82245 restore: use translated lang string in page heading. 2024-06-28 10:03:03 +01:00
Paul Holden
77584dee5c
MDL-82315 backup: account for null course section sequence value. 2024-06-27 23:33:05 +01:00
Adrian Perez
e1353c7649 MDL-74251 core: Remove old icon helper classes 2024-06-27 18:28:05 +02:00
ferranrecio
b4f0332388 MDL-80191 backup: delegate section backup and restore
This commit adds all the logic to allow delegate sections backup and
restore. The backup and restore process is quite complex and it is not
designed to have task hierarchy. To solve the subsection problem, the
backup/restore planners do not include delegated sections at a course
level, but they are included when the activity with delegated section is
processed.

To allow restoing, the activity is responsible to store the
component/itemid mapping in the backup_structure_dbops. This way, when
the delegated section is restored (delegated sections are always
processed right after the parent activity) it can use the itemid
mapping.
2024-06-27 10:21:07 +02:00
ferranrecio
7482013cd2 MDL-80191 backup: prepare UI for subsections
Backup and restore settings needs to be refactored before introducing
subsections. With the current code adding two new hierachy levels
(subsections and activities in subsections) will require many
unnecessary lines of code because most of the structure is hard-coded.

With this patch when backup/restore present the course structure uses a
stack to control how mani divs are opened, instead of relying on adhoc
class attributes per each div.

About the tasks for sections and activities, the class has been
refactored. This way when subsections are introduced it will require
less lines of code and the final patch will be more comprehensible.
2024-06-27 10:16:03 +02:00
Huong Nguyen
2471ff69be
Merge branch 'MDL-82008-main' of https://github.com/lucaboesch/moodle 2024-06-27 10:26:00 +07:00
Daniel Ziegenberg
8723c4099b
MDL-75025 backup: Final deprecation of base_controller::get/set_copy
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-06-26 13:52:46 +02:00
Eloy Lafuente (stronk7)
ad5fe71868
MDL-82207 phpunit: fix various @covers annotations (take#1)
This fixes various (not all) wrong @covers annotations that
are reported as warnings by PHPUnit when it's run with
code-coverage enabled.

When possible, the preferred solution is to change to
@covers at class level, that is the recommended way.

If multiple classes are involved, then a mix of @coversDefaultClass
and @covers at method level are used (always trying to use the
minimum needed patch).

This is the first of a series of issues created as sub-tasks
of MDL-82142.
2024-06-24 12:07:39 +02:00
Daniel Ziegenberg
8a4e52765a
MDL-75022 backup: Final deprecation of core_backup\copy
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-06-21 13:08:14 +02:00
Luca Bösch
b01fea1afa MDL-82008 backup: Format 'Continue' and 'Cancel' button to have a margin 2024-06-21 09:37:01 +02:00
Huong Nguyen
ebae7fbae4
Merge branch 'MDL-81523' of https://github.com/stronk7/moodle 2024-06-19 09:52:10 +07:00
Jun Pataleta
ab72eef3de
MDL-80951 backup: Add description for formselectall template 2024-06-18 11:51:11 +08:00
Jun Pataleta
a08233635d
Merge branch 'MDL-80951-main-v02' of https://github.com/ferranrecio/moodle 2024-06-18 11:40:08 +08:00
Eloy Lafuente (stronk7)
674497a12c
MDL-81523 phpunit: Add all missing setUp/tearDown parent calls
All setUp(), tearDown(), setUpBeforeClass() and tearDownAfterClass()
must, always, call to parent, to ensure that everything is properly
set and cleaned.

While in a lot of situations this is not needed (parents may not
have anything to run), with PHPUnit >= 10 this can become more
important because we are going to move the reset code from current
placement @ runBare() to setUp()/tearDown().

Note that all the changes performed in this commit have been detected
and fixed by moodle-cs (ParentSetUpTearDownSniffTest).
2024-06-14 16:04:57 +02:00
Eloy Lafuente (stronk7)
01148a0816
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 11:55:07 +02:00
Ferran Recio
7aefcdf9fb MDL-80951 backup: migrate YUI to AMD 2024-06-06 18:07:25 +02:00
Jun Pataleta
671218e0b9
MDL-81631 backup: Simplify logic using null coalescing operator 2024-06-06 22:02:35 +08:00
Jun Pataleta
e0ec62cfe5
Merge branch 'MDL-81631_master' of https://github.com/santoshndev/moodle 2024-06-06 22:02:34 +08:00
Eloy Lafuente (stronk7)
018e6e1fc8
MDL-81698 phpunit: Apply various fixes towards 1by1 execution
The changes here are heterogeneous:
- Include stuff that is not available (other test has included it).
  Sometimes local to a unit test, others in setupBeforeClass() or
  globally, ... depends on every case.
- Rename some tests (namespaces, test name, ...) towards getting it
  running.
- Amend small bits here and there.

Important note: I've left any "cosmetic" warning out from the
changes, only a few errors (like long array syntax) have been fixed.
2024-05-25 17:19:44 +02:00
Santosh Nagargoje
ba9f418632 MDL-81631 backup: Added null parameter fix 2024-05-21 17:10:32 +05:30
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
ferranrecio
5b7fc89152 MDL-80951 backup: add accessibility labels to schema fields 2024-05-16 16:57:56 +02:00
ferranrecio
29128ee200 MDL-80951 backup: fix coding style 2024-05-16 16:30:39 +02:00
Eloy Lafuente (stronk7)
dadfb6e90c
MDL-81581 phpunit: Apply the new method to all remaining cases
After discussing it in the issue, we have agreed to apply
the new phpunit_util::normalise_line_endings() method to
all the remaining cases (within tests!) where the manual
replacement was being done. This commits achieves that.

Note that I've looked for both str_replace() and preg_replace()
cases, but only the former had cases worth converting. All the
later ones are different and cannot be replaced by the new
utility method.
2024-04-25 18:52:16 +02:00
Jun Pataleta
3c1b63c7d8
MDL-81615 backup: Bump release to 4.5 2024-04-20 20:56:34 +08:00