Commit Graph

145 Commits

Author SHA1 Message Date
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
a641a8dfa2 MDL-75165 notes: implement notes datasource for custom reporting.
Create entity definition containing report elements for notes. Add
new report source joining the entity to the user/course entities to
provide data for the reportbuilder editor.
2022-10-19 14:46:21 +01:00
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
041b1beb46 Merge branch 'MDL-73347-master' of https://github.com/sarjona/moodle 2022-01-24 13:40:57 +08:00
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
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
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
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/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 login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
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
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
d000b16a72 MDL-72287 report: Add back link and headings in user profile pages 2021-12-09 22:46:57 +08:00
40de097e65 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:00 +02:00
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
55a081bd87 MDL-64705 notes: Make notes WS return permissions information
We need to know some capabilities in order to enable users to manage notes.
2019-03-25 19:01:20 +01:00
fd45ae4566 MDL-63530 core_notes: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-30 16:18:24 +08:00
3960ad53a7 MDL-62430 privacy: validate context when deleting all user data 2018-05-14 18:13:27 +08:00
7d5667ee57 MDL-61863 core_notes: Implemented privacy providers 2018-04-24 12:06:46 +08:00
a6943ebb59 MDL-59758 core_user: Pluralise bulk actions
Don't say 1 people.
2017-11-07 14:39:04 +08:00
b5b81de3d6 MDL-59758 core_user: Replace old bulk actions
The participants page has some clunky multi page forms for bulk actions. Replaces it with an ajax alternative.
2017-11-07 14:18:49 +08:00
e71687baf9 MDL-60198 webservice: Add missing MOODLE_INTERNAL checks 2017-09-21 13:01:28 +02:00
93b47710ac MDL-59977 core: do not directly check 'viewparticipant' capability 2017-09-11 12:44:27 +08:00
fdeeaff954 MDL-58265 core_test: replace I turn editing on steps
Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
c987d1b2ef MDL-58265 core_test: replace all uses of I follow course steps
Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
7a12a02dc7 MDL-56614 behat: add navigation block when required
Most of these hacks have links to corresponding MDL issues
2016-12-06 11:49:14 +08:00
face152176 MDL-51347 core_notes: check view notes capability by course context 2016-11-10 16:15:31 +08:00
ba5c5083c5 MDL-55074 theme_boost: Behat fixes for latest theme changes
Fix I edit profile steps
Apply fixed header in css
Remove transitions from menus for behat
Be more specific about some "I follow" steps
Navigation path changes
"Current course" node removed from nav tree
Adapt tests because there are no default blocks
Force some space between action menu items
2016-10-21 16:06:54 +08:00
525ef9c8b4 MDL-51948 core: Patch core areas for LTR forms
Part of MDL-55071
2016-09-23 10:55:14 +01:00
52f3e060e4 MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +08:00
f23e9b6ba4 MDL-49414 webservices: Remove deprecated functions 2016-04-27 15:54:38 +08:00
be5e0110ff MDL-49566 core: used reflection in unit tests
Also split the tests into multiple functions for each scenario.
2015-12-29 17:42:43 +08:00
bef0d6b052 MDL-49566 core: Write unittests for MDL-45898 2015-12-29 11:22:42 +08:00
59eef1a174 MDL-49566 notes: Notes link should not show up for guests 2015-12-29 11:22:42 +08:00
6bcff8abf5 Merge branch 'MDL-47065-master' of git://github.com/danpoltawski/moodle 2015-11-16 15:25:42 +08:00
00d70d79a4 MDL-47065 notes: prevent empty spaces added as note
(And updated behat test for this test case)
2015-11-12 09:56:56 +00:00
2a4c236704 MDL-47065 behat: improve verificaton of lack of note 2015-11-12 09:56:56 +00:00
142099e2a6 MDL-47065 notes: don't add blank notes
Previously the logic was wrong and was proceeding to add a note
when content was missing.

Also add behat coverage for adding notes to participants (this test is
not perfect, but better than zero coverage we had before).
2015-11-12 09:56:14 +00:00
4d9edf1b15 MDL-51536 webservices: fix invalid param definitions 2015-10-13 19:01:42 +01:00
c75b891ba7 Merge branch 'MDL-49821-master-master' of git://github.com/jleyva/moodle 2015-10-01 01:26:58 +02:00
4485f7c549 MDL-49821 webservice: Add active user checks in external functions 2015-09-25 11:33:13 +02:00
48a90a215b MDL-51415 webservice: Check course access using can_access_course()
This function check both user enrolled and course:view capabilities
2015-09-22 15:29:49 +02:00
c7697399d1 MDL-51325 notes: Fix external get_course_notes to return site notes 2015-09-04 11:05:08 +02:00
6166a9fbe7 MDL-50816 notes: Delete never met condition code 2015-07-15 15:31:26 +02:00
e9acc1d6c5 MDL-50289 notes: No navigation to notes if the feature is disabled 2015-05-25 12:35:26 +02:00
327e68e69d MDL-49845 notes: Changed headers for notes index 2015-05-04 14:02:17 +08:00
298c9da5f1 MDL-49845 navigation: Fix breadcrumbs for links in my profile. 2015-05-04 14:02:16 +08:00
4887d15228 MDL-49983 navigation: Remove 'my' from user context navigation 2015-05-04 12:38:50 +08:00
89a6290fb9 Merge branch 'MDL-45131-master' of git://github.com/jleyva/moodle 2015-04-16 17:04:34 +08:00
80cb20afe5 MDL-45131 notes: Add validation for returned parameters in WS tests 2015-04-16 10:25:52 +02:00