Skip to content

Commit 6a80c22

Browse files
author
dustinhuynh
committed
#180 - New metric for rolling 12 months active users
+ Update sql script following SQL standard
1 parent de778ad commit 6a80c22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/metric/yearly_active_users_metric.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function generate_metric_item(int $starttime, int $finishtime): metric_it
8686
$lastyear = $finishtime - (60 * 60 * 24 * 365);
8787
$users = $DB->count_records_select(
8888
'user',
89-
'confirmed = 1 and (lastlogin > ? or currentlogin > ?)',
89+
'confirmed = 1 AND (lastlogin > ? OR currentlogin > ?)',
9090
[$lastyear, $lastyear]
9191
);
9292
return new metric_item($this->get_name(), $finishtime, $users, $this);

0 commit comments

Comments
 (0)