MDL-65910 report_stats: Add stattype query condition for consistency
authorJun Pataleta <jun@moodle.com>
Thu, 13 Jun 2019 10:20:21 +0000 (18:20 +0800)
committerJun Pataleta <jun@moodle.com>
Fri, 14 Jun 2019 05:00:31 +0000 (13:00 +0800)
report/stats/user.php

index ae71c4f..7309a08 100644 (file)
@@ -130,9 +130,11 @@ $param->table = 'user_'.$param->table;
 $wheres = [
     "userid = :userid",
     "timeend >= :timeend",
+    "stattype = :stattype",
 ];
 $params['userid'] = $user->id;
 $params['timeend'] = $param->timeafter;
+$params['stattype'] = $param->stattype;
 // Add condition for course ID when specified.
 if ($course->id != SITEID) {
     $wheres[] = "courseid = :courseid";