forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-65527 mod_assign: Update group assignment submission filter to sh…
…ow all group members by submission status
- Loading branch information
Kwabena
committed
Jan 14, 2025
1 parent
f4f1666
commit 16e2d26
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16e2d26
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Kwabena, initial peer review below:
Most of the above issues should be highlighted by PHP CodeSniffer if you configure its integration with PHPStorm. Have a look at https://moodledev.io/general/development/tools/phpcs if you haven't already, and search the web for instructions on how to configure PHPStorm for it (e.g. https://www.jetbrains.com/help/phpstorm/using-php-code-sniffer.html).
Overall I'm not actually convinced that this is the best approach to fixing this issue. In https://tracker.moodle.org/browse/MDL-65527, Tim reported that the bug only shows up with a particular assignment config setting enabled:
From playing around with the config myself, I've found that even with that setting enabled, the 'Status' column in the submissions table always shows the right thing, so I think I'd be tempted to look at the criteria used by the filter code to determine whether a submission is submitted or not, and modify that to make it consistent with the logic that determines which status to display in the table.
The problem with changing what's stored in the database, as you've done here, is that it changes much more fundamentally the behaviour of the assignment activity, and this is far more likely to affect other functionality and have unwanted knock-on effects, potentially causing new regressions in the activity. Try to address the issue directly and change as little as possible to reduce the impact of the change.
I hope this all makes sense.