Commit graph

1220 commits

Author SHA1 Message Date
Paul Holden
314fcb3cf8
MDL-82360 courseformat: remove console upload error string debugging. 2024-07-02 15:53:19 +01:00
Sara Arjona
9e1eec783c
Merge branch 'MDL-82207' of https://github.com/stronk7/moodle 2024-06-26 12:27:19 +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
ferranrecio
f166b15b28 MDL-81769 core_courseformat: prevent delegated section modules actions 2024-06-21 12:41:09 +02:00
Huong Nguyen
ebae7fbae4
Merge branch 'MDL-81523' of https://github.com/stronk7/moodle 2024-06-19 09:52:10 +07:00
James C
7dca6d0e3b MDL-78080 course: Duplicate section: Duplicate by section id, not num 2024-06-17 12:51:33 +12:00
James C
7cde0e9984 MDL-78080 course: Duplicate section: No duplicate option for section 0 2024-06-17 12:51:33 +12:00
James C
f00a6caaaf MDL-78080 course: Duplicate section: Don't copy deleted activities 2024-06-17 12:51:33 +12:00
James C
ef02908013 MDL-78080 course: Duplicate section: Copy section summary files 2024-06-17 12:51:13 +12:00
James C
23567ce725 MDL-78080 course: Duplicate section: Copy custom section options 2024-06-17 12:48:22 +12:00
James C
acf5e44fde MDL-78080 course: Duplicate section: Fix course_update_section params 2024-06-17 12:47:16 +12: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
Jun Pataleta
bb1cddb140
Merge branch 'MDL-81681-main' of https://github.com/sarjona/moodle 2024-06-12 10:57:20 +08:00
Huong Nguyen
96d29ef71b
Merge branch 'MDL-81522' of https://github.com/stronk7/moodle 2024-06-12 08:46:31 +07:00
Laurent David
9381343c78 MDL-81510 core_courseformat: Fix activity highlight in index
* When directly accessing the module with the #module-xxx anchor
we should highlight the module as the current page item.
2024-06-11 12:34:20 +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
Sara Arjona
e18aefa69e
Merge branch 'MDL-81676-main' of https://github.com/aanabit/moodle 2024-06-10 16:07:28 +02:00
Sara Arjona
6764cc71ac
Merge branch 'MDL-81648-main' of https://github.com/roland04/moodle 2024-06-10 15:49:46 +02:00
Amaia Anabitarte
267a474154 MDL-81676 core_course: Rename data-sectionid to data-sectionnum
Activity chooser is saving section number in a data attribute called
data-sectionid. We should use data-sectionnum instead to make it easier
to understand.
2024-06-10 15:42:09 +02:00
Sara Arjona
94adf2ae31
Merge branch 'MDL-70972-main' of https://github.com/PhMemmel/moodle 2024-06-10 12:33:18 +02:00
Laurent David
ed029faf06 MDL-81510 core_courseformat: Do not reset the scroll position
* Revert the change made in MDL-75762 which would wait and change
  course index selection depending on the actual scroll position
2024-06-07 09:38:54 +02:00
Laurent David
91d89170f7 MDL-81510 core_courseformat: Expand course section to show activity
* When a course activity is specified via an anchor in the URL we
should expand the course content containing the activity
* When we point to a specific activity via an anchor in the URL we should
expand the course index (section) surrounding the actitity.
2024-06-07 09:38:54 +02:00
Sara Arjona
79c85ab22d
MDL-81681 course: Make reactive the section page 2024-06-07 09:35:05 +02:00
Sara Arjona
8aef5e6574
MDL-81681 course: Revert changes done in MDL-81575
Now that the section page is reactive, these changes are not
required anymore.
2024-06-07 09:34:11 +02:00
Huong Nguyen
7934aa46ce
Merge branch 'MDL-81749-main' of https://github.com/aanabit/moodle 2024-06-06 22:02:36 +08:00
Huong Nguyen
3086b220be
Merge branch 'MDL-81397' of https://github.com/paulholden/moodle 2024-06-06 22:02:33 +08:00
Amaia Anabitarte
f185fdca52 MDL-81749 core_completion: Let custom rules to return failed state 2024-06-05 15:55:04 +02:00
Paul Holden
90a4216446
MDL-81397 courseformat: define section editing capabilities.
This ensures consistency for current page instance, when rendering
content in response to fragment AJAX requests.
2024-06-04 09:00:11 +01:00
Philipp Memmel
9ca4975d0d MDL-70972 format_singleactivity: Apply new behavior to behat test 2024-06-04 06:29:05 +00:00
Philipp Memmel
63c0495c86 MDL-70972 format_singleactivity: Show activities when creating course
Co-authored-by: Laurent David <lmedavid@gmail.com>
2024-06-04 04:29:06 +00:00
Mikel Martín
932b094134 MDL-81648 course: Add new sectiondelegatemodule class
- Created sectiondelegatemodule abstract class for those delegated sections
managed by a module
- This class will override get_parent_section from the base class, retrieving
the parent section from the module
2024-05-31 10:50:20 +02:00
Mikel Martín
b4ecd9d805 MDL-81648 course: Add a method to retrieve delegate section parent
- New 'get_parent_section()' function added to sectiondelegate abstract class
2024-05-31 10:50:20 +02:00
Sara Arjona
0240478571
MDL-82009 course: Course blocks should be displayed in section page too 2024-05-31 08:16:49 +02:00
Sara Arjona
5d6c6bf81c
NOBUG: Add upgrade notes 2024-05-30 17:00:19 +02:00
Ilya Tregubov
8f9e93f5a3 NOBUG: Add upgrade notes 2024-05-24 10:51:52 +08:00
Andrew Nicols
0964cd5b69
MDL-81125 core: Update upgrade.txt files to document new upgrade notes 2024-05-20 22:26:45 +08:00
Sara Arjona
1f08a61374
Merge branch 'MDL-80683-main' of https://github.com/sebastsg/moodle 2024-05-14 17:26:44 +02:00
Amaia Anabitarte
6bc8b45c85 MDL-81601 core_course: Add course index completion status behats 2024-05-09 19:38:45 +08:00
Amaia Anabitarte
bb93bcdb2d MDL-81601 core_course: Fix course index completion status 2024-05-08 08:16:11 +02:00
Sebastian
47daf29b69 MDL-80683 course: Move misplaced opening div tag
The section header from the section template has been moved to the content template
so we don't close it from within the content template.

Nothing seems to use the content template, so there should not be any
differences in HTML output anywhere.
2024-05-07 11:15:36 +02:00
Huong Nguyen
810cdb12cb
MDL-81610 course: Update upgrade.txt 2024-04-30 09:10:14 +07:00
Mark Johnson
82a4c991ef
MDL-81610 course: Optimise core_courseformat\external\get_state
core_courseformat\external\get_state calls export_for_tempalte for each
course module, which in turn calls completion_info::is_tracked_user()
for the current user on the current course. The result of this call will
be the same for every course module, so does not need to be called what
may be several hundred times.

This change allows the result of is_tracked_user to be passed to the cm
state object, then calls it once and passes it to each cm's object. If
it is not passed in, it will be computed on demand as before.
2024-04-25 16:15:03 +01:00
Jun Pataleta
72e283b5e8
Merge branch 'MDL-81575-main' of https://github.com/ferranrecio/moodle 2024-04-24 12:36:52 +08:00
ferranrecio
735bef87d2 MDL-81575 core_courseformat: fix interactive section visibility badge 2024-04-23 11:15:19 +02:00
Jun Pataleta
78e5814a0f
MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-20 21:01:04 +08:00
Jun Pataleta
9966241efb
Merge branch 'MDL-81525-main' of https://github.com/andrewnicols/moodle 2024-04-17 23:42:22 +08:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Andrew Nicols
93619ca6ac
MDL-81525 core_course: Add missing docs 2024-04-15 13:05:09 +08:00
Andrew Nicols
613f933442
Merge branch 'MDL-80820' of https://github.com/marinaglancy/moodle 2024-04-15 10:42:22 +08:00
Shamim Rezaie
54561aacec Merge branch 'MDL-80203-main' of https://github.com/sarjona/moodle 2024-04-12 09:23:05 +10:00