222 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
1093256560
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 12:18:04 +02:00
Angelia Dela Cruz
8a60437bea MDL-79838 mod_h5pactivity: Behat for H5P activity grade settings control 2024-05-15 14:33:21 +08:00
Angelia Dela Cruz
a548bccf18 MDL-79851 mod_h5pactivity: Behat for h5p activity access control 2024-05-01 14:26:10 +08:00
Jun Pataleta
8b976e77ce MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-23 15:24:02 +10:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Andrew Nicols
554e491b6f
Merge branch 'MDL-80028-h5p_caps' of https://github.com/leonstr/moodle 2024-04-05 11:55:54 +08:00
Leon Stringer
29c92d976d MDL-80028 mod_h5pactivity: teacher reviewattempts
By default grant mod/h5pactivity:reviewattempts to non-editing teacher
role.  This is already granted to this role's archetype.

PHPUnit test also updated as presumably non-editing teachers should
not be returned by get_active_users_join() if they have
mod/h5pactivity:reviewattempts.
2024-04-04 16:19:24 +01:00
Sara Arjona
1ce75e7278
Merge branch 'MDL-80754-main' of https://github.com/laurentdavid/moodle 2024-04-04 12:44:40 +02:00
Laurent David
03f84bdaba MDL-80754 mod_h5pactivity: Improve attempt report
* Show the total number of attempts in the column header
* Display a simplified link label to view the actual attempts
2024-04-04 10:30:45 +02:00
Andrew Nicols
8d472234f8
NOBUG: mod_h5pactivity - Version bump after rewrite 2024-04-04 10:36:04 +08: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
Andrew Nicols
9cdc5850c5
Merge branch 'MDL-75952' of https://github.com/stronk7/moodle 2024-03-12 10:45:02 +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
Luca Bösch
181bfa417b MDL-73120 mod_h5pactivity: Precisely define the "grade" lang string.
AMOS BEGIN
 MOV [grade_h5p,mod_h5pactivity],[gradenoun_h5p,mod_h5pactivity]
AMOS END
2024-03-08 13:35:45 +01:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08: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
Sara Arjona
ec8f84d8af
MDL-79543 h5p: Include attempts info and link
Co-authored-by: Ferran Recio <ferran@moodle.com>
2024-02-23 15:42:16 +01:00
Sara Arjona
6e8d1454ba
MDL-79543 h5pactivity: Remove review_all_attempts string
This string became obsolete in Moodle 4.0 due to changes in course
navigation. Since then, it has remained unused and can now be safely
removed, as it is unlikely to be needed in the future.
2024-02-23 07:29:55 +01:00
Huong Nguyen
3d36a37499
NOBUG: Fixed SVG browser compatibility 2024-02-23 08:37:37 +07:00
Huong Nguyen
0d8c9ed4ae
Merge branch 'MDL-78284-main' of https://github.com/sarjona/moodle 2024-02-21 09:49:41 +07: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
10f8e19f40
MDL-78284 mod: Replace activity icons with the new SVGs
The old monocromo.png activity icon files have been removed and
replaced with the new SVG files created by the UX team.

Special thanks to Sabina Abellán! :-)
2024-02-15 17:49:41 +01:00
Simey Lameze
7b7be30b4d MDL-80613 behat: convert manual completion steps to use generators 2024-02-15 17:52:38 +08:00
Leon Stringer
662192fcec
MDL-80501 mod_h5pactivity: activity group mode
Respect activity's group mode when checking access to the report.
Previously only the course's group mode was checked.
2024-02-08 15:32:30 +08:00
Sara Arjona
6fb09beb86
MDL-69225 h5pactivity: Review when and which banners display
The UX team proposal is to display two different notifications, to avoid confusion:

1. When the user is in preview mode:
Message: 'You are in preview mode.'
Notification Type: Information (blue), with the information permanently visible and not dismissible,
ensuring continuous awareness.

2. When activity tracking is disabled:
Message: 'Attempt tracking is not enabled for this activity. You can enable it in Settings.'
Notification Type: Warning (yellow) with a close icon for dismissal if tracking is intentionally disabled.

These notifications should only be visible to teachers and content creators, not students.
If a teacher also has a student role, this information should not appear when logged in as a student.

That's why the pre-existing is_tracking_enabled() function has been updated to only check if tracking
is on for an activity, without considering user capabilities (that's why the $user parameter has been
removed from this function too). Besides, a new function called can_submit() has been created to find
out if users are allowed to submit an activity.
2024-01-25 17:46:36 +01:00
Jun Pataleta
10744550e6
Merge branch 'MDL-79029-main' of https://github.com/ferranrecio/moodle 2024-01-23 09:26:30 +08:00
Ferran Recio
f4adbc8a11 MDL-79029 behat: replace deprecated behat steps 2024-01-22 11:12:28 +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
Huong Nguyen
92f38b9cb5 Merge branch 'MDL-80452-main' of https://github.com/andelacruz/moodle 2024-01-11 10:44:01 +07:00
Angelia Dela Cruz
e27de1d44d MDL-80452 mod_h5pactivity: Behat for H5Pactivity duplication and delete 2024-01-11 11:17:51 +08:00
Simey Lameze
95da5a44a8 MDL-80340 behat: make query to fetch h5p attempts less strict 2024-01-09 16:13:55 +08:00
Jun Pataleta
04bc690557
Merge branch 'MDL-80221-main-enfix' of https://github.com/mudrd8mz/moodle 2023-12-04 16:12:07 +08:00
Helen Foster
de4f02d809 MDL-80221 lang: Import fixed English strings (en_fix) 2023-11-22 22:48:47 +01:00
Andrew Nicols
525212f2d2
MDL-78496 core: Address phpcs issues with upgrade.php files 2023-11-19 21:20:53 +08:00
Andrew Nicols
545b36cd4a
MDL-78496 upgrade: remove all the < 4.1.0 upgrade steps
Also includes an upgrade step to prevent upgrading from any
version < 2021112802 (v4.1.0) as anti-cheating measure.
2023-11-17 23:25:36 +08:00
Sara Arjona
cb4d9cdcb6
MDL-74129 h5p: Preserve metadata information
The metadata information was not restored when an H5P file was uploaded
(it was saved when it was edited directly from the Content bank, but the
original information in the H5P file was lost).
This patch includes all the metadata fields and its values in the original
H5P file to preserve this information too.
2023-11-10 10:33:06 +01:00
Angelia Dela Cruz
2888997710 MDL-79691 mod_h5pactivity: Behat coverage for H5P activity grades reset 2023-10-16 16:45:47 +08:00
Sara Arjona
7b83434dbf
Merge branch 'MDL-79626-master' of https://github.com/junpataleta/moodle 2023-10-10 15:13:02 +02:00
Jun Pataleta
9beff03a96
MDL-79626 upgrade: add the 4.3.0 separation line to all upgrade scripts 2023-10-10 10:44:17 +08:00
Laurent David
753909325d MDL-71414 mod_h5pactivity: Add a new "None" message
* In matching types of questions, sometimes the user does not answer all
questions. We now display "None" in the result report. The answer can
be either correct or incorrect.
* Fix "unknown" answer constant name.
2023-10-09 11:44:30 +02:00
Laurent David
830b19649e MDL-71414 mod_h5pactivity: Fix issue with drop down report
* Drag and Drop report were missing answers when target could be dropped on multiple
drop zones.
2023-10-09 11:44:29 +02:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Amaia Anabitarte
b87b72195c MDL-78527 core_completion: Fixing tests 2023-09-12 15:43:49 +02:00
Ferran Recio
174125dabc MDL-78291 core_courseformat: fix cm visibility behats 2023-08-22 09:39:13 +02:00
Angelia Dela Cruz
6385949078 MDL-78684 Behat: Replace gradebook navigation to use page resolvers
This commit also does other things such as:
- Replace manual steps to setup gradebook by data generators
- Added support for outcomes and scales page resolvers
- Behat clean up
2023-08-08 11:53:45 +08:00
Andrew Nicols
2b19f23665
Merge branch 'MDL-78158-master' of https://github.com/andelacruz/moodle 2023-07-05 10:23:32 +08:00
Angelia Dela Cruz
09d654b3fe MDL-78158 behat: Behat cleanup and optimisation 2023-07-04 07:01:27 +08:00
Angelia Dela Cruz
9f101a30b2 MDL-78158 Behat: Use data generators to add blocks 2023-07-03 17:41:21 +08:00