When a student attempts a quiz, I need to access the date that a student enrolled in the course. This is for a small hack to control the frequency of quiz attempts.
How do I access the enrollment date?
I am using the Paypal enrollment plugin.
I want to call this variable from the file:
/mod/quiz/attempt.php
I figure I can do this hack in two different ways:
1) set a flag if enough time has not passed between enrollment and the quiz attempt; TOOSOON = ( time_enrolled(student) + interval ) > timenow();
2) I can timestamp the last quiz attempt variable when the student enrolls. This is a little more difficult. I don't know if just timestamping variable lastattempt will work by itself. There may need to be a quiz taking function called and returned with valid values to keep records lined up aside from just the time of the last attempt.
What is the variable for the student's enrollment date in a course?
by Todd Anderson -
Number of replies: 0