{function sel_sem issave=0 sems='' save='' fo='' id_disc='' id_compet=''} {*if count($save)}{assign var=sems value=$save}{/if*} {if $issave==0}{assign var=sems value=$sems}{else}{assign var=sems value=$save}{/if} {for $sem=1 to 12} {/for} {/function} {if count($comp.discs)}
 
{for $sem=1 to 12}
{$sem}
{/for}
{/if} {foreach from=$comp.discs item=disc key=k} {assign var=issave value=0}{if count($disc.save)}{assign var=issave value=1}{/if}
ОФО
{sel_sem issave=$issave sems=$disc.sems save=$disc.save.ofo fo="ofo" id_disc=$disc.id id_compet=$comp.id}
ЗФО
{sel_sem issave=$issave sems=$disc.sems1 save=$disc.save.zfo fo="zfo" id_disc=$disc.id id_compet=$comp.id}
ОЗФО
{sel_sem issave=$issave sems=$disc.sems2 save=$disc.save.ofozfo fo="ofozfo" id_disc=$disc.id id_compet=$comp.id}
{$disc.name}
{if count($disc.save)}есть сохранения семестров{else}нет сохранения семестров{/if} {/foreach}