Skip to content

Commit

Permalink
Merge pull request #854 from openmultiplechoice/schu/safari-fix-inval…
Browse files Browse the repository at this point in the history
…id-date

IndexStatsView: fix "invalid date" error
  • Loading branch information
schu committed May 6, 2024
2 parents 410d328 + 66bc531 commit 6f5d918
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 45 deletions.
5 changes: 3 additions & 2 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ protected function schedule(Schedule $schedule): void
$usersByHour = [];
foreach($range as $hour) {
$hourString = $hour->format('Y-m-d H:i:s');
$answersByHour[$hourString] = isset($answerChoicesByHour[$hourString]) ? count($answerChoicesByHour[$hourString]) : 0;
$usersByHour[$hourString] = isset($answerChoicesByHour[$hourString]) ?
$hourStringISO8601 = $hour->format('Y-m-d\TH:i:s\Z');
$answersByHour[$hourStringISO8601] = isset($answerChoicesByHour[$hourString]) ? count($answerChoicesByHour[$hourString]) : 0;
$usersByHour[$hourStringISO8601] = isset($answerChoicesByHour[$hourString]) ?
count(array_unique(
$answerChoicesByHour[$hourString]
->map(function ($ac) { return $ac->session->user_id; })
Expand Down
1 change: 1 addition & 0 deletions public/build/assets/IndexSessionView-BhW6sSfw.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion public/build/assets/IndexSessionView-COqqUes9.js

This file was deleted.

0 comments on commit 6f5d918

Please sign in to comment.