603 Commits

Author SHA1 Message Date
Angelia Dela Cruz
d1c03c435c MDL-77463 Behat: Coverage for assign submission notification to teacher 2023-03-08 14:11:10 +08:00
Ilya Tregubov
4a76af27df Merge branch 'MDL-74433' of https://github.com/larsbonczek/moodle 2023-02-23 19:04:29 +01:00
Lars Bonczek
9b7c8f54ab MDL-74433 mod_assign: Fix logging of submission removal 2023-02-07 12:33:49 +01:00
Angelia Dela Cruz
3d7fa69c02 MDL-77078 Behat: Coverage for assignment submission statement 2023-02-06 10:43:10 +08:00
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Paul Holden
af8da7c737 MDL-70070 phpunit: correct data provider method names.
They should not be prefixed `test_` because that's how actual
test methods containing assertions are identified by PHPUnit.
2023-01-16 08:28:37 +00:00
Huong Nguyen
e1001e2f26 MDL-75588 assign: Reset completion status when resetting a submission 2022-12-07 16:15:30 +07:00
Adrian Greeve
a39d00389a MDL-69570 assignfeedback_editpdf: Remove temp pdf files
This adds a new method to the assignfeedback edit pdf library
to specify user data file areas that will return just the meaningful
annotated feedback pdf.

get_file_areas has been updated for this plugin to return all
file areas related to assignfeedback_editpdf, and should stop
producing orphaned files and records when a course reset is done.

Thanks to @toniginard who provided a base solution for me to work
off.
2022-11-29 09:35:51 +08:00
Simey Lameze
a512ba0b3c MDL-75282 behat: Use more precise step definitions
Note: This should possibly be broken out into its own issue and applied
to stables.

Part of MDL-75966.
2022-11-10 19:54:31 +08:00
Andrew Nicols
66d1651023 MDL-75282 assign_onlineoption: Use correct step for checking editor content
Note: This should possibly be broken out into its own issue applied to
stables.

Part of MDL-75966.
2022-11-10 19:54:28 +08:00
Ferran Recio
b9900c2b45 MDL-64231 mod_assign: download submissions with group folder 2022-10-27 11:11:12 +02:00
Simey Lameze
a91499c9f1 MDL-75922 behat: Apply @editor_atto tag to tests requiring Atto
These steps are currently using Atto-specific UI features and must
therefore make use of the @editor_atto tag to ensure that they continue
to run using Atto.

A new issue will be raised to migrate each of these to be
editor-agnostic.
2022-10-09 20:26:01 +08:00
Juan Leyva
51c9c709a9 MDL-75058 course: Fix support for dates on WebServices 2022-06-27 15:29:36 +02:00
Mikhail Golenkov
6684ca3da7 MDL-74234 assign: Fix grading page for filtered out users 2022-06-14 19:04:06 +10:00
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
Huong Nguyen
3956dd856b MDL-74064 mod_assign: Behat test for Assignment with time limit 2022-04-14 12:49:55 +07:00
Sara Arjona
a27c19b73a Merge branch 'MDL-74142-master' of https://github.com/aanabit/moodle 2022-03-10 11:58:21 +01:00
Andrew Madden
4ae22703c6 MDL-73073 mod_assign: Add new time limit fields to external functions
* Add activity, activityformat, timelimit and submissionattachments to mod_assign_get_assignments
* Add timestarted to mod_assign_get_submissions and mod_assign_get_submission_status
* Add assignmentdata to mod_assign_get_submission_status
* Move mod_assign external helper methods to an external_api child class to be used with modern external classes
* Add start_submission external function
* Create mod_assign child class of externallib_advanced_testcase for shared helper functions
* Add extra logic to get_assignments on whether to provide intro
attachments.
2022-03-10 18:31:37 +11:00
Amaia Anabitarte
6c1adeec74 MDL-74142 mod_assign: Show time limit information to teachers 2022-03-09 11:08:14 +01: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
Bas Brands
dd95845bf1 MDL-73595 theme_boost: make tertiary nav more distinct 2022-02-28 13:07:52 +01:00
Jun Pataleta
7d743b255d Merge branch 'MDL-73633-master' of git://github.com/mihailges/moodle 2022-02-09 17:45:54 +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
Mihail Geshoski
d0dad63bc3 MDL-73633 assign: Set 'Overrides' to link to user overrides by default 2022-02-02 10:34:29 +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
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
Eloy Lafuente (stronk7)
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
Shamim Rezaie
dacfebedf3 Merge branch 'MDL-73348' of https://github.com/stronk7/moodle 2021-12-22 21:19:52 +11:00
Andrew Nicols
4772504710 Merge branch 'MDL-72604-master' of https://github.com/jleyva/moodle 2021-12-21 14:12:12 +08: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
Ilya Tregubov
04395977e9 MDL-72873 behat: Fix behat tests. 2021-12-16 17:25:17 +02:00
Mihail Geshoski
17bfe7e79f MDL-72873 behat: Update behat tests 2021-12-16 00:10:13 +08:00
Ilya Tregubov
9e5ffa2229 Merge branch 'MDL-72095-master-3' of https://github.com/bmbrands/moodle 2021-12-13 18:46:16 +02: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
d9e0d4ed31 MDL-72413 assign: 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
Juan Leyva
eb5b0da2ff MDL-72604 assign: Return missing submission status 2021-12-10 11:07:41 +01:00
Eloy Lafuente (stronk7)
de66ba356e t checkout MOODLE_311_STABLE && git fetch https://github.com/mudrd8mz/moodle.git MDL-73201-311-enfix && git merge --no-ff FETCH_HEAD
Merge branch 'MDL-73201-master-enfix' of https://github.com/mudrd8mz/moodle
2021-12-09 23:18:03 +01:00
David Mudrák
46e2e2020d MDL-73201 lang: Use fixed strings in the tests, too 2021-12-09 19:56:02 +01: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
946fd915e2 MDL-72095 theme_boost: max width for activity pages 2021-12-08 17:29:49 +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
Jun Pataleta
5438a3944a Merge branch 'MDL-72810-master' of git://github.com/mickhawkins/moodle 2021-11-29 17:19:28 +08:00
Mathew May
b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
Michael Hawkins
0d644fe4e0 MDL-72810 core_calendar: Remove the three-month pseudo block
This removes the three-month pseudo block from along the side of the
main calendar, and deprecates relevant files/methods which will no
longer be in use.
2021-11-19 18:33:46 +08:00
Andrew Nicols
940097de9e Merge branch 'MDL-68913-master' of https://github.com/cameron1729/moodle 2021-11-11 10:49:05 +08:00
abgreeve
05e6cdfd26 MDL-71912 mod_assign: Behat fixes for overrides. 2021-11-10 16:26:57 +08:00
Matt Porritt
eaa1f56704 MDL-68913 Assign: Per attempt timing
This patch provides functionality to allow the
assign activity to have timed attempts for submissions.
It includes the logic, UI and adminstration changes
fot timed submissions.
2021-11-10 12:07:35 +08:00