Skip to content

Commit

Permalink
Test: Always Calculate Time Per Question as Int
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Jan 3, 2025
1 parent 4f14e03 commit 760aa21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/ILIAS/Test/src/ExportImport/ResultsExportExcel.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ private function addResultsContent(array $cols_for_question_ids): void
$this->worksheet->setCell($current_row, $col++, $this->convertToUserDateFormat($user_data->getFirstVisit()));
$this->worksheet->setCell($current_row, $col++, $this->convertToUserDateFormat($user_data->getLastVisit()));
$this->worksheet->setCell($current_row, $col++, $this->secondsToHoursMinutesSecondsString(
$user_data->getQuestionsWorkedThrough() ? $user_data->getTimeOnTask() / $user_data->getQuestionsWorkedThrough() : 0
$user_data->getQuestionsWorkedThrough() !== 0 ? intdiv($user_data->getTimeOnTask(), $user_data->getQuestionsWorkedThrough()) : 0
));

if ($this->test_obj->isShowExamIdInTestResultsEnabled()) {
Expand All @@ -337,7 +337,7 @@ private function addResultsContent(array $cols_for_question_ids): void
$this->worksheet->setCell($current_row, $col++, $test_attempt_data->getReachedPointsInPercent());
$this->worksheet->setCell($current_row, $col++, $this->secondsToHoursMinutesSecondsString($test_attempt_data->getWorkingTime()));
$this->worksheet->setCell($current_row, $col++, $this->secondsToHoursMinutesSecondsString(
$test_attempt_data->getAnsweredQuestionCount() ? $test_attempt_data->getWorkingTime() / $test_attempt_data->getAnsweredQuestionCount() : 0
$test_attempt_data->getAnsweredQuestionCount() !== 0 ? intdiv($test_attempt_data->getWorkingTime(), $test_attempt_data->getAnsweredQuestionCount()) : 0
));

$this->worksheet->setCell(
Expand Down

0 comments on commit 760aa21

Please sign in to comment.