62 if ($this->testOBJ->isShowGradingStatusEnabled()) {
66 if ($this->testOBJ->areObligationsEnabled()) {
70 if ($this->testOBJ->isShowGradingMarkEnabled()) {
74 if ($this->testOBJ->getECTSOutput()) {
81 $this->messageText[] = $msgPart;
86 return implode(
' ', $this->messageText);
91 return (
bool) $this->resultData[
'passed'];
96 if (!$this->testOBJ->isShowGradingStatusEnabled()) {
107 $this->resultData = $this->testOBJ->getResultsForActiveId($this->
getActiveId());
109 if ($this->testOBJ->getECTSOutput()) {
110 $ectsMark = $this->testOBJ->getECTSGrade(
111 $this->testOBJ->getTotalPointsPassedArray(),
112 $this->resultData[
'reached_points'],
113 $this->resultData[
'max_points']
116 $this->resultData[
'ects_grade'] = strtoupper($ectsMark);
123 return $this->lng->txt(
'grading_status_passed_msg');
126 return $this->lng->txt(
'grading_status_failed_msg');
131 $markMsg = $this->lng->txt(
'grading_mark_msg');
134 $markMsg = str_replace(
"[markshort]", $this->
getMarkShort(), $markMsg);
135 $markMsg = str_replace(
"[percentage]", $this->
getPercentage(), $markMsg);
137 $markMsg = str_replace(
"[max]", $this->
getMaxPoints(), $markMsg);
144 return $this->resultData[
'mark_official'];
149 return $this->resultData[
'mark_short'];
160 return sprintf(
"%.2f", $percentage);
165 return $this->resultData[
'reached_points'];
170 return $this->resultData[
'max_points'];
176 return $this->lng->txt(
'grading_obligations_answered_msg');
179 return $this->lng->txt(
'grading_obligations_missing_msg');
184 return (
bool) $this->resultData[
'obligations_answered'];
189 return str_replace(
'[markects]', $this->
getEctsGrade(), $this->lng->txt(
'mark_tst_ects'));
194 return $this->resultData[
'ects_grade'];
203 if ($this->testOBJ->isShowGradingStatusEnabled()) {
204 $passedStatusLangVar = $this->
isPassed() ?
'passed_official' :
'failed_official';
207 $this->lng->txt(
'passed_status'),
208 $this->lng->txt($passedStatusLangVar)
212 if ($this->testOBJ->areObligationsEnabled()) {
214 $obligAnsweredStatusLangVar =
'grading_obligations_answered_listentry';
216 $obligAnsweredStatusLangVar =
'grading_obligations_missing_listentry';
220 $this->lng->txt(
'grading_obligations_listlabel'),
221 $this->lng->txt($obligAnsweredStatusLangVar)
225 if ($this->testOBJ->isShowGradingMarkEnabled()) {
229 if ($this->testOBJ->getECTSOutput()) {
238 $this->tpl =
new ilTemplate(
'tpl.tst_grading_msg_list.html',
true,
true,
'Modules/Test');
243 $this->tpl->setCurrentBlock(
'grading_msg_entry');
244 $this->tpl->setVariable(
'LABEL', $label);
245 $this->tpl->setVariable(
'VALUE', $value);
246 $this->tpl->parseCurrentBlock();
251 $this->tpl->setCurrentBlock(
'grading_msg_list');
252 $this->tpl->parseCurrentBlock();
257 return $this->tpl->get();
__construct(ilLanguage $lng, ilObjTest $testOBJ)
populateListEntry($label, $value)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
special template class to simplify handling of ITX/PEAR
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.