diff --git a/report/stats/user.php b/report/stats/user.php index ae71c4f8c20..7309a08adff 100644 --- a/report/stats/user.php +++ b/report/stats/user.php @@ -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";