19 declare(strict_types=1);
    59         if ($this->testOBJ->isShowGradingStatusEnabled()) {
    63         if ($this->testOBJ->isShowGradingMarkEnabled()) {
    70         $this->messageText[] = $msgPart;
    75         return implode(
' ', $this->messageText);
    80         return (
bool) $this->resultData[
'passed'];
    85         if (!$this->testOBJ->isShowGradingStatusEnabled()) {
    86             $this->main_tpl->setOnScreenMessage(
'info', $this->
getFullMessage());
    88             $this->main_tpl->setOnScreenMessage(
'success', $this->
getFullMessage());
    90             $this->main_tpl->setOnScreenMessage(
'info', $this->
getFullMessage());
    96         $this->resultData = $this->testOBJ->getResultsForActiveId($this->
getActiveId());
   102             return $this->
lng->txt(
'grading_status_passed_msg');
   105         return $this->
lng->txt(
'grading_status_failed_msg');
   110         $markMsg = $this->
lng->txt(
'grading_mark_msg');
   113         $markMsg = str_replace(
"[markshort]", $this->
getMarkShort(), $markMsg);
   114         $markMsg = str_replace(
"[percentage]", $this->
getPercentage(), $markMsg);
   115         $markMsg = str_replace(
"[reached]", (
string) $this->
getReachedPoints(), $markMsg);
   116         $markMsg = str_replace(
"[max]", (
string) $this->
getMaxPoints(), $markMsg);
   123         return $this->resultData[
'mark_official'];
   128         return $this->resultData[
'mark_short'];
   139         return sprintf(
"%.2f", $percentage);
   144         return $this->resultData[
'reached_points'];
   149         return $this->resultData[
'max_points'];
   158         if ($this->testOBJ->isShowGradingStatusEnabled()) {
   159             $passedStatusLangVar = $this->
isPassed() ? 
'passed_official' : 
'failed_official';
   162                 $this->
lng->txt(
'passed_status'),
   163                 $this->
lng->txt($passedStatusLangVar)
   167         if ($this->testOBJ->isShowGradingMarkEnabled()) {
   176         $this->tpl = 
new ilTemplate(
'tpl.tst_grading_msg_list.html', 
true, 
true, 
'components/ILIAS/Test');
   181         $this->tpl->setCurrentBlock(
'grading_msg_entry');
   182         $this->tpl->setVariable(
'LABEL', $label);
   183         $this->tpl->setVariable(
'VALUE', $value);
   184         $this->tpl->parseCurrentBlock();
   189         $this->tpl->setCurrentBlock(
'grading_msg_list');
   190         $this->tpl->parseCurrentBlock();
   195         return $this->tpl->get();
 __construct(private ilLanguage $lng, private ilGlobalTemplateInterface $main_tpl, private ilObjTest $testOBJ)
 
populateListEntry($label, $value)