463 Commits

Author SHA1 Message Date
Andrew Nicols
5be481d1d0
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Huong Nguyen
7c98470586
MDL-82963 Tag: Improve validation for users tagged with sepecified tag 2024-12-05 11:03:37 +08:00
Andrew Nicols
3d51aed3e2
MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to
being static. These will be handled in a separate issue.
2024-11-19 09:30:51 +08:00
Paul Holden
d8e3c31b32
MDL-79801 tag: fix report entity flagged column/filter query.
The "flag" field isn't a boolean state (1/0), it's a cumulative
count of how many times the tag has been flagged by users. This
should be accounted for to ensure that column aggregation and
filtering performs correctly.
2023-10-20 14:22:29 +01:00
Sara Arjona
54d446ce43
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:57:33 +02:00
Simey Lameze
fc10598d63 MDL-69231 behat: remaining work for role capability generator
This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
2023-06-02 12:42:35 +08:00
Andrew Nicols
b67b10af29 MDL-69231 behat: Update tests to use new generator 2023-06-02 12:42:35 +08:00
Jun Pataleta
1753e85f1a MDL-75085 webservice: Fix parameter passed to external_format_value 2023-02-01 11:39:44 +08:00
Marina Glancy
a5f92c041e MDL-74853 various: add second parameter to htmlentities functions
Default value of the $flag argument changed in PHP 8.1 from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE
To ensure consistent behavior across different PHP version the second parameter is now required for the functions:
htmlspecialchars(), htmlentities(), htmlspecialchars_decode(), html_entity_decode() and get_html_translation_table()
2022-11-28 16:12:32 +01:00
Paul Holden
fd01461b7a MDL-75449 reportbuilder: add no tags/exclude tags filter operators.
Allow user to filter for elements that either contain no tags, plus
those that don't contain selected tags.
2022-10-14 16:04:37 +01:00
Paul Holden
31cccc6058 MDL-74635 tag: add select all/none tags for bulk actions. 2022-09-12 11:19:17 +01:00
Paul Holden
b40d438fbf MDL-75708 reportbuilder: consider stress tests as requiring longtest.
We should respect the value of the PHPUNIT_LONGTEST constant in the
report source stress tests, as it was discovered after 165e26fa that
the default configuration of some CIs (GHA) was not sufficient to run
them.

Hence, use the PHPUNIT_LONGTEST to determine whether to execute said
tests. Note this constant is enabled on internal CI.
2022-09-09 11:11:39 +01:00
Paul Holden
208adcf3d1 MDL-73938 reportbuilder: better Oracle support of long text columns.
Specifically during column grouping/aggregation, we need to avoid CLOB
datatype inconsistencies (ORA-00932).
2022-09-05 12:08:54 +01:00
Paul Holden
165e26fad9 MDL-73938 reportbuilder: helper methods for automating report tests.
Implement stress tester methods for iterating over report columns,
aggregation and conditions. Assert that each works correctly in
isolation, and when used in conjunction with other columns.
2022-09-05 12:07:17 +01:00
Paul Holden
0304508926 MDL-75245 reportbuilder: re-factor current tag elements to new entity.
Update previous implementation of tags (9ebd801c) in report sources to
use equivalent tag entity columns and filters.
2022-08-18 17:01:21 +01:00
Paul Holden
065b38f68d MDL-75245 tag: implement tags datasource for custom reporting.
Create entity definitions for collections, tags and instances for
new report source to provide data for the reportbuilder editor.
2022-08-18 16:54:54 +01:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Eloy Lafuente (stronk7)
caf55abf17 MDL-74413 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- 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:

- Moved to the level2 "privacy" namespace:
  - \mod_assign\privacy\feedback_legacy_polyfill_test
  - \mod_assign\privacy\submission_legacy_polyfill_test

- Moved to the level2 "task" namespace:
  - \core_message\task\migrate_message_data_test
  - \ltiservice_gradebookservices\task\cleanup_test
  - \message_email\task\send_email_test
  - \mod_lti\task\clean_access_tokens_test
  - \mod_workshop\task\cron_task_test

- Moved to the level2 "event" namespace:
  - \core_h5p\event\deleted_test
  - \core_h5p\event\viewed_test

- Renamed to a better name:
  - backup_forum_activity_task_test.php (missing "task")
2022-05-07 20:32:30 +02:00
Mihail Geshoski
8d0ca00e95 MDL-74386 navigation: Remove redundant set_secondary_navigation() calls
Removes $PAGE->set_secondary_navigation(false) calls which certain pages
were using to prevent displaying secondary navigation menu in the system
context. This logic is now generally handled within the secondary
navigation class.
2022-04-08 15:11:31 +08:00
Amaia Anabitarte
23b751d131 MDL-74420 core_tags: Remove secondary navigation from tags page 2022-04-04 14:24:42 +02:00
Sujith Haridasan
aa1c2e2382 MDL-73848 administration: Fix the breadcrumbs and nav highlights
Create or update the breadcrumbs in the site administration
pages where it is required.
Highlight the corresponding site adminstration tab.
Highlight the primary nav to Site administration when user
is navigating to any of the site administration pages.

Also changed the boostnavbar so that the nodes in the secondary
navigation are not shown in the breadcrumbs when user is in site
administration page.
2022-03-25 17:44:47 +08:00
Amaia Anabitarte
329586411d MDL-74131 tags: Fix flagged tags color contrast 2022-03-14 09:59:13 +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)
0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_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 lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +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
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
Eloy Lafuente (stronk7)
57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
All privacy_test and privacy_provider_test classes:

- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
2021-12-17 14:21:02 +01:00
Bas Brands
16c726cde7 MDL-71610 core_behat: use new edit mode step in feature files 2021-09-29 09:25:36 +02:00
Adrian Greeve
c3871a9174 MDL-70196 navigation: Update to pages to add a URL.
- Part of: MDL-69588
Some pages have added an item to the end of the  navbar without a
link for it. This adds the current page as a url to this navigation
node. Doing this brings it in line with all of the other pages
around Moodle and also helps with the new navigation changes in
theme boost.
2021-08-23 17:46:38 +08:00
Adrian Greeve
7d435fb5f2 MDL-70196 navigation: Update to feature files.
- Part of: MDL-69588
A lot of tests rely on the last element of the breadcrumb being
active. This updates feature files to not rely on this anymore.
2021-08-23 17:46:38 +08:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Andrew Nicols
0d580d2b3e MDL-67668 behat: Update tests for inplace editable field type 2020-11-23 09:01:19 +08:00
Andrew Nicols
ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Paul Holden
c1c4ae95f2 MDL-70126 tag: correct thrown exception class name. 2020-11-09 19:43:47 +00:00
Eloy Lafuente (stronk7)
f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Bas Brands
fb61341ca5 MDL-69454 core_search: consistent tag search 2020-09-21 11:54:51 +02:00
Michael Hawkins
e8632a4ad0 MDL-69340 tag: Correct the filter input HTML in the tag manager 2020-09-08 08:54:26 +02:00
Leon Stringer
fb4c20ee2c MDL-60492 core_tag: Fix title attribute
Attribute 'title' was specified inside a condition but closing `"` was
outside condition possibly resulting in <a href="..." class="..." ">.
Also moved </a> outside of condition to match <a>.
2020-08-05 12:52:09 +01:00
Andrew Nicols
47d094817f MDL-68409 behat: Fix tests from modal rewrite 2020-05-04 15:08:11 +08:00
Tim Hunt
1dcd0d3499 MDL-68233 renderers/block: remove illegal uses of $PAGE and $OUTPUT 2020-03-29 15:34:26 +01:00
Eloy Lafuente (stronk7)
6783adc239 MDL-67035 tags: fix nested ternary operators to be php74 compliant
Nesting ternary operators without explicit parentheses is deprecated:

    // Code like
    $a ? $b : $c ? $d : $e
    // should be replaced by (current interpretation)
    ($a ? $b : $c) ? $d : $e
    // or (likely intended interpretation)
    $a ? $b : ($c ? $d : $e)
2019-11-16 20:03:47 +01:00
Tim Hunt
7ba73d16a0 MDL-66553 tags: option to accesshide label when displaying a taglist 2019-10-09 13:26:12 +01:00
Marina Glancy
b8a5c8528a MDL-65428 core_tag: fix callback param type 2019-04-26 13:11:05 +02:00
Juan Leyva
86fd9277c2 MDL-64656 core_tag: New WebService core_tag_get_tag_cloud 2019-04-11 10:20:44 +02:00
Juan Leyva
87bdad57c4 MDL-64656 core_tag: New WebService core_tag_get_tag_collections 2019-04-11 10:20:44 +02:00
Juan Leyva
07a4883796 MDL-64656 core_tag: New WebService core_tag_get_tag_areas 2019-04-11 10:20:44 +02:00
Juan Leyva
f121889933 MDL-64656 core_tag: New WebService core_tag_get_tagindex_per_area 2019-04-11 10:20:44 +02:00
Juan Leyva
6c344ff282 MDL-64656 core_tag: Return tags in modules and blog 2019-04-11 10:20:44 +02:00
Mathew May
3f2c68f119 MDL-64506 templates: Move BS2 labels to BS4 badges 2019-04-03 19:34:20 +08:00