Two years ago you described this solution:
https://wplms.io/support/forums/topic/exclude-unlimited-time-quiz-from-duration/
The problem still persists but with the difference that you don't have to inject the course duration item to the sidebar because you have implemented this in your theme.
So how is the actual code with the latest theme version to prevent that the course time of unlimited 9999 will be added to the course duration time?
I need the course duration just summing up the lesson times.
This is still not implemented as there is confusion regarding whether the quiz with unlimited time should be included as a part of curriculum or not. As when you add such a quiz, there is no boundation on the user to finish the course and the time is still considered as infinite.