636 Commits

Author SHA1 Message Date
Andrew Nicols
cee81e21c1
Merge branch 'MDL-77599' of https://github.com/stronk7/moodle 2023-07-05 21:58:47 +08:00
Angelia Dela Cruz
09d654b3fe MDL-78158 behat: Behat cleanup and optimisation 2023-07-04 07:01:27 +08:00
Eloy Lafuente (stronk7)
d9f7fe9c3f
MDL-77599 coding-style: Replace forbidden @const tags by @var
@const is not a valid phpdoc tag and @var should be used to
document both classes properties and constants (no matter how
weird that may sound, heh).

Link to (draft right now) PHP-FIG:

https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#518-var

So, with this commit we are just replacing all uses by the correct
@var one. Note that the type is entirely optional, in fact I think
that there isn't much need of it for constants because it's obvious
for both humans and machines which the type is. But, as far as it's
also correct to specify it, we haven't modified that detail.

The only detail modified are the cases where the constant name was
specified in the phpdoc, that's not needed, hence, the names have
been removed from there when present (a couple of cases).
2023-07-03 15:58:16 +02:00
Angelia Dela Cruz
9f101a30b2 MDL-78158 Behat: Use data generators to add blocks 2023-07-03 17:41:21 +08:00
Andrew Nicols
bf72c0de9d Merge branch 'MDL-75913-master' of https://github.com/davewoloszyn/moodle 2023-06-22 14:29:39 +02:00
Simey Lameze
d79788245b MDL-76635 behat: improve submission comments test 2023-06-20 10:59:03 +08:00
David Woloszyn
802ff3e2e3 MDL-75913 behat: Use alternatives to Atto in tests 2023-06-19 16:35:46 +10:00
Jun Pataleta
5088fba999 Merge branch 'MDL-78333' of https://github.com/paulholden/moodle 2023-06-15 11:59:53 +08:00
Andrew Nicols
4d15a4ee32
Merge branch 'MDL-69231-master' of https://github.com/lameze/moodle 2023-06-15 10:58:56 +08:00
Andrew Nicols
19c98d0d6e
MDL-76733 mod_assign: Remove JS requirement for time-based tests
Converting these tests to use an onlinetext submission and drop the JS
requirement means that they are much less susceptible to runtime issues,
and not susceptible to those caused by JS at all.
2023-06-15 09:32:36 +08:00
Andrew Nicols
9b5d081a48
MDL-76733 mod_assign: Address random failure
This random failure was happening because of the time required to render
and interact with the file picker which sometimes exceeded 2 seconds,
depending on the speed of the machine running the tests.

Converting these tests to use an onlinetext submission and drop the JS
requirement means that they are much less susceptible to runtime issues,
and not susceptible to those caused by JS at all.
2023-06-15 09:28:17 +08:00
Simey Lameze
2367bc9ff6 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:47:27 +08:00
Andrew Nicols
aa2fc4048e MDL-69231 behat: Update tests to use new generator 2023-06-02 12:47:27 +08:00
Paul Holden
ca95bee259
MDL-78333 mod_assign: final removal of deprecated log format methods. 2023-05-24 16:41:55 +01:00
Andrew Nicols
97300ca692
MDL-76733 mod_assign: Tidy up availability behat tests
This feature had lots of small issues and it made sense to fix it whilst
investigating a query:

* most of the steps do not require JavaScript
* it uses the UI to set an admin setting, for every scenario:
** only 3-4 of the scenarios actually test that setting
** it is very slow to do it his way when we have a generator step we can use
* we create two assignments in the Background, but each test only uses one of them
* we create the assignments in the Background with a generator, but
  update them to modify various settings in each Scenario using the UI
  when we should just create one assignment for each test and set it up
  correctly for that Scenario
2023-05-23 10:53:44 +08:00
Víctor Déniz
b576b068bd MDL-77878 lang: Use fixed strings in tests 2023-04-17 08:49:59 +01:00
Sara Arjona
9ce4fb65fd Merge branch 'MDL-77164-master' of https://github.com/marinaglancy/moodle 2023-04-13 14:00:18 +02:00
Sara Arjona
2f771f3175 Merge branch 'MDL-77788-master' of https://github.com/rmady/moodle 2023-04-13 13:16:46 +02:00
Marina Glancy
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
Juan Leyva
d16ed5a5e9 MDL-77788 mod_assign: Apply format_string to group names in WS 2023-04-04 18:14:32 -03:00
Stevani Andolo
731a62f30f MDL-72350 mod_assign: Removed upgradelib.php from mod_assign
After checking the the relation between mod_assign and mod_assginment,
it was found that upgradelib.php was only used/called from the
mod_assignment. Therefore, it was decided to move the upgradelib.php
from mod_assign to mod_assignment and deleted the line in which requires the upgradelib.php
2023-03-30 08:09:07 +08:00
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