$courseselect = '';
}
- return get_records_sql("SELECT floor((`time` - $coursestart)/". DAYSECS .") as day, count(*) as num
+ return get_records_sql("SELECT floor((time - $coursestart)/". DAYSECS .") as day, count(*) as num
FROM {$CFG->prefix}log
WHERE userid = '$userid'
- AND `time` > '$coursestart' $courseselect
+ AND time > '$coursestart' $courseselect
GROUP BY day ");
}
$courseselect = '';
}
- return get_records_sql("SELECT floor((`time` - $daystart)/". HOURSECS .") as hour, count(*) as num
+ return get_records_sql("SELECT floor((time - $daystart)/". HOURSECS .") as hour, count(*) as num
FROM {$CFG->prefix}log
WHERE userid = '$userid'
- AND `time` > '$daystart' $courseselect
+ AND time > '$daystart' $courseselect
GROUP BY hour ");
}
if ($start and $end and !$confirmdelete) { // Show a full transcript
- if ($groupid) {
+ if (!empty($groupid)) {
$groupselect = " AND groupid = '$currentgroup'";
$groupparam = "&groupid=$currentgroup";
} else {
$currentgroup = false;
}
- if ($currentgroup) {
+ if (!empty($currentgroup)) {
$groupselect = " AND groupid = '$currentgroup'";
$groupparam = "&groupid=$currentgroup";
} else {