diff --git a/Modules/Test/classes/class.ilObjTestGUI.php b/Modules/Test/classes/class.ilObjTestGUI.php index 0c1230000481..3806b2b6d56e 100755 --- a/Modules/Test/classes/class.ilObjTestGUI.php +++ b/Modules/Test/classes/class.ilObjTestGUI.php @@ -2806,14 +2806,19 @@ public function infoScreen($session_lock = "") break; } $info->addProperty($this->lng->txt("tst_score_reporting"), $score_reporting_text); - $reporting_date = $this->object->getReportingDate(); - if ($reporting_date) { - #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches); - #$txt_reporting_date = date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1])); - #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date); + $reporting_date = $this->getTestObject() + ->getScoreSettings() + ->getResultSummarySettings() + ->getReportingDate(); + if ($reporting_date !== null) { $info->addProperty( $this->lng->txt('tst_score_reporting_date'), - ilDatePresentation::formatDate(new ilDateTime($reporting_date, IL_CAL_TIMESTAMP)) + ilDatePresentation::formatDate(new ilDateTime( + $reporting_date + ->setTimezone(new DateTimeZone($this->user->getTimeZone())) + ->format('YmdHis'), + IL_CAL_TIMESTAMP + )) ); }