362 Commits

Author SHA1 Message Date
Angelia Dela Cruz
9bdbfeb44f MDL-74841 behat: Label behat generators use UI
Replace steps that manually add Label instances via the UI and use
Behat generators. This improves the speed of Behat test runs.
2022-06-10 13:01:03 +08:00
Eloy Lafuente (stronk7)
9f53b0e965 MDL-73971 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:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Andrew Nicols
4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +08:00
Peter Dias
2c27a33213 MDL-74276 report: Update behat tests to account for new page. 2022-04-01 12:44:04 +08:00
Mihail Geshoski
3436e1ad22 MDL-73863 core_completion: Update behat tests 2022-03-10 12:28:39 +08:00
Mihail Geshoski
135e1a2dce MDL-73863 course: Deprecate unused methods 2022-03-10 12:28:39 +08:00
Mihail Geshoski
36fe5695fe MDL-73863 course: Add tertiary navigation in completion pages 2022-03-10 12:28:39 +08:00
Eloy Lafuente (stronk7)
4003e31983 MDL-73785 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:

- When belonging to other components and being valid api:
  - analytics related tests have been moved to tests/analytics subdir.
  - backup & restore related tests have been moved to tests/backup subdir.
  - events related tests have been moved to tests/event subdir.
  - privacy related tests have been moved to tests/privacy.
  - task related tests have been moved to tests/task subdir.
- Some simple renames, not including the component part anymore (not
  needed now that they are namespaced):
  - some xxxlib_test.php have been renamed lib_test.php
    (when they where testing the corresponding lib.php).
  - cache stores tests have been all renamed store_test, originally
    each one had its own name (file_test, apcu_test, redis_test...)
  - assign feedback tests have been all renamed feedback_test, originally
    each one had its own name (file_test, editpdf_test...)
2022-03-03 12:19:30 +01:00
Jun Pataleta
939cb7a90f Merge branch 'MDL-72246-master-2' of https://github.com/andrewnicols/moodle 2022-02-08 11:36:59 +08:00
Andrew Nicols
adc61dddc3 MDL-72246 core_completion: Test coverage improvements for completion 2022-02-08 11:22:14 +08:00
Eloy Lafuente (stronk7)
7a0d024e60 MDL-73659 phpunit: restore_date, api, rule, plugin, manager & helper
All restore_date_test, api_test, rule_test, plugin_test,
manager_test, helper_test 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:

- All restore_date_test cases have been put under xxx\backup
  level 2 (valid API) namespace.
2022-02-05 00:03:32 +01: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
8969abd82a MDL-73581 grade: Display success message on the same page
The "Grades were set for X items "message will be displayed on the
same screen, to safe one click to users and make it more consistent
with other similar actions in Moodle.
2022-01-18 15:12:55 +01:00
Sara Arjona
ff959d8f5d Merge branch 'MDL-72375-completion-id' of https://github.com/Peterburnett/moodle 2021-12-29 09:48:22 +01:00
Ferran Recio
43499d332c MDL-72898 core_courseformat: hidden activity link 2021-12-28 12:50:23 +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
Mihail Geshoski
17bfe7e79f MDL-72873 behat: Update behat tests 2021-12-16 00:10:13 +08:00
Peter Burnett
cab836cf8d MDL-72375 completion: Remove id from custom rules
The id stored in the default custom rules was the courseid, and would
incorrectly be applied to new activities as the activity id.
2021-12-13 11:52:03 +10:00
Ilya Tregubov
6f44f008d8 Merge branch 'MDL-73278' of https://github.com/stronk7/moodle 2021-12-10 18:51:40 +02:00
Jun Pataleta
107bcc143c Merge branch 'MDL-72090-master' of git://github.com/abgreeve/moodle 2021-12-09 11:17:32 +08:00
abgreeve
fcd4de8639 MDL-72090 navigation: Update to behat feature files for navigation.
This updates feature files to use the new steps to navigate to certain
pages.
2021-12-09 11:13:35 +08:00
Bas Brands
35a5288554 MDL-71691 core_behat: behat fixes for changed course design 2021-12-08 13:14:05 +01: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
Adrian Greeve
b72fa5fbae MDL-71912 behat: Updating various tests using assign steps. 2021-11-09 11:24:08 +08:00
Angelia Dela Cruz
89c4c803e8 MDL-72655 behat: Use assign generators
Replace steps that manually add assignment instances via the UI
and use Behat generators. This improves the speed of Behat test
runs.
2021-11-03 11:34:26 +08:00
Peter Dias
cb2afc668d MDL-72827 completion: Revert completion flow logic
- Reverts the custom flow logic introduced in the 52206
- Expand unit tests to cover different grade based completion settings
2021-10-28 11:38:10 +08:00
Víctor Déniz
9ef79d0b36 Merge branch 'master-MDL-64576-v2' of https://github.com/golenkovm/moodle 2021-10-07 22:24:37 +01:00
Peter
7a9e3db9dc MDL-52206 completion: Behat test
Co-authored-by: aanabit
2021-10-07 10:17:25 +08:00
Peter Dias
2c7893cf9f MDL-52206 core: Update new activity_custom_completion
Update the custom_completion classes to accept the new completion
criteria
2021-10-04 19:45:47 +08:00
Peter Dias
d975251813 MDL-52206 completion: New criteria to handle behaviour between modules 2021-10-04 19:45:45 +08:00
Peter Dias
cd52b46e89 MDL-52206 quiz: Remove completionpass completion from quiz
AMOS BEGIN
 MOV [completionpass,mod_quiz],[completionpassgrade,core_completion]
 MOV [completionpassdesc,mod_quiz],[completionpassgrade_desc,core_completion]
 MOV [completionpass_help,mod_quiz],[completionpassgrade_help,core_completion]
AMOS END
2021-10-04 19:44:03 +08:00
Peter
90acd8d381 MDL-52206 core: Add completion criteria to course_modules 2021-10-04 19:44:02 +08:00
Peter
663137748e MDL-52206 core: Add completion based on pass grade
Add new completion based on pass grade to the completion criteria.
2021-10-04 19:42:34 +08:00
Mikhail Golenkov
17df506879 MDL-64576 completion: Fix criteria and course completion dates 2021-10-04 10:51:38 +11:00
Bas Brands
16c726cde7 MDL-71610 core_behat: use new edit mode step in feature files 2021-09-29 09:25:36 +02:00
Mihail Geshoski
7d821080f0 MDL-72093 navigation: Update behat tests 2021-09-14 12:02:35 +08:00
Huong Nguyen
3150612163 MDL-71899 performance: Improve activity completion data caching
- Modified SQL in get_data() to get the activity completion of all course modules without calling get_fast_modinfo() to reduce the DB queries.
 - Building activity completion cache for the whole course in one time instead of building the cache for each course module by passing $wholecourse = true to get_data()
2021-09-09 10:03:21 +07:00
Andrew Nicols
c79d58a50b MDL-71209 behat: Fix behat for new changes
Co-authored-by: Ilya Tregubov <ilya@moodle.com>
2021-08-20 16:49:06 +02:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Ilya Tregubov
4819625349 MDL-32103 completion: Allow instant completion updates.
For activity based course completion criteria allow instant
course completion updates if the activity completion state was changed
for a single user.
2021-07-13 12:07:53 +02:00
Luca Bösch
9fc6c45b10 MDL-71634 course: Do not show "Your progress" info any more. 2021-06-17 19:22:13 +02:00
David Mudrák
ad30fde448 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 17:45:18 +02:00
Víctor Déniz
6d3107641d Merge branch 'MDL-71189-master-3' of git://github.com/mickhawkins/moodle 2021-05-03 08:08:34 +01:00
Michael Hawkins
f105612d7f MDL-71189 core_completion: Implementing custom completion sort ordering
This adds the requirement for activities supporting custom completion to
specify the order all completion conditions should be displayed for that
activity. It also implements the sorting that takes place.
2021-05-03 13:36:11 +08:00
Michael Hawkins
c997fc7784 MDL-71189 core_completion: Updates to meet current coding standards 2021-05-03 13:36:11 +08: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
Dongsheng Cai
36bc7b07db MDL-71235 webservices: add activity completion data to web services 2021-04-29 13:52:32 +10:00
Jun Pataleta
d9a8245efb MDL-71252 completion: Fix Behat test for manual completion display
Adjusting the test since the manual completion button is now being
hidden from the course homepage when completion is disabled.
2021-04-26 19:53:28 +08:00