Commit graph

1220 commits

Author SHA1 Message Date
Sara Arjona
c42ca73e11
Merge branch 'MDL-74977-main' of https://github.com/HuongNV13/moodle 2024-04-10 15:50:50 +02:00
Huong Nguyen
6d40f11806
MDL-74977 core_courseformat: add expanded section update actions
This also fix the Random "Course content preferences" Behat failure
2024-04-10 18:11:00 +07:00
Sara Arjona
e188a28add
MDL-80203 courseformat: Set action menu for delegated sections
Co-authored by: Ferran Recio <ferran@moodle.com>
2024-04-09 15:28:16 +02:00
Sara Arjona
dfb6a3ce16
MDL-80203 courseformat: Fix some typos and PHPDoc 2024-04-09 15:28:16 +02:00
Mikel Martín
a4c611febb MDL-81307 core_courseformat: Add bulk styles for small devices 2024-04-09 13:23:01 +02:00
Sara Arjona
099ceb42a0
Merge branch 'MDL-81456-main' of https://github.com/andrewnicols/moodle 2024-04-08 16:11:26 +02:00
Marina Glancy
ef1759da74 MDL-80820 various: fix incorrect phpdocs 2024-04-08 10:13:10 +01:00
Huong Nguyen
def6f6ee87
Merge branch 'MDL-81337-main' of https://github.com/lucaboesch/moodle 2024-04-08 10:38:06 +07:00
Huong Nguyen
28adb1e462
Merge branch 'MDL-80934-main' of https://github.com/laurentdavid/moodle 2024-04-08 09:12:57 +07:00
Huong Nguyen
6b7d9b5e8a
Merge branch 'MDL-81402-main' of https://github.com/sh-csg/moodle 2024-04-08 09:02:40 +07:00
Andrew Nicols
2b49ad42f5
MDL-81456 core: Use DI for all hook access
Using DI for all hook access means that it becomes significantly easier
to mock hooks and callbacks for unit testing without fundamentally
altering the structure of the code purely for the purposes of unit
testing.
2024-04-08 09:35:41 +08:00
Luca Bösch
5af261d8f5 MDL-81337 core_courseformat: Add 'Add section' / 'Add content' tooltips. 2024-04-05 15:09:22 +02:00
Sara Arjona
744c1c8a5a
Merge branch 'MDL-81359-main' of https://github.com/sammarshallou/moodle 2024-04-04 17:02:51 +02:00
Stefan Hanauska
a1c8337800 MDL-81402 course: Add sectionnum to cm export 2024-04-04 12:59:53 +02:00
Sara Arjona
2f2eaf44c5
Merge branch 'MDL-80220-main' of https://github.com/laurentdavid/moodle 2024-04-04 12:47:53 +02:00
Laurent David
adb141ee12 MDL-80220 core_courseformat: Add tests for section visibility 2024-04-04 10:58:06 +02:00
Laurent David
27a681c6fe MDL-80220 core_courseformat: Add section badge template
* Adjust badge style to look similar to the one in the activity
* Add visibility selection dropdown to section
2024-04-04 10:58:06 +02:00
Laurent David
73bdbf6437 MDL-80934 core_courseformat: Expand section when selected
* Sections in the course content must be expanded when an item
from this section is selected in the course index
2024-04-04 10:41:22 +02:00
Ilya Tregubov
24347e3309 Merge branch 'MDL-80828-main' of https://github.com/roland04/moodle 2024-03-27 11:14:02 +08:00
sam marshall
1fb9ff333f MDL-81359 core_courseformat: Availability 'Show more' unwelcome outing
If the availability restriction includes a link, then 'Show more'
always appeared even when the entire text is already shown.
2024-03-26 12:27:00 +00:00
Jun Pataleta
638de6002a
Merge branch 'MDL-80384-main' of https://github.com/junpataleta/moodle 2024-03-26 11:16:34 +08:00
Jun Pataleta
da27f51bea
MDL-80384 courseformat: Set activity icon alt text on editing mode
From a warning using WAVE:
* The title attribute value for images that lack an alt attribute value
will be presented to screen reader users. However, providing image
content in the alt attribute typically provides better accessibility,
and should be used in most cases. The title attribute will generate a
mouse hover tooltip which may or may not be desired - this tooltip will
not be presented to touch screen or keyboard users.
2024-03-26 11:01:01 +08:00
Daniel Ziegenberg
87267da39d
MDL-81281 phpunit: assertObjectNotHasAttribute is deprecated
To be integrated as part of MDL-81266

When running PHPUnit 9.6 we get the following deprecation warnings:
"assertObjectNotHasAttribute() is deprecated and will be removed in PHPUnit
10. Refactor your test to use assertObjectNotHasProperty() instead."

So we replace all instances of assertObjectNotHasAttribute with
assertObjectNotHasProperty.

PHPUnit justifies the change with:
> PHPUnit currently refers to "fields" (see above) as "attributes". This
> is (or will become) confusing considering the introduction of
> attributes in PHP 8 and their support in PHPUnit.  PHPUnit will be
> changed to use the term "property" instead of "attribute" where "field"
> is meant.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2024-03-25 16:21:07 +01:00
Mikel Martín
cd8a089d7a MDL-80828 core_courseformat: Modify availability subpanel visibility
In the activity action menu, show only the subpanel when the options are different
than show or hide. In those cases the show/hide option will be directly displayed
in the menu instead of a subpanel.

Co-authored-by: ferran@moodle.com
2024-03-25 13:54:42 +01:00
Laurent David
d983fee151 MDL-80384 core_courseformat: Remove activty icon link
* Remove the link over the image icon for an activity and use
the title attribute for the tooltip
2024-03-25 13:25:56 +01:00
Ilya Tregubov
59d44c30a5 Merge branch 'MDL-80715-main' of https://github.com/ferranrecio/moodle 2024-03-22 09:17:55 +08:00
Paul Holden
97a5b89317
Merge branch 'MDL-81163-main' of https://github.com/sarjona/moodle into main 2024-03-21 14:41:41 +00:00
Huong Nguyen
ccefde0f53 Merge branch 'MDL-81289-main' of https://github.com/ferranrecio/moodle 2024-03-21 15:12:01 +07:00
Huong Nguyen
6b09a619e5 Merge branch 'MDL-80923-main' of https://github.com/sarjona/moodle 2024-03-21 11:20:33 +07:00
Ilya Tregubov
45750b413e Merge branch 'MDL-81050-main' of https://github.com/roland04/moodle 2024-03-21 10:52:39 +08:00
Sara Arjona
9d7ab10f29
MDL-81163 course: Use component_callback for is_branded 2024-03-20 17:04:55 +01:00
Ferran Recio
fbbb86a2a6 MDL-80715 core_courseformat: delegate section and cm rename 2024-03-20 16:51:12 +01:00
Ferran Recio
c74a5439f6 MDL-80715 core_courseformat: new cm rename action 2024-03-20 16:51:12 +01:00
Ferran Recio
9d3bbe6c02 MDL-80715 core_courseformat: new section update action 2024-03-20 16:51:12 +01:00
Sara Arjona
5e5f06ba68
MDL-80923 course: Replace custom element with placeholder
In the section settings page, replace the custom checkbox element
used for renaming with a standard input text field featuring a
placeholder.
This adjustment aims to enhance user experience by simplifying the
interaction and aligning with modern design standards.
2024-03-20 12:02:38 +01:00
ferranrecio
19af72f6ca MDL-81289 core_courseformat: fix get_format_string params 2024-03-19 17:27:03 +01:00
Mikel Martín
10f378a7a4 MDL-81050 course: Add behat scenarios for inline section renaming 2024-03-19 15:19:34 +01:00
Mikel Martín
de9c2393b2 MDL-81050 course: Propagate section name change in the content
Add a new feature to propagate the section name change through the
course content. Any element with data-section-name-for=<sectionid>
will automatically update the section name.
2024-03-19 08:53:49 +01:00
Ilya Tregubov
d567ba9a81 Merge branch 'MDL-80919' of https://github.com/paulholden/moodle 2024-03-19 10:14:07 +08:00
Eloy Lafuente (stronk7)
361dfe8145
MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces:
- https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
- https://www.php.net/manual/en/reflectionproperty.setaccessible.php
- https://www.php.net/manual/en/reflectionmethod.setaccessible.php

As of PHP 8.1.0, calling this method has no effect; all methods are
invokable by default. So, let's remove all uses from core, they are
no-op.
2024-03-10 21:15:00 +01:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
Simey Lameze
8068912aef MDL-80460 behat: use the correct section name 2024-03-07 10:22:34 +08:00
Sara Arjona
b10a9ec30c
MDL-80920 course: Add behat step supporting section number
The selector "I am on the "Course > Section" "course > section" page
has been improved to also support section number.
When "Section x" is given, and there is no section with this name,
section number "x" is used.
2024-03-07 09:56:24 +08:00
Sara Arjona
fed26847b4
MDL-80460 behat: Fix tests to replace Topic with Section
The behat tests using the course format topics have been reviewed to:
- Add the 'inisections' parameter where necessary, facilitating automatic
renaming of section names.
- Evaluate failing tests due to slight changes in ordering. Notably, in
the topics format, sections are now uniformly named 'New section' without
any numbering.
2024-03-06 15:25:22 +01:00
Sara Arjona
076aead150
MDL-80460 format_topics: Replace name from "Topic X" with "New section"
From now on, the default section name for the topics course format is
"New section" instead of "Topic x" (where x was the section number).
A new item, initsections, has been added to the create_course() function
in the testing_data_generator class, to let the generator rename the
sections to "Section X"

AMOS BEGIN
  CPY [sectionname,format_topics],[legacysectionname,format_topics]
AMOS END
2024-03-06 15:25:22 +01:00
Sara Arjona
0b3b739370
MDL-80866 behat: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +01:00
Eloy Lafuente (stronk7)
29a541724f
MDL-65292 style: Fix all the function declaration ordering
This has been generated running the following Sniff,
part of the Moodle's CodeSniffer standard:
- PSR2.Methods.MethodDeclaration

It just ensures all the function declarations have
the correct order for:
- abstract and final.
- visibility (public, protected, private).
- static.

So, all the lines modified by this commit are function declarations
and the only changes are in the positions of those keywords.
2024-02-28 23:47:47 +01:00
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Mikel Martín
de047f3767 MDL-80621 core_courseformat: Add new activity separator styles
- Created a new divider template to generate activity and section dividers
- Refactored templates and styles for the course sections for the new
  section dividers
- Changed the topics format 'hasaddsection' property to 'true' so now adding
  sections to the bottom of the course will be handled by the format instead
  of the last section. Also re-styled this 'Add topic' button.
- Refactored templates and styles for the course activities for the new
  activity dividers
- Fixed some related behat that failed because of these changes
- Moved blocks related SCSS to the blocks file and removed some unused SCSS
2024-02-26 10:15:19 +01:00
Huong Nguyen
0d8c9ed4ae
Merge branch 'MDL-78284-main' of https://github.com/sarjona/moodle 2024-02-21 09:49:41 +07:00