Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-27696 datalib Fixed up misused params in get_logs_usercourse

  • Loading branch information...
commit c103eba85f99d82d22a4d5f4e23ba4e9af0d5c85 1 parent f6f6138
@samhemelryk samhemelryk authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/datalib.php
View
10 lib/datalib.php
@@ -1844,13 +1844,15 @@ function get_logs_usercourse($userid, $courseid, $coursestart) {
$params['courseid'] = $courseid;
}
$params['userid'] = $userid;
- $params['coursestart'] = $coursestart;
+ $params['coursestart1'] = $coursestart;
+ $params['coursestart2'] = $coursestart;
+ $params['coursestart3'] = $coursestart;
- return $DB->get_records_sql("SELECT FLOOR((time - :coursestart)/". DAYSECS .") AS day, COUNT(*) AS num
+ return $DB->get_records_sql("SELECT FLOOR((time - :coursestart1)/". DAYSECS .") AS day, COUNT(*) AS num
FROM {log}
WHERE userid = :userid
- AND time > :coursestart $courseselect
- GROUP BY FLOOR((time - :coursestart)/". DAYSECS .")", $params);
+ AND time > :coursestart2 $courseselect
+ GROUP BY FLOOR((time - :coursestart3)/". DAYSECS .")", $params);
}
/**

0 comments on commit c103eba

Please sign in to comment.
Something went wrong with that request. Please try again.