615 Commits

Author SHA1 Message Date
Jun Pataleta
f854dce12b Merge branch 'MDL-77343-master' of https://github.com/meirzamoodle/moodle 2023-03-15 16:33:23 +01:00
Meirza
29d20be214 MDL-77343 mod_assign: Added missing class properties.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-03-15 14:30:47 +07:00
Jake Dallimore
576369bf97 Merge branch 'MDL-77186-master' of https://github.com/andrewnicols/moodle 2023-03-15 12:00:42 +08:00
Mark Johnson
0775756551 MDL-68093 assign: Restrict group submission to participation groups 2023-03-14 08:52:26 +00:00
Mark Johnson
958da5b67e MDL-68093 groups: Add visibility and participation settings
These new settings are designed to enchance user privacy surrounding
groups. They allow groups to be configured so that users outside the
group cannot see the group, so that users in the group cannot see each
other, or so that users cannot see the group at all, even if they are in
it. This avoids issues where a group may be assigned based on sensitive
personal information (such as a person requiring special arrangements
due to a disability).

By default, groups are visible to all and available for participation in
activities, which maintains the current behaviour.

For performance, a new cache has been added to track the number of
groups on a course that are not visible to non-members. This allows us
to revert to the existing behaviour if the new features are not being
used at all on a course, and only apply the new visibility conditions if
they are.

Users who have the moodle/course:viewhiddengroups capability should be
concious of exposing hidden groups when showing their screen to other
users. The "Switch role to..." feature can be used to show a course page
on screen without exposing private availability conditions, for example.

The changes cover several specific areas:
* grouplib functions, which most code should use to get lists of groups
  and members (this includes the participants page).
* Activities supporting group overrides will not allow overrides for
  groups that are hidden from all users.
* Activities supporting separate/visible groups modes will only allow
  groups with the new "participation" flag enabled to be selected.
* Group messaging will be disabled for groups where members cannot see
  each other, or cannot see the group at all.
2023-03-14 08:52:25 +00:00
Andrew Nicols
9ec46c232d MDL-77186 core: Move all uses of cronlib to new class 2023-03-13 21:21:13 +08:00
Andrew Nicols
4330efc85f Merge branch 'MDL-77463-master' of https://github.com/andelacruz/moodle 2023-03-09 22:09:41 +08:00
Ilya Tregubov
ce3fd6a75d Merge branch 'MDL-77414-master' of https://github.com/andelacruz/moodle 2023-03-08 17:04:32 +08:00
Andrew Nicols
974d7e4dab Merge branch 'MDL-52805-42' of https://github.com/Chocolate-lightning/moodle 2023-03-08 14:49:59 +08:00
Angelia Dela Cruz
0612c6f8a5 MDL-77414 Behat: Coverage for "Require all group members submit" setting 2023-03-08 14:44:45 +08:00
Angelia Dela Cruz
d1c03c435c MDL-77463 Behat: Coverage for assign submission notification to teacher 2023-03-08 14:11:10 +08:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Víctor Déniz
6a9f78b0e7 MDL-77416 lang: Use fixed strings in tests 2023-03-03 14:15:30 +00: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