I have a variable which is an array that holds the ID of all the tests that a member passed. I'm trying to find a way to display the highest test that the member passed so I can properly display the level they have achieved.
The conditionals below are used in message_user_info template which I have been testing for a while but it seems like if a user pass quiz {11, 13, 15, etc}, it will only check that they pass the first quiz and exit the if loop. If the user passed quiz {11,13}, it should display "C++ level 3"
The conditionals below are used in message_user_info template which I have been testing for a while but it seems like if a user pass quiz {11, 13, 15, etc}, it will only check that they pass the first quiz and exit the if loop. If the user passed quiz {11,13}, it should display "C++ level 3"
Code:
<xen:if hascontent="true">
<ul class="ribbon">
<xen:contentcheck>
<xen:if is="{xen:helper ismemberof, $user, 9} AND !{$user.qntquiz_passed.11}">
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
C++ Level 1
</li>
<xen:elseif is="{$user.qntquiz_passed.11}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
C++ Level 2
</li>
<xen:elseif is="{$user.qntquiz_passed.13}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
C++ Level 3
</li>
<xen:elseif is="{$user.qntquiz_passed.15}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
C++ Level 4
</li>
<xen:elseif is="{$user.qntquiz_passed.16}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
C++ Level 5
</li>
<xen:elseif is="{$user.qntquiz_passed.17}" />
<li class="ribbonPremium">
<div class="left"></div>
<div class="right"></div>
C++ Level 6
</li>
</xen:if>
</xen:contentcheck>
</ul>
</xen:if>