Commit graph

27988 commits

Author SHA1 Message Date
Tomo Tsuyuki
0570323dab MDL-70525 tool_profiling: Cannot import profiling file
Change type from int to integer to be able to have big numbers
2021-02-09 10:15:48 +11:00
Andrew Nicols
17c85b704c Merge branch 'MDL-70614-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-08 10:36:15 +08:00
Andrew Nicols
340bd2726a Merge branch 'MDL-70725-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2021-02-08 10:30:28 +08:00
Tim Hunt
cfcfaba862 MDL-70796 count_words: match the count from LibraOffice & MS Word 2021-02-05 15:28:34 +00:00
Amaia Anabitarte
582f636756 MDL-70732 behat: Adding second parameter to ExpectationException() 2021-02-05 11:01:38 +01:00
Andrew Nicols
b1cf84453d Merge branch 'MDL-69748-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2021-02-04 11:52:21 +08:00
Shamim Rezaie
e0f895ea8e MDL-69748 core: Fix hideif issue with array elements
Changed the element selector to get all array elements,
whether named or unnamed. The previus selector was only
working for elements that thir names were like name="something[]".
It was not working for name="something[a]" elements.
2021-02-04 14:38:53 +11:00
Andrew Nicols
975c9f7a82 Merge branch 'MDL-70579-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-04 09:30:20 +08:00
David Mudrák
1d32d1d64f MDL-70631 files: Replace hard-coded value with FL_ENC_RAW constant
This is not related to the issue but I noticed it while trying to debug
it.

Back when this line was introduced in 9c140a681e, the ZipArchive had
not yet exposed this flag as a constant. It was added later with PHP
7.0.8 and we can switch to using it now.
2021-02-03 16:10:28 +01:00
David Mudrák
31f71d93b9 MDL-70631 files: Fix performance of zip_packer::extract_to_pathname()
The original implementation was based on ZipArchive::getStream() which
turns out to be very slow and if the archive contains many files, the
unzipping performance is very slow.

The patch changes the implementation to use ZipArchive::extractTo()
unless the extracted entry path contains a folder name ending with dot
(such as some/path./to/file.txt). There is a known upstream bug in the
PHP ZIP extension #77214 (also #74619 and #69477) so that we fall back
to keep using the stream in those cases.
2021-02-03 16:10:28 +01:00
David Castro
6c4989dca7 MDL-69562 admin: Allow getting IP from all sources. 2021-02-03 07:22:48 -05:00
Eloy Lafuente (stronk7)
656fc5e11b Merge branch 'MDL-70711-M310' of git://github.com/kordan/moodle into MOODLE_310_STABLE 2021-02-03 13:04:11 +01:00
Sara Arjona
fec01c3415 Merge branch 'MDL-70163-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-02-03 12:25:41 +01:00
Sara Arjona
4a1748a0d8 Merge branch 'MDL-70288-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2021-02-02 07:59:42 +01:00
Jun Pataleta
72c7ab1fcd MDL-70288 core: Remove duplicate labels for checkbox elements
* If there's a label, the text will serve as the description of  the
element.
2021-02-02 14:21:57 +08:00
Eloy Lafuente (stronk7)
120ab864a1 Merge branch 'MDL-46256_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-02-01 23:20:23 +01:00
Eloy Lafuente (stronk7)
4be8f22e59 Merge branch 'MDL-70648-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE 2021-02-01 19:19:46 +01:00
Paul Holden
e2d9c997d5 MDL-70614 user: consistent roles spacing in course profile. 2021-02-01 07:54:21 +00:00
Andrew Nicols
a7d8af4a9e MDL-70734 behat: Increase the WebDriver Curl timeout 2021-02-01 09:50:08 +08:00
Jake Dallimore
629905943f Merge branch 'MDL-66979-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-01-29 15:44:01 +08:00
Andrew Nicols
9cb46e24f2 MDL-66979 behat: Add a step to set a timeout factor for a test 2021-01-29 14:18:54 +08:00
Eloy Lafuente (stronk7)
0db430c5a7 MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-29 14:18:46 +08:00
Eloy Lafuente (stronk7)
219694730c MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-28 17:12:15 +01:00
Eloy Lafuente (stronk7)
d2a001ed67 Merge branch 'MDL-66979-310-7' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2021-01-28 09:09:01 +01:00
Kordan
1f6f68ad16 MDL-70711 form: deleted useless if block
get_magic_quotes_gpc() always return false since PHP 5.3 so (1 == get_magic_quotes_gpc()) is never verified.
This allows me to safetly delete what I dropped out.
2021-01-28 08:45:36 +01:00
Andrew Nicols
3a0d042395 MDL-66979 behat: Set script timeout with timeout factor 2021-01-28 15:27:49 +08:00
Andrew Nicols
ebd36d2ac2 MDL-66979 behat: Handle driver stop failure properly
An case was found where the webdriver stop() call could fail in an
AfterScenario hook, leading to a complete rerun if no other errors were
experienced.
2021-01-28 15:07:52 +08:00
Sara Arjona
c856a7f9bb MDL-70725 oauth2: move expectException to separate method 2021-01-27 17:54:17 +01:00
Víctor Déniz
b6aed6feaa Merge branch 'MDL-70585-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-27 10:52:31 +00:00
Paul Holden
92d60b64a8 MDL-70163 core: fix attachment validation when localrequestdir absent.
Switch the order of operations performed when collating list of paths
from which a user can include attachments.

First collect all normalised/absolute paths then filter empty entries,
which fixes an issue where $CFG->localrequestdir could be defined but
not exist. This would lead to an empty string being passed to strpos
which triggered a PHP warning.

Co-authored-by: Peter Burnett <peterburnett@catalyst-au.net>
2021-01-25 19:53:53 +00:00
Andrew Nicols
058394a412 MDL-66979 behat: Warn about old behat.yml file location 2021-01-23 20:44:53 +08:00
Paul Holden
52bc8499aa MDL-70585 course: deeper clean of path names in course export.
This fixes an issue on those systems that don't fully support unicode
characters within zip structures, which subsequently led to broken
links when browsing downloaded course content.
2021-01-22 08:15:32 +00:00
Andrew Nicols
ef4a652abe MDL-66979 behat: Rename and warn on old config 2021-01-22 14:52:14 +08:00
Andrew Nicols
ce30baea59 MDL-66979 behat: availability field extends textarea
The availability behat field extends the textarea type, and therefore
needs to include this type.
2021-01-22 14:52:13 +08:00
Andrew Nicols
c56395fba6 MDL-66979 behat: Improve chromeOptions configuration
Simplify the chromeOptions configuration to improve readability.
2021-01-22 14:52:13 +08:00
Andrew Nicols
767c5f4512 MDL-66979 behat: Remove unused var 2021-01-22 14:52:13 +08:00
Andrew Nicols
73e428979d MDL-66979 behat: Whitespace fix 2021-01-22 14:52:13 +08:00
Andrew Nicols
cbb2547c32 MDL-66979 behat: Remove manually triggered events
Behat should not trigger Synthetic browser events. It is incorrect to do
so as the UI should be used to trigger events correctly.

The W3C WebDriver specification explicitly states when and where these
events will be triggered from (the browser) and therefore there is no
ambiguity and no need to synthetically trigger them from Behat.
2021-01-22 14:52:13 +08:00
Andrew Nicols
035d4eb72a MDL-66979 behat: Scroll nodes into view before hover
The W3C Specification does not require that a NodeElement be in the
current viewport before triggering a mouseOver. As a result the
mouseOver will generate an Exception because the element is not in the
viewport, and the X/Y co-ordinates are invalid.

To handle this the node is scrolled into view.
2021-01-22 14:52:13 +08:00
Andrew Nicols
eec766f375 MDL-66979 behat: Fix window switching
Normalise switching of window contexts by setting the main window name
to a null.

Where the window has no name (null/empty), then the root context is
selected.
2021-01-22 14:52:13 +08:00
Andrew Nicols
d1e52f7086 MDL-66979 behat: Update passwordunmask form field control
Update the passwordunmask form field type for behat to interact with the
form element as a human would rather than via synthetic event triggers.
2021-01-22 14:52:13 +08:00
Andrew Nicols
330b665f82 MDL-66979 behat: iFrames must have a name for switchTo
The W3C WebDriver protocol supports switching of contexts using a named
context, and not the class asscoiated with that context.
2021-01-22 14:52:13 +08:00
Andrew Nicols
ca2acd10c9 MDL-66979 behat: Handle JS on elements better
This change introduces a new function to execute Javascript directly on
a node.

This should not, ordinarily, be used directly by steps, but may be
required in other parts of the Behat interaction.
2021-01-22 14:52:13 +08:00
Andrew Nicols
863d68a344 MDL-66979 behat: Rename selenium config to webdriver
The PHP WebDriver Mink Driver does not necessarily require Selenium. It
supports Selenium 3 upwards, and can be used directly with ChromeDriver,
EdgeDriver, SafariDriver, GeckoDriver, and others.

It therefore uses a slightly different configuraitno path.
2021-01-22 14:52:13 +08:00
Andrew Nicols
c816ca79fa MDL-66979 behat: Core updates for W3C WebDriver
This commit updates core Behat features to make use of the
php-webdriver/webdriver library instead of the legacy Instaclick
library.

Most of these changes relate to use of features of WebDriver which we
are required to use directly rather than through the Mink Driver.
2021-01-22 14:52:13 +08:00
Tim Hunt
8321e49c8a MDL-46256 count_words: fix handling of paragraphs 2021-01-21 09:54:36 +00:00
Tim Hunt
509eef8fcf MDL-46256 count_letters: an unit tests and fix HTML editity handling 2021-01-21 09:54:36 +00:00
Tim Hunt
cb9c2320b6 MDL-46256 word count: Convert existing tests to a data provider 2021-01-21 09:54:36 +00:00
Simey Lameze
8e6cbc6e18 MDL-70648 calendar: upgrade step to delete wrong cat events 2021-01-20 09:28:54 +08:00
Sujith Haridasan
cbc2b593e7 MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:06:19 +05:30