1129 Commits

Author SHA1 Message Date
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
Laurent David
11fee57c5c MDL-80251 behat: Add new step to go to section 2024-02-19 07:18:55 +01:00
Sara Arjona
8cdd62ca88
MDL-78284 theme: Add new interactive content and update styles 2024-02-15 17:49:43 +01:00
Sara Arjona
76474b6c59
MDL-78284 mod: Add new _is_branded() function
There is a new callback, <modname>_is_branded, which, by default,
returns false. It needs to be implemented by modules that want their
logo to be displayed as it is (so without applying any filter to
colour them based on their main purpose).
2024-02-15 17:49:42 +01:00
Sara Arjona
1ea31db81c
MDL-80249 course: Hide secondary menu and add breadcrumb to section page 2024-02-14 08:03:56 +01:00
Sara Arjona
0d1f2a4504
Merge branch 'MDL-80219-main' of https://github.com/roland04/moodle 2024-02-13 16:09:32 +01:00
Sara Arjona
b91ec287dc
Merge branch 'MDL-80190-main' of https://github.com/ferranrecio/moodle 2024-02-13 15:28:05 +01:00
Huong Nguyen
2a5ec75849 Merge branch 'MDL-80622-main' of https://github.com/roland04/moodle 2024-02-13 09:54:52 +07:00
Huong Nguyen
7095211898 Merge branch 'MDL-80326-main' of https://github.com/laurentdavid/moodle 2024-02-13 08:55:22 +07:00
Mikel Martín
e788ed509c MDL-80622 core_courseformat: Fix activity card drag image 2024-02-09 09:48:49 +01:00
Mikel Martín
0efe999276 MDL-80219 core_courseformat: Add course section and activity new styling
- Add border to sections (not in single section page)
- Remove border to activity cards and add single line separators
- Refactor activity and sections styles to fit this new layout
- Remove styles that are not necessary with this new layout
2024-02-09 09:47:03 +01:00
Laurent David
716da575e7 MDL-80326 course_format: Visibility changes only when capability is set
* When an editing teacher has not the capability to change visibility
(for example if for a given module the capability is removed), the visibility
drop down menu in the card should not be available.
2024-02-08 09:21:09 +01:00
Sara Arjona
7179bd713a
Merge branch 'mdl-78095-master' of https://github.com/james-cnz/moodle 2024-02-08 15:32:26 +08:00
Ferran Recio
34ce0eddc0 MDL-80190 core_courseformat: prevent delegated sections loops
This patch prevent dropping an activity with delegated sections inside
another delegated section. Without this patch the teacher can create a
deadlock drag&droping the subsection inside itself. We won't allow
subsections inside subsections so any activity with subsection cannot
be dropped inside a subsección.
2024-02-07 12:14:59 +01:00
Ferran Recio
d244a206a3 MDL-80190 core_courseformat: top re-sorting delegated sections
The current course editor re-sort sections on the frontend. If a
sections does not exists it uses fragment to render the missing section.
However, delegated section should not be re-sorted as regular sections.
2024-02-07 12:14:18 +01:00
Ferran Recio
15db7d9d98 MDL-80190 core_courseformat: fix activity creation on delegated sections
The method for checking if the user can create an activity executed
create_if_missing wihtout checking the section exists or not. This is
a problem for delegated sections because create_if_missing will create a
regular section and push down all delegate ones. With the patch the
method first checks if the section exists.
2024-02-07 12:06:03 +01:00
Ferran Recio
97a7958aee MDL-80190 core_courseformat: do not render delegated sections in course 2024-02-07 12:06:03 +01:00
Jun Pataleta
83532409cc
Merge branch 'MDL-80725-main-enfix' of https://github.com/mudrd8mz/moodle 2024-02-06 15:59:07 +08:00
james-cnz
02037c5f2c MDL-78095 course: Respect is_bulk_editable() 2024-02-02 10:49:07 +13:00
Huong Nguyen
490ca57d1c Merge branch 'MDL-71665-main' of https://github.com/laurentdavid/moodle 2024-02-01 11:06:35 +07:00
Helen Foster
ddbfeecb83 MDL-80725 lang: Import fixed English strings (en_fix) 2024-01-31 18:45:03 +01:00
Amaia Anabitarte
522a7ec010 MDL-80250 course_format: Create new section_viewed event 2024-01-31 12:54:06 +01:00
Laurent David
8ee075d871 MDL-71665 core_courseformat: Sync activity name in the page
* Changing the name of an activity should change the access restriction messages.
* Introduction of a marker as data-cm-name-for to be able to change any
occurence of a course module name in the page when this one changes.
2024-01-29 09:00:30 +01:00
Sara Arjona
a31646d2d8
Merge branch 'MDL-80458-main' of https://github.com/mickhawkins/moodle 2024-01-24 17:14:53 +01:00
Sara Arjona
eb03b6622d
Merge branch 'MDL-80396-main' of https://github.com/roland04/moodle 2024-01-24 12:29:50 +01:00
Sara Arjona
8b36abdb9d
Merge branch 'MDL-80259-main' of https://github.com/roland04/moodle 2024-01-24 09:16:12 +01:00
Michael Hawkins
d1d85aa711
MDL-80458 core: Hide MoodleNet share bulk option if feature disabled 2024-01-24 11:52:28 +08:00
Ilya Tregubov
14b809a017 Merge branch 'MDL-80320-main' of https://github.com/laurentdavid/moodle 2024-01-24 08:56:07 +08:00
Laurent David
31d4af83c6 MDL-80320 core_courseformat: Disable group selection
* When forced groupmode is enabled for the course:
  - the group selection in the activity card be disabled
  - the activity action menu groupmode will not be visible.
  - only the icon will be visible
* Add new test to check for visibility
2024-01-23 11:31:22 +01:00
Mikel Martín
a198884333 MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5 2024-01-23 08:27:23 +01:00
Jun Pataleta
10744550e6
Merge branch 'MDL-79029-main' of https://github.com/ferranrecio/moodle 2024-01-23 09:26:30 +08:00
Sara Arjona
1643b2110e
Merge branch 'MDL-80418-main' of https://github.com/aanabit/moodle 2024-01-22 16:13:46 +01:00
Ferran Recio
f4adbc8a11 MDL-79029 behat: replace deprecated behat steps 2024-01-22 11:12:28 +01:00
Jun Pataleta
412db652c7
Merge branch 'MDL-80461-main' of https://github.com/sarjona/moodle 2024-01-22 16:17:21 +08:00
Sara Arjona
9e25f21164
MDL-80248 course: Deprecate get/set_section_number()
The methods core_courseformat\base::set_section_number() and
core_courseformat\base:: get_section_number() have been deprecated
and replaced by core_courseformat\base::set_sectionnum() and
core_courseformat\base::get_sectionnum().
The new methods use the null value when all the sections must be
displayed (instead of 0). That way, section 0, can be displayed on
a single page too.
2024-01-19 12:03:37 +01:00
Sara Arjona
800ddf513d
MDL-80248 behat: Fix behat tests 2024-01-19 12:03:36 +01:00
Sara Arjona
e6f75b59a3
MDL-80248 course: Display only content for the General section 2024-01-19 12:03:36 +01:00
Mikel Martín
d98c7eda66 MDL-80396 theme: Refactor media helper class dropped in BS5 2024-01-19 10:38:38 +01:00
Sara Arjona
2a708f985a
MDL-80461 courseformat: Use choicedropdown for the format setting
In MDL-79985 a new form element was created to display a new generic
dropdown with extra information like a description or an icon on each
option.

This commits replaces the select for the course format form element in
the Course settings page with this new component.
2024-01-19 09:37:42 +01:00
Sara Arjona
69ee5c3395
MDL-80461 courseformat: Fix tests after replacing topic/week 2024-01-19 08:53:18 +01:00
Sara Arjona
785d3fd1e7
MDL-80461 courseformat: Replace topics and weeks with section
After UX research, the conclusion is that all formats should use "section"
and not try to use alternative terms such as topic or week.

This commit replaces topic and week references with section. A couple of
considerations:

- Most of the strings in topics and weeks formats have been removed. In that
particular case it's not required to follow the deprecation process because
they will be using the generic ones defined in moodle or courseformat.
- The sectionname will be renamed from "Topic"/"Week" to "New section" in
MDL-80460.
2024-01-19 08:53:16 +01:00