mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-50509 datalib: Fix the typo in the variable name
The line is supposed to sanitize the function parameter.
This commit is contained in:
parent
17abbfba1f
commit
cdc6938bf9
@ -1769,7 +1769,10 @@ function get_logs_usercourse($userid, $courseid, $coursestart) {
|
||||
$params['courseid'] = $courseid;
|
||||
}
|
||||
$params['userid'] = $userid;
|
||||
$$coursestart = (int)$coursestart; // note: unfortunately pg complains if you use name parameter or column alias in GROUP BY
|
||||
// We have to sanitize this param ourselves here instead of relying on DB.
|
||||
// Postgres complains if you use name parameter or column alias in GROUP BY.
|
||||
// See MDL-27696 and 51c3e85 for details.
|
||||
$coursestart = (int)$coursestart;
|
||||
|
||||
return $DB->get_records_sql("SELECT FLOOR((time - $coursestart)/". DAYSECS .") AS day, COUNT(*) AS num
|
||||
FROM {log}
|
||||
|
Loading…
x
Reference in New Issue
Block a user