580 Commits

Author SHA1 Message Date
Trisha Milan
e52fbd2f84 MDL-66151 Performance: Session Manager modularisation
Storage of session metadata has moved into the session handler class.
This allows for other classes to fully control session handling and
removes the dependancy on the core sessions database table.

Previously, the standard method of interaction with the
session metadata was direct DB calls; this may break other plugins as there
are now proper APIs available through the session manager.

Co-authored-by: Darren Cocco <moodle@darren.cocco.id.au>
Co-authored-by: Trisha Milan <trishamilan@catalyst-au.net>
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2024-09-03 13:04:04 +10:00
Huong Nguyen
bb8037c457
Merge branch 'MDL-80747-main' of https://github.com/rezaies/moodle 2024-08-26 10:05:06 +07:00
Jake Dallimore
e67475802b
Merge branch 'MDL-82787-main' of https://github.com/andrewnicols/moodle 2024-08-23 11:51:09 +08:00
Shamim Rezaie
61758ac21c MDL-80747 behat: Implement matches() for behat_form_select_menu
So that we can have steps like:
  And the field "Status" matches value "Not submitted"
2024-08-23 01:29:49 +10:00
Sara Arjona
c77a0dad13
MDL-82212 behat: Display error when deprecated icons are found
A check for deprecated icons has been integrated into Behat tests.
This check can be disabled by adding the --no-icon-deprecations flag
to the Behat initialization command.
2024-08-21 07:05:14 +02:00
Andrew Nicols
0ec18c2381
MDL-82787 behat: Correct stop of webdriver on failure 2024-08-21 08:43:04 +08:00
Huong Nguyen
dca18ebca3
Merge branch 'MDL-81634-main' of https://github.com/andrewnicols/moodle 2024-08-20 09:30:44 +07:00
Sara Arjona
7e0bd1b12b
Merge branch 'MDL-82619-main-cr' of https://github.com/ferranrecio/moodle 2024-08-19 12:08:19 +02:00
Sara Arjona
fbdc1ea1ad
Merge branch 'MDL-81667' of https://github.com/paulholden/moodle 2024-08-19 07:50:02 +02:00
Amaia Anabitarte
ca3c2c46e8 MDL-82619 core_course: Subsections in hidden sections should be hidden 2024-08-16 14:33:43 +02:00
Paul Holden
19f519f155
MDL-81667 libraries: upgrade to version 4.10.0 of axe-core. 2024-08-15 10:23:22 +01:00
Andrew Nicols
149b548c91
MDL-82782 behat: Support runtime scaling of Behat windows 2024-08-14 21:48:15 +08:00
Andrew Nicols
024e36be17
MDL-81634 core: Fix all implicitly defined nullables
Note: This does not impact third-party libraries.
2024-08-02 14:11:12 +08:00
Huong Nguyen
8af49acc2d
Merge branch 'MDL-82527' of https://github.com/paulholden/moodle 2024-07-25 10:48:24 +07:00
Jun Pataleta
cd7f94612c
Merge branch 'MDL-82373-main' of https://github.com/andrewnicols/moodle 2024-07-25 11:31:53 +08:00
Conn Warwicker
b92886ad59
MDL-70854 core: Add stored progress bars.
- Alters existing progress_bar class to support extension
    - Adds stored_progress_bar class as child of progress_bar
    - Adds webservice to poll stored progress
    - Updates database tables
    - Bumps version
    - Adds unit/behat tests
2024-07-23 17:58:53 +08:00
Paul Holden
83db25c330
MDL-82527 h5p: improve editor Behat scenarios for embedding content.
* Move the shared drag fixture out of the Atto plugin;
* Switch to using faster generators for populating private files;
* Clarify required fields for private files generator
2024-07-18 09:15:51 +01:00
Andrew Nicols
4033f08fa9
MDL-82373 behat: Stop killing the entire Behat run on driver error
If there's a driver error, for example from a step taking too long, then
this kills the entire Behat run and we have to start from scratch.

This change instead throws away the original connection and starts a new
one to try and continue the test.
2024-07-17 09:28:34 +08:00
Andrew Nicols
57cabed4bb
MDL-82373 behat: Stop calling ensure_node_is_visible before click
W3C WebDriver Element::Click, Element::Clear, and Element::SendKeys all
state that the WebDriver implementation (chromedriver, geckodriver,
edgedriver) should scroll the element into view if it is not already
visible.

It is wrong for us to check if the element is visible or not before
calling these as it may not be but will during the click/clear/type
event.
2024-07-17 09:28:34 +08:00
Laurent David
7bf85150b9 MDL-77665 core_h5p: Allow deployment if user has been deleted
* If user has been deleted we consider that the content can be deployed
by a user who can deploy other packages
* Add behat test to cover for this use case
* Fix the content bank generator as it was failing to upload the content
as the given user
2024-06-17 06:31:18 +02:00
info@eWallah.net
ab37e1e397 MDL-80972 behat: Behat check_server_status can provide better info. 2024-05-08 21:48:40 +02:00
Mathew May
e4083441ec MDL-78885 core_user: A11y fixes for user combobox search
Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2024-03-22 03:26:19 +11:00
Mikel Martín
9733ccc381 MDL-81188 form: Fix password element layout
MDL-75670 generated a regression in forms password element layout that was not
being displayed in a single line as before.

- Modify the password element template to display the input and the password
unmask icon in a single line.
- Change the password unmask button styles to be consistent with other
focus states.
- Modify passwordunmask behat form field to work with the new password element
layout changes.
2024-03-18 09:19:35 +01: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
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
Huong Nguyen
3f2b136249
Merge branch 'MDL-80862-main' of https://github.com/andrewnicols/moodle 2024-02-22 10:35:59 +07:00
Andrew Nicols
becd11a84a
MDL-80862 testing: Reset task manager between behat tests 2024-02-20 10:54:12 +08:00
Jun Pataleta
f47baadc93
MDL-79674 behat: Bump axe-core to v4.8.4
* Improve readme_moodle.txt and add more detailed instructions
* Update \behat_accessibility::run_axe_validation_for_tags()'s
  PHPDoc block to reflect the current version.
* Fix incorrect copyright tag for the library
2024-02-16 11:53:52 +08:00
Andrew Nicols
9ed3f83dd2
MDL-80072 core: Add \core\di wrapper to php-di
The \core\di class is a Moodle wrapper to php-di which is intended to
allow Moodle to switch to an alternate DI solution in the future if
required. All interaction with the container uses the PSR-11 Container
interfaces, which allows for normalisation of configuration, setting,
and retrieving of DI container-identified classes.
2024-02-12 11:11:16 +08:00
Jun Pataleta
53e5c0da37
Merge branch 'MDL-80784-main' of https://github.com/noeldemartin/moodle 2024-02-08 15:31:59 +08:00
Paul Holden
662c5e1d31
MDL-75081 behat: define new heading named selector.
Co-authored-by: Jun Pataleta <jun@moodle.com>
2024-02-06 17:06:47 +00:00
Noel De Martin
a916c21c0c MDL-80784 behat: Disable SSL checks for app initialization 2024-01-31 14:05:20 +01:00
Tim Hunt
60d9adf0f2 MDL-79835 behat_core_generator: remove misleading error obfuscation 2023-12-06 18:11:48 +00:00
Sara Arjona
ff518d3e71
Merge branch 'MDL-77581-master' of https://github.com/dpalou/moodle 2023-11-13 17:19:02 +01:00
Mikel Martín
c9c3a34bf1 MDL-78334 behat: Make SCSS deprecation check optional 2023-11-09 13:42:21 +01:00
Mikel Martín
eab94ea4c8 MDL-78334 core: Add a mechanism to deprecate SCSS code 2023-11-09 13:42:18 +01:00
Dani Palou
869de41ab2 MDL-77581 behat: Support finish_generate_ in generators 2023-11-08 10:15:36 +01:00
Sara Arjona
cc9430929d
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:30:19 +02:00
Sara Arjona
bd22b04d30
Merge branch 'MDL-78257' of https://github.com/paulholden/moodle 2023-08-24 17:26:57 +02:00
Eloy Lafuente (stronk7)
731f64226d
MDL-78934 behat: Replace all the rest of goutte by browserkit
Basically all them are comments.

Only remaining occurrence remaining is
in composer.lock file, because friends-of-behat/mink-extension
still has the old goutte as dev requirement, but that doesn't
affect us at all (no goutte is installed anymore, see the vendor
directory and/or the lock file).
2023-08-18 13:59:17 +02:00
Eloy Lafuente (stronk7)
7d37b29248
MDL-78934 behat: Move to BrowserKit in extension and other custom code 2023-08-18 13:59:17 +02:00
Paul Holden
8bfa8e35e9
MDL-78257 libraries: upgrade to version 4.7.2 of axe-core. 2023-08-09 08:55:16 +01:00
Jun Pataleta
1be10f4249
Merge branch 'MDL-77991' of https://github.com/Chocolate-lightning/moodle 2023-08-03 10:23:24 +08:00
Mathew May
a4b3b0d044 MDL-77991 core: Move tertiary search dropdown component 2023-08-03 09:07:18 +08:00
Andrew Nicols
01a1210954 MDL-78289 courseformat: Amend behat tests to reduce test overheads 2023-08-01 09:45:47 +02:00
Ferran Recio
01e0e56665 MDL-78282 core_courseformat: interactive visibility badges 2023-07-26 15:44:28 +02:00
Andrew Nicols
dff354bb4f
MDL-78673 grade: Switch test to use generators 2023-07-10 11:21:15 +08:00
Eloy Lafuente (stronk7)
dc0869fc12
MDL-78570 behat: Remove the skip-passed legacy option
This option (--skip-passed) was implemented because of some bugs in the initial
versions of Behat 3 with the --rerun option.

After Behat 3.2.0 those bugs were fixed and we switched back to use
the upstream --rerun option, abandoning --skip-passed.

More yet, this option wasn't ever documented much, neither in docs or cli.

So it's time to remove it, one less thing to maintain for nothing.

Note that this commit is a 99.99% revert of the original one that was
applied to the moodle-behat-extension (now in core):

https://github.com/moodlehq/moodle-behat-extension/commit/c4b25158d212509b
2023-06-24 19:28:51 +02:00
David Woloszyn
a183677a87 MDL-75913 behat: Private files data generator 2023-06-19 16:35:46 +10:00