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

Add event for hooks after database operations have been done #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PhMemmel
Copy link
Contributor

In some cases you want to react to events fired by tool_lifecycle after the corresponding database actions have been performed, so you can read from the database again to have a consistent database state.

This PR adds such an event.

@PhMemmel PhMemmel changed the title Add event for proper hooks for block_mbstreatcourses Add event for hooks after database operations have been done Mar 26, 2022
@NinaHerrmann
Copy link
Contributor

Hello sorry for the late reply!
Could you elaborate in which use case you want to use this?
Cheers, Nina

@PhMemmel
Copy link
Contributor Author

PhMemmel commented Jul 15, 2022

Hi @NinaHerrmann,
thank you for the reply!

I have implemented an alert block which is shown on the dashboard to the users to inform them that they have courses to handle. This block tracks, calculates and updates all currently available interactive steps and shows a message like "You have 4 courses requiring your attention, please click here to handle them." including a link leading to the tool_lifecycle view page. This block only shows if there are courses to handle.

Therefore I need a hook at the exact point where the current process/step has already finished, so the database queries return the correct state.

@NinaHerrmann
Copy link
Contributor

Uh nice context I see the application for that!
Do you mind linking the block in the documentation if we do an additional subsection? :)
We try to review as fast as possible! :)

@PhMemmel
Copy link
Contributor Author

PhMemmel commented Jul 15, 2022

The block is currently closed source and it also requires my other contribution (#143). If it is of public interest, let me know, I will try to figure out, if it is possible to release the source code publicly.

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.

2 participants