Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

When building reports we should aim for them to work consistently with other reports, for example if we have similar criteria for selecting users then the different reports should probably return the same set of users.

Paper attempts

When working with reports dealing with paper attempts you will need to keep in mind some things

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

  • No labels