Skip to content

Commit

Permalink
Merge branch 'wip-MDL-27696-m20' of git://github.com/samhemelryk/mood…
Browse files Browse the repository at this point in the history
…le into MOODLE_20_STABLE
  • Loading branch information
skodak committed Jul 18, 2011
2 parents 533a766 + c78b71e commit 6b43f50
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/datalib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1844,13 +1844,15 @@ function get_logs_usercourse($userid, $courseid, $coursestart) {
$params['courseid'] = $courseid; $params['courseid'] = $courseid;
} }
$params['userid'] = $userid; $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} FROM {log}
WHERE userid = :userid WHERE userid = :userid
AND time > :coursestart $courseselect AND time > :coursestart2 $courseselect
GROUP BY FLOOR((time - :coursestart)/". DAYSECS .")", $params); GROUP BY FLOOR((time - :coursestart3)/". DAYSECS .")", $params);
} }


/** /**
Expand Down

0 comments on commit 6b43f50

Please sign in to comment.