Permalink
Browse files

Merge branch 'wip-MDL-27696-m21' of git://github.com/samhemelryk/mood…

…le into MOODLE_21_STABLE
  • Loading branch information...
2 parents f871cc1 + 9741999 commit ea3317e7823404fa87b677f09cd982e4f4d0aca7 @skodak skodak committed Jul 18, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/datalib.php
View
@@ -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 ea3317e

Please sign in to comment.