learnweb / moodle-tool_lifecycle

:recycle: Extensible Moodle plugin for managing course life cycles, e.g., deprovisioning
GNU General Public License v3.0
19 stars 31 forks source link

Manage course page not accessible anymore #198

Open PhMemmel opened 4 months ago

PhMemmel commented 4 months ago

The latest commit removes the link from the course secondary navigation in the case that there are no workflows with manual triggers. Unfortunately, that also removes the possibility for the user to access this page when he has to deal with active workflows including interactive steps. I think this use case should be considered as well :)

NinaHerrmann commented 4 months ago

Hey @PhMemmel long time no seen ;) That is an excellent point! @justusdieckmann any ideas on this? I fear caching if a teacher has an active workflow (wf) is kind of a caching overload and it might be beneficial to create a new db table storing if a teacher has an active wf with at least one of his courses. What do you think?

PhMemmel commented 4 months ago

Hi @NinaHerrmann, nice to hear from you :)

And yes... just getting right back at tool_lifecycle... beware... ;-)

I agree that caching the entry for each user feels a bit overengineered. On the other hand running a very big instance I would be happy if this could be implemented in a way which generates minimum load considering that this is being done on each single course view.

To be honest the only solution I see is to always show the navigation node without any condition applied (except capability). Yes, the UX suffers a bit from that, but I do not consider this as a real problem. Your suggestion to create another table would be a solution, but in an instance the size of about 1.5 million users we do not want to query this table either on each course load and update it in the trigger workflow (which is already a slow task for us because of our huge amount of courses). In addition to that I am scared of the table becoming inconsistent with the states of the processes.

Just my two cents...

NinaHerrmann commented 4 months ago

:joy: - I will try my best to keep up with you :)

I think the most important scenario is when the plugin is installed but not yet active in the sense that workflows are started (or in case the workflow is only used for a selection of course categories). However, another option to combine both would be to add a setting, allowing smaller sites to have consistent behavior and bigger Moodle instances to disable it in case it affects the performance.

Even simpler would be to make the conditional clause check if there are any manual workflows or automatic workflows (ignoring if the course or any course might be triggered).

PhMemmel commented 4 months ago

All the suggestions are fine for me, thanks :)