Paper attemts
Start time
When building a report based on user attempts of papers the start time on some papers should include a grace period.
The grace period is calculated using something like $time_int = \log::getStartInterval($papertype)
it returns a value in minutes that should be used in the queries where statement similar to:
DATE_ADD(l4o.started, INTERVAL $time_int MINUTE) >= ?
Selecting students
When selecting students you should use the $rolesjoin = \log::get_student_only()
it has optional parameters that let you change which table it joins with (by default it will join with users) and then use it like:
FROM users $rolesjoin WHERE