So I have had a lot of requests for this functionality to be re-introduced into Moodle 2.0. I plan on working on this either tonight or on the weekend. Expect an update next week.
We've just installed the new certificate module and the time spent in course function is not working for us. I downloaded the recent version from github, installed the module, did the db upgrade....when it didn't work the first time I checked system clock - on the odd chance things we a bit off, but that was in synch so, I'm stumped.
The new setting doesn't use the timezone of the server, it simply looks in the log table and calculates the amount of time spent in the course. It uses the same logic used in the 1.9 certificate. I pretty much copied the code from the 1.9 instance and ported it across to the 2.0 certificate. What exactly is the issue with your install?
When I create a new certificate and I visit the course as a student I click on the certificate and it tells me I have to spend xminutes in the course - fine, thats what it should do. But, if I click it once or twice more it will then generate the certificate regardless of elapsed time.
I just tested it again in a new course- created the course, added a student, added the certificate, logged in as student in a separate browser and the same behavior, click -no, click-no, click-yes even though less than two minutes had elapsed and I set the time at 10.
I am having this issue as well. Has anyone found a workaround?
I have fixed this. I was comparing seconds to minutes, my bad .
I have pushed a fix to the github repo, the change needed was -