Skip to content

Commit

Permalink
ilias mantis ticket 36204, removed css class variable MAT_ONOFFLINE_C…
Browse files Browse the repository at this point in the history
…LASS from template
  • Loading branch information
chlulei committed Jan 18, 2024
1 parent ee79127 commit 3efd856
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,14 @@ protected function fillRow(array $a_set): void
$this->tpl->setVariable('LM_ALT', $this->lng->txt('obj_' . $data['type']));

if ($data['online']) {
$this->tpl->setCurrentBlock('mat_online');
$this->tpl->setVariable('MAT_VAL_ONOFFLINE', $this->lng->txt('online'));
$this->tpl->setVariable('MAT_ONOFFLINE_CLASS', 'smallgreen');
} else {
$this->tpl->setCurrentBlock('mat_offline');
$this->tpl->setVariable('MAT_VAL_ONOFFLINE', $this->lng->txt('offline'));
$this->tpl->setVariable('MAT_ONOFFLINE_CLASS', 'smallred');
}
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock('mat_row');

if ($data['type'] == 'catr' || $data['type'] == 'crsr' || $data['type'] == 'grpr') {
$this->tpl->setVariable(
Expand All @@ -136,6 +138,7 @@ protected function fillRow(array $a_set): void
} else {
$this->tpl->setVariable('LM_TITLE', ilObject::_lookupTitle($data['obj_id']));
}

$this->tpl->parseCurrentBlock();
}

Expand Down
15 changes: 11 additions & 4 deletions Modules/Course/templates/default/tpl.crs_objectives_table_row.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,20 @@
<!-- BEGIN new_line -->
<br/>
<!-- END new_line -->
<!-- BEGIN mat_online -->
<div>
<span class="{MAT_ONOFFLINE_CLASS}">{MAT_VAL_ONOFFLINE}</span>
<span class="smallgreen">{MAT_VAL_ONOFFLINE}</span>
</div>
<!-- END mat_row -->
<!-- END mat_online -->
<!-- BEGIN mat_offline -->
<div>
<span class="smallred">{MAT_VAL_ONOFFLINE}</span>
</div>
<!-- END mat_offline -->
<!-- BEGIN new_line_two -->
<br/>
<!-- END new_line_two -->
<!-- END mat_row -->
</td>
<!-- BEGIN with_self_test -->
<td class="std">
Expand All @@ -60,7 +67,7 @@
<td class="std">
<!-- BEGIN final_qst_row --><p>{FINAL_QST_TITLE}</p><!-- END final_qst_row -->
<!-- BEGIN final_test_rnd -->
{SELF_QST_RND_TITLE}
{block name={SELF_QST_RND_TITLE}}{/block}
<!-- END final_test_rnd -->
<!-- BEGIN final_test_per_objective -->
<img class="ilIcon" src="{FT_IMG}" alt="{FT_ALT}" title="{FT_ALT}" /> <a href="{FT_TITLE_LINK}">{FT_TITLE}</a>
Expand All @@ -72,4 +79,4 @@
{VAL_ACTIONS}
</div>
</td>
</tr>
</tr>

0 comments on commit 3efd856

Please sign in to comment.