Oracle does not accept column labels in the GROUP BY section -
get_logs_usercourse() and get_logs_userday() were computing the
day/hours column and using it in the GROUP BY. The compatible fix
is to reproduce the same computation in the GROUP BY section.
Credit for the fix goes to Dennis Rochford <Dennis.Rochford@usq.edu.au>.
FROM {$CFG->prefix}log
WHERE userid = '$userid'
AND time > '$coursestart' $courseselect
- GROUP BY day ");
+ GROUP BY floor((time - $coursestart)/". DAYSECS .") ");
}
/**
FROM {$CFG->prefix}log
WHERE userid = '$userid'
AND time > '$daystart' $courseselect
- GROUP BY hour ");
+ GROUP BY floor((time - $daystart)/". HOURSECS .") ");
}
/**