1098 Commits

Author SHA1 Message Date
Simey Lameze
27b14a64b5 MDL-81337 behat: use new step to open add activity dialogue 2024-04-09 09:05:01 +08:00
Huong Nguyen
ad4f35f5a3
MDL-4188 core_course: Modify PHPUnit to use the new sink method 2024-04-04 20:13:47 +07:00
Ilya Tregubov
24347e3309 Merge branch 'MDL-80828-main' of https://github.com/roland04/moodle 2024-03-27 11:14:02 +08:00
Huong Nguyen
b283ca354e
Merge branch 'MDL-78551-main' of https://github.com/safatshahin/moodle 2024-03-26 10:08:06 +07:00
Safat
99b7dc147f MDL-78551 core_course: Add hooks api for course updates 2024-03-26 13:53:39 +11:00
Daniel Ziegenberg
08027e408c
MDL-81281 phpunit: assertObjectHasAttribute is deprecated
To be integrated as part of MDL-81266

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

So we replace all instances of assertObjectHasAttribute with
assertObjectHasProperty.

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:45 +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
Jun Pataleta
f150d5016d
Merge branch 'MDL-81132-master' of https://github.com/jleyva/moodle 2024-03-22 11:57:23 +08:00
Ilya Tregubov
df7167a57a Merge branch 'MDL-81023-main' of https://github.com/aanabit/moodle 2024-03-22 09:22:19 +08:00
Ilya Tregubov
59d44c30a5 Merge branch 'MDL-80715-main' of https://github.com/ferranrecio/moodle 2024-03-22 09:17:55 +08:00
Amaia Anabitarte
e0a482e3b3 MDL-81023 core_course: Move deprecated behat steps to course directory 2024-03-21 12:47:58 +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
Simey Lameze
47b4a3adcf MDL-81156 behat: coverage for force course language 2024-03-14 09:02:21 +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
Juan Leyva
ca8f197148 MDL-81132 mod_forum: Perforance improvements for app 2024-03-08 10:08:19 +01:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +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
Ilya Tregubov
cd85552e38 Merge branch 'MDL-80460-main' of https://github.com/sarjona/moodle 2024-03-07 08:41:42 +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
debcea9cbc
Merge branch 'MDL-80930-main' of https://github.com/raortegar/moodle 2024-03-05 15:24:45 +01:00
raortegar
f53d1f768a MDL-80930 core: Course delete modules task handle non deletable cms 2024-03-01 13:08:41 +01:00
Sara Arjona
b2e5f3e746
MDL-80866 phpunit: Fix failures after disabling Chat and Survey 2024-03-01 11:41:50 +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)
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
Sara Arjona
803af22d60
Merge branch 'MDL-80621-main' of https://github.com/roland04/moodle 2024-02-27 12:55:51 +01:00
Huong Nguyen
ca75778564
Merge branch 'MDL-74676-master' of https://github.com/sh-csg/moodle 2024-02-27 09:40:57 +07: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
Stefan Hanauska
2a494f0d5d MDL-74676 course: Speed up course search if using limittoenrolled
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2024-02-26 07:42:14 +01:00
Huong Nguyen
0d8c9ed4ae
Merge branch 'MDL-78284-main' of https://github.com/sarjona/moodle 2024-02-21 09:49:41 +07:00
Huong Nguyen
8eff491604
Merge branch 'MDL-80251-main' of https://github.com/laurentdavid/moodle 2024-02-21 09:33:05 +07:00
Sara Arjona
40375fa6d2
Merge branch 'MDL-80258' of https://github.com/paulholden/moodle 2024-02-19 15:48:51 +01:00
Sara Arjona
f5377be4d2
Merge branch 'MDL-80613-main' of https://github.com/lameze/moodle 2024-02-19 09:14:16 +01:00
Laurent David
11fee57c5c MDL-80251 behat: Add new step to go to section 2024-02-19 07:18:55 +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
Simey Lameze
7b7be30b4d MDL-80613 behat: convert manual completion steps to use generators 2024-02-15 17:52:38 +08:00
Paul Holden
ebcc967d2e
MDL-80258 reportbuilder: ensure consistent reporting of entity themes.
Courses, categories, users & cohorts each have a configurable `theme`
attribute - ensure reporting on said value is consistent across all the
corresponding entities.
2024-02-14 12:12:37 +00: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
0f2f0b2fd7
Merge branch 'MDL-80722' of https://github.com/paulholden/moodle 2024-02-13 16:13:17 +01:00
Sara Arjona
b91ec287dc
Merge branch 'MDL-80190-main' of https://github.com/ferranrecio/moodle 2024-02-13 15:28:05 +01:00
Andrew Nicols
d05f271528
Merge branch 'MDL-80803' of https://github.com/paulholden/moodle 2024-02-08 15:32:28 +08:00
Sara Arjona
6b93a4e6f5
Merge branch 'MDL-80392-master' of https://github.com/jleyva/moodle 2024-02-08 15:32:27 +08: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
Jun Pataleta
b51e037308
Merge branch 'MDL-70058' of https://github.com/paulholden/moodle 2024-02-07 12:31:44 +08:00
Juan Leyva
408d7c0c9c MDL-80392 completion: Fix exporter for Web Services 2024-02-06 11:01:42 +01:00
Paul Holden
3c83f2b85f
MDL-80722 reportbuilder: add time created/modified to course entity.
Tidy up unit tests for course report, removing some redundancy and
duplication.
2024-02-01 17:13:11 +00:00
Paul Holden
222af1c976
MDL-80803 course: observe mod availability before update notification. 2024-02-01 14:49:58 +00:00
Amaia Anabitarte
522a7ec010 MDL-80250 course_format: Create new section_viewed event 2024-01-31 12:54:06 +01:00
Sara Arjona
8b36abdb9d
Merge branch 'MDL-80259-main' of https://github.com/roland04/moodle 2024-01-24 09:16:12 +01:00