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
Since PHP 7.0 the random_bytes() is nativley available and Moodle
LMS requires greater than PHP 7, the native PHP funciton can be
used exclusively. Deprecating random_bytes_emulate.
Issue MDL-73325 added the option to tag badges, however
it introduced a dynamic property on the badge object.
In PHP 8.2 dynamic properties are deprecated, this patch
fixes this.
Many times the action menu item triggers modals to show more information
to the user. In most cases this is enough, however, a modal will close
the menu and the user is not able to see the modal content in the page
context. To solve this now menus can define subpanels that are displayed
next the the menu item when the item is focused or hover. This will be
used to group options like the group mode in activities or to replace
the adhoc solution implemented to select language in the user menu.
Drawers have several JS logic depending on the screen size. However,
some generic components like action menu subpanels require fake drawers
to test the behaviour when it is displayed in a drawer (for example in a
block). This patch allow a behat page to have a div with data-region as
fixed-drawer so the component can detect as it is inside a a drawer but
without the autoclose on small screens.
The choicelist output class is designed to represent a user choice in
several formats like a dropdown or subpanel. In general, other
components are free to render the choice in its own way. However, to
simplify the logic the choicelist now provide a default template to be
used in any div or panel.
Add a new global module to get information from the page. Some methods
are just local functions moved to as a global library. For example, the
drawers isSmall or isLarge to detect the page width. The other funcionts
added are to detect focusable elements and they are needed to loop on
elements, especially when accessibility keyboard navigation is implemented.
This bumps direct dependencies to current ones:
- phpunit: 9.5.x No updates here, there is the 9.6.x series
available but a lot of deprecation warnings have been
introduced there without any alternative to use. See:
- https://github.com/sebastianbergmann/phpunit/issues/5160
- https://github.com/sebastianbergmann/phpunit/issues/5062
- ...
While that will be handy to prepare ourselves to PHPUnit 10
in some months... we cannot force everybody to jump to 9.6.x
because that will make a lot of tests to start emitting
warnings.
So we stay with PHPUnit 9.5.x for the life of this branch.
- mink-phpwebdriver: 1.2.1 No updates here, just changed the
constraint because we cannot advance to 1.3.x yet, there is
a change there causing some app tests to fail. See:
- https://github.com/oleg-andreyev/MinkPhpWebDriver/pull/81
So we stay with 1.2.x until that issue is fixed/clarified,
only then we'll review the status.
- behat: 3.12.x => 3.13.x
And also, automatically, a bunch of 2nd and deepest dependencies.
Generated with php80 that is the lowest php version supported
by this branch and, also, by some of the dependencies, as per
documented @ https://moodledev.io/general/development/tools/composer
Worth mentioning behat/mink-goutte-driver, that we should move
to mink-browserkit-driver, but that's out from this issue scope.
PHP 8.2 has deprecated setting properties on objects dynamically.
The qtype_calculatedmulti question type had two properties being
set this way($correctanswerlength and$correctanswerformat).
This patch extends the question_answer class to add the properties
when the object is instantiated.
The boost theme makes the TinyMCE editor rendered in a scrollable container,
scrolling the editor’s container will cause TinyMCE UI elements to be detached from the anchor.
Therefore, to keep the tinyMCE menu in the correct position,
adjustments must be made on the page drawers style.
When using TinyMCE editor in Safari browsers, a problem may occur where the dialogue
windows (such as modal dialogs) overlap with page drawers due to a specific behavior
in Safari's rendering. This function addresses the issue by adjusting the CSS overflow
property of the page drawers, ensuring they do not obscure the dialogue windows.
Add code formatting (indenting) as well as code style (tag color)
via a TinyMC plugin. To make it easier to make code edits when
viewing the editor content in source code view.
* Using the generator to create the forum discussions, the timecreated
of a discussion can be set before the user's last course access which
will prevent forum_print_recent_activity() from including this generated
discussion in the recent activity results. To work around this, generate
the forum discussion 1 second after the current time to make sure that
the user's last course access will always be before the discussion's
creation time.
* This patch also includes some optimisations by:
- Removing the unnecessary @javascript tag for the
`Time limit expires` scenario
- Bringing the discussion generation to each scenario to allow each
scenario to customise the data passed to the generator like for the
`Time limit expires` scenario.
- Navigating directly to the forum instance.