@@ -69,10 +69,6 @@ public function selectStatements( $lrs='', $filter, $raw=false ){
6969 /**
7070 * Return data based on dates
7171 *
72- * @todo if timestamp becomes required in the spec, we could use that to
73- * better reflect when the action actually happened, not when
74- * saved in the LRS, instead of $stored
75- *
7672 * @param int $lrs
7773 * @param array $filters e.g. date, from a date, between dates, including in / or
7874 * @param string $interval e.g. dayOfYear, week, month, year etc
@@ -114,7 +110,7 @@ public function timedGrouping( $lrs, $filters, $interval, $type='time' ){
114110 '$group ' => array (
115111 '_id ' => $ set_id ,
116112 'count ' => array ('$sum ' => 1 ),
117- 'date ' => array ('$addToSet ' => '$statement.stored ' )
113+ 'date ' => array ('$addToSet ' => '$statement.timestamp ' )
118114 )
119115 ),
120116 array ('$sort ' => array ('date ' => 1 )),
@@ -127,7 +123,7 @@ public function timedGrouping( $lrs, $filters, $interval, $type='time' ){
127123 '$group ' => array (
128124 '_id ' => $ set_id , //, 'dayOfYear' => '$created_at'
129125 'count ' => array ('$sum ' => 1 ),
130- 'dates ' => array ('$addToSet ' => '$statement.stored ' ),
126+ 'dates ' => array ('$addToSet ' => '$statement.timestamp ' ),
131127 'data ' => $ project
132128 ),
133129 ),
0 commit comments