Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAK-42608 Samigo display user notifications for available assessments #11943

Merged
merged 35 commits into from
Oct 18, 2023

Conversation

jkjanetschek
Copy link
Contributor

This implementation does consider delays and exceptions for users/groups

Copy link
Contributor

@adrianfish adrianfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this PR. You've delved into some challenging code here. So, apart from my pedantic commit suggestions I'd suggest that you add a service method for generating those event reference strings. I see that pattern repeated so many times in the samigo code base and it would be a great improvement if we made a method to return that reference.

jkjanetschek and others added 26 commits September 28, 2023 12:55
…/listener/author/EditAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/EditAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/EditAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/EditAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/PublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/PublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/PublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/PublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
jkjanetschek and others added 4 commits September 28, 2023 12:59
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/SavePublishedSettingsListener.java

Co-authored-by: Adrian Fish <[email protected]>
…/listener/author/RepublishAssessmentListener.java
…/listener/author/RepublishAssessmentListener.java
Copy link
Contributor

@adrianfish adrianfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that'll do. Building those references, drying out that part of the code, that can wait. Thanks.

fix: lookup eventTrackingService via ComponentManager
@jkjanetschek
Copy link
Contributor Author

Thanks for your input and review!
Some repetition could easily be avoided, because many events in a code region use exactly the same reference. I can make another commit to increase the number of reference reuse, where it makes sense.

I am not sure how to approach a service method for reference building. For me it would make sense to place it in class AssessmentService. In a short search i found 6 possible references for events. Are there any missing?
Would it make sense to make just a service method with a switch-case block?

EVENT_ASSESSMENT_AVAILABLE
EVENT_ASSESSMENT_DELETE
EVENT_ASSESSMENT_UPDATE_AVAILABLE
EVENT_ASSESSMENT_PUBLISH
EVENT_PUBLISHED_ASSESSMENT_RETRACTED
siteId=, assessmentId=, publishedAssessmentId=
EVENT_PUBLISHED_ASSESSMENT_REPUBLISH
EVENT_PUBLISHED_ASSESSMENT_SETTING_EDIT
EVENT_PUBLISHED_ASSESSMENT_REMOVE
siteId=, publishedAssessmentId=
EVENT_ASSESSMENT_REMOVE
assessmentId=
EVENT_PUBLISHED_ASSESSMENT_SAVEITEM
/sam//publish, publishedItemId=
EVENT_ASSESSMENT_UNINDEXITEM
/sam//unindexed, itemId=
EVENT_PUBLISHED_ASSESSMENT_UNINDEXITEM
sam//unindexed, publishedItemId=

@adrianfish
Copy link
Contributor

Don't worry about it for now. It's a refactor we can do later. Let's get your change in so it can be tested out. Thanks for the work - the notifications stuff has quite a few moving parts.

@ern ern changed the title SAK-42608: display user notifications for available tests&quizzes SAK-42608 Samigo display user notifications for available assessments Oct 18, 2023
@ern ern merged commit 14727b9 into sakaiproject:master Oct 18, 2023
ern pushed a commit that referenced this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants