S2U-26 Gradebook add support for group instances #12338
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Creating as a draft, as I guess this is a big piece and will generate debate.
Linking the original s2u-22x PR and copying some of the comments I added in there:
#12127
Some context about parameter duplication: previously gradebook instances were linked to a site id, so every method and query regarding permissions, objects or whatever could use the same value. Splitting that between site for permissions and group for gb instance was the hardest bit, deciding where would fit one value or the other on each of the dozens of methods and hundreds of calls.
The scope of this development was limited to providing group support to the gradebook tool, but we're already in talks to follow this work for external integrations (assignments, samigo, content-review, webservices, lti...). For that reason we created this different jira:
https://sakaiproject.atlassian.net/browse/SAK-49493
The comments about using the same parameter twice is to keep those integrations working as before (gradebook site instances), while moving the code closer to the future version. Gradebookng has lots and lots of similar methods receiving different arguments, called from many different places and doing similar things but not always the same. That was hard to read and to maintain, so I tried to leave it ready so whoever gets other pieces of work doesn't have to go through that process again.