Hi Alberto,
I had the same issue three months ago.
Go to plugins: an activity ' Attendance Register ' and a block ' Course dedication ' are the tools for tracking time spent by Students (or other users) in a Course or in a related group of Courses. You will find these tools useful.