function quiz_cron in Quiz 7
Same name and namespace in other branches
- 8.6 quiz.module \quiz_cron()
- 8.4 quiz.module \quiz_cron()
- 8.5 quiz.module \quiz_cron()
- 6.6 quiz.module \quiz_cron()
- 6.3 quiz.module \quiz_cron()
- 6.4 quiz.module \quiz_cron()
- 6.5 quiz.module \quiz_cron()
- 7.6 quiz.module \quiz_cron()
- 7.4 quiz.module \quiz_cron()
- 7.5 quiz.module \quiz_cron()
- 6.x quiz.module \quiz_cron()
@todo Please document this function.
See also
File
- ./
quiz.module, line 291 - Quiz Module
Code
function quiz_cron() {
// Remove old quiz results that haven't been finished.
$rm_time = variable_get('quiz_remove_partial_quiz_record', '0');
if ($rm_time) {
// $time = 0 for never.
db_delete('quiz_node_results')
->condition('time_end', 0)
->where('(:request_time - time_start) > :remove_time', array(
':request_time' => REQUEST_TIME,
':remove_time' => $rm_time,
))
->execute();
}
}