222 Commits

Author SHA1 Message Date
Ilya Tregubov
bc6416908d Merge branch 'MDL-73370-master' of https://github.com/peterRd/moodle 2022-02-16 12:52:49 +02:00
Peter Dias
240da1b186 MDL-73370 contentbank: Update behat tests 2022-02-16 17:49:00 +08:00
Mihail Geshoski
4a9c83ac9e MDL-73532 navigation: Modify methods that extend the setting nav
Introduces some changes to the exising _extend_settings_navigation()
methods that utilize the global $PAGE object. In order to accomodate
the changes done for the secondary navigation for single activity
courses, the methods that extend the settings navigation can no longer
rely on the $PAGE object, instead the more reliabe way to obtain this
infomation is through the get_page() method from settings_navigation
class.
2022-02-14 09:40:27 +08:00
Eloy Lafuente (stronk7)
3bb4a4009c MDL-73764 tool_xmldb: Regenerate all the files detected by the report
Note that, instead of going one by one to them from the XMLDB Editor
(load, makes some tiny change, save, revert the change, save), the
report includes a commented line that, once uncommented, does regenerate
the file while reporting.

I've left it there as a commodity for the developer.
2022-02-08 19:25:03 +01:00
Jake Dallimore
041b1beb46 Merge branch 'MDL-73347-master' of https://github.com/sarjona/moodle 2022-01-24 13:40:57 +08:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Sara Arjona
53fe23d8b5 MDL-73347 behat: Add blocks hidden by default for boost
For the boost them, a few themes have been hidden by default.
The unaddable setting should be set to let admins add them again,
because some behat tests need them.
2022-01-14 13:08:48 +01:00
Paul Holden
c7a62a8c82 MDL-72573 mod_h5pactivity: tighter validation of external sort param.
Restrict external method $sortorder parameter to limited subset of
values.
2022-01-11 14:34:16 +01:00
Sara Arjona
09d3e88c48 NOBUG: Fixed SVG browser compatibility 2021-12-23 16:29:57 +01:00
Jun Pataleta
80c17cd2a0 Merge branch 'MDL-72701-master' of https://github.com/andrewnicols/moodle 2021-12-23 12:10:46 +08:00
Shamim Rezaie
dacfebedf3 Merge branch 'MDL-73348' of https://github.com/stronk7/moodle 2021-12-22 21:19:52 +11:00
Andrew Nicols
3a70983d53 MDL-72701 unit tests: Generate default coverage 2021-12-21 09:24:00 +08:00
Bas Brands
f2ddd23ec1 MDL-71457 theme_boost: activity icon styling 2021-12-20 15:02:24 +01:00
Bas Brands
5958c0df0c MDL-71457 theme_boost: replace all activity icons 2021-12-20 09:24:19 +01:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00
Ilya Tregubov
16a7c3a698 Merge branch 'MDL-72413-master-dec13' of https://github.com/peterRd/moodle 2021-12-13 09:35:14 +02:00
Peter Dias
88983eef99 MDL-72413 h5p: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Ilya Tregubov
6f44f008d8 Merge branch 'MDL-73278' of https://github.com/stronk7/moodle 2021-12-10 18:51:40 +02:00
Mihail Geshoski
e00da7e884 MDL-72287 behat: Update behat tests 2021-12-09 23:47:57 +08:00
Eloy Lafuente (stronk7)
deb0e76eee MDL-73278 phpunit: Rename already namespaced classes to match file name
These are the only cases 100% safe to apply the renaming of the
testcase class names to match the file names.

All other cases are not safe, because they are missing namespace
and may enter into name conflicts. Adding namespaces is not as
simple as imagined because it implies to, also, add a good number
of modifications to core. See the issue for more details.
2021-12-07 23:54:29 +01:00
Mathew May
b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
Mihail Geshoski
d1c9c65e53 MDL-71913 mod_h5pactivity: Update behat tests 2021-10-13 11:05:30 +08:00
Mihail Geshoski
3e97273b21 MDL-71913 mod_h5pactivity: Add attempts report setting node 2021-10-13 11:05:29 +08:00
Peter
7a9e3db9dc MDL-52206 completion: Behat test
Co-authored-by: aanabit
2021-10-07 10:17:25 +08:00
Mihail Geshoski
7d821080f0 MDL-72093 navigation: Update behat tests 2021-09-14 12:02:35 +08:00
Andrew Nicols
891d1bfad3 MDL-71055 behat: Update core settings to use generator
These changes have only been applied to settings which were already
using settings names and values, but which were still using the UI.
2021-08-23 12:23:03 +08:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Sara Arjona
692abf2c46 MDL-71885 core_h5p: Display the edit content button
A new parameter has been added to the display method, to define whether
the edit button should be displayed or not.
The H5P activity will display this button (if the user has the required
permissions). However, it won't be displayed when previewing H5P in the
content bank.
2021-07-05 10:56:13 +02:00
Ilya Tregubov
bbfb73afbd MDL-68394 h5pactivity: Limit query to given course module. 2021-05-27 12:08:28 +02:00
Ilya Tregubov
045c3ec3ee MDL-68394 h5pactivity: Implement methods to display recent
activity info.
2021-05-26 06:54:34 +02:00
David Mudrák
ad30fde448 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 17:45:18 +02:00
Ilya Tregubov
cf1cf222e7 MDL-66431 core: Fix behat tests.
Move activity creation to data generators. Only fixing those
tests failing due to removing usemodchooser preference.
2021-05-01 16:22:03 +02:00
Sara Arjona
1aa318d3e0 Merge branch 'MDL-71162-master-2' of git://github.com/mickhawkins/moodle 2021-04-29 17:27:20 +02:00
Michael Hawkins
a74f47af90 MDL-71162 mod_h5pactivity: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Andrew Nicols
7eb248c27b MDL-70909 mod_h5pactivity: Whitespace fix 2021-04-28 10:25:36 +08:00
Ferran Recio
9a11eab790 MDL-70909 mod_h5pactivity: fix reports on freeze context 2021-04-27 15:35:57 +02:00
Sara Arjona
e82e8b4b1c Merge branch 'MDL-71337-master' of git://github.com/junpataleta/moodle 2021-04-15 08:30:08 +02:00
Jun Pataleta
18ad675111 MDL-71337 mod_h5pactivity: Increase window size during test
The addition of the activity information moves the h5p content down
out of the window view on Firefox which causes the Check button to be
unclickable. This patch increases the window size to ensure that the
check button is visible and clickable.

Credits to Eloy <stronk7@moodle.org> for the thorough investigation
of the root cause of this issue :)
2021-04-15 12:44:31 +08:00
Andrew Nicols
c10791cab9 Merge branch 'MDL-71169-master-execute' of git://github.com/mudrd8mz/moodle 2021-04-14 08:35:07 +08:00
Jun Pataleta
16a9e8ada7 MDL-71161 mod_h5pactivity: Display activity information output component 2021-04-13 01:21:12 +08:00
David Mudrák
22ecf2f9b8 MDL-71169 external: Do not explicitly specify the default methodname 2021-03-22 15:56:46 +01:00
Ferran Recio
b08381b212 MDL-70980 mod_h5pactivity: fix review mode 2021-03-22 10:52:44 +01:00
Eloy Lafuente (stronk7)
9fd6ac7c9d MDL-71036 phpunit: xml config - switch coverage info to new includes
This applies the "whitelist" => "include" changes to all the core
phpunit_coverage_info occurrences, so core won't emit any deprecation
warning (see previous commit).

At the same time, modified a bunch of comments in coverage files
to be more readable/understandable.
2021-03-11 23:04:32 +01:00
Eloy Lafuente (stronk7)
8a14a7bd22 MDL-71036 phpunit: assertContains() now performs strict comparison
The methods assertContains() and assertNotContains() now perform
strict (type and value) comparison, pretty much like assertSame()
does.

A couple of new assertContainsEquals() and assertNotContainsEquals()
methods have been created to provide old (non-strict) behavior, pretty
much like assertEquals() do.

Apart from replacing the calls needing a relaxed comparison to those
new methods, there are also a couple of alternative, about how to
fix this, depending of every case:

- If the test is making any array_values() conversion, then it's better
  to remove that conversion and use assertArrayHasKey(), that is not
  strict.
- Sometimes if may be also possible to, simply, cast the expectation
  to the exact type coming in the array. I've not applied this technique
  to any of the cases in core.

Link: https://github.com/sebastianbergmann/phpunit/issues/3426
2021-03-11 23:04:31 +01:00
Sara Arjona
40720df008 Merge branch 'MDL-68721-master' of git://github.com/ferranrecio/moodle 2021-03-03 17:51:16 +01:00
Ferran Recio
fe3ee4a066 MDL-68721 mod_h5pactivity: report acceptance tests 2021-03-03 17:21:56 +01:00
Andrew Nicols
cffeb4b797 MDL-69259 h5pactivity: Whitespace fix 2021-02-22 12:19:18 +08:00
Ilya Tregubov
82433c0b6a MDL-69259 h5pactivity: Add get_user_attempts webservice 2021-02-19 16:07:51 +02:00
Andrew Nicols
243262d940 MDL-68853 mod_h5pactivity: Whitespace fix 2021-02-17 12:02:53 +08:00
Ilya Tregubov
4795b09f23 MDL-68853 h5pactivity: Add a websevice to trigger report_viewed event. 2021-02-12 15:49:05 +02:00