96 lines
2.8 KiB
HTML
96 lines
2.8 KiB
HTML
|
{include file="tpl_messager.html"}
|
||
|
{if $regim=="tests"}
|
||
|
<h2>Список всех тестов</h2>
|
||
|
<table class="table">
|
||
|
{foreach from=$tests item=test key=k}
|
||
|
{if count($test.tests)}
|
||
|
<tr style="background-color:#a5a5a5;">
|
||
|
<td colspan="2"><b>{$test.razdel.name}</b></td>
|
||
|
<td colspan="2">{$test.razdel.descrip}</td>
|
||
|
</tr>
|
||
|
{foreach from=$test.tests item=test1 key=k1}
|
||
|
<tr>
|
||
|
<td>{$k1+1}</td>
|
||
|
<td>{$test1.name}</td>
|
||
|
<td>{$test1.descrip}</td>
|
||
|
<td>
|
||
|
|
||
|
{*if $test1.otvet==0}<br><a href="/learn/tests/{$test1.id}/">Пройти тест</a>{/if*}
|
||
|
{if $test1.otvet==1}
|
||
|
<hr>вы уже прошли тест <b>{$test1.otvet_data}</b>
|
||
|
{else}
|
||
|
{if $test1.probnyj==1}<a href="/learn/tests/{$test1.id}/">Пройти пробный тест</a>{/if}
|
||
|
{if $test1.kontroln==1}<a href="/learn/tests/{$test1.id}/">Пройти контрольный тест</a>{/if}
|
||
|
{if $test1.kontroln==-1}<br>для контрольного теста не назначено время прохождения!{/if}
|
||
|
{/if}
|
||
|
</td>
|
||
|
</tr>
|
||
|
{/foreach}
|
||
|
{/if}
|
||
|
{/foreach}
|
||
|
</tr>
|
||
|
</table>
|
||
|
{/if}
|
||
|
{if $regim=="test"}
|
||
|
<form method="POST">
|
||
|
<h2>Название теста: {$test.name}</h2>
|
||
|
<p>{$test.descrip}</p>
|
||
|
<div>
|
||
|
{foreach from=$test.questions item=quest key=k1}
|
||
|
<div class="row-fluid">
|
||
|
<div class="span8 offset2">
|
||
|
<h3><span class="label label-info" style="font-size: 20px;">{$k1+1}.</span> {$quest.text_q}</h3>
|
||
|
{if $quest.tip==0}
|
||
|
{foreach from=$quest.answers item=answ key=k2}
|
||
|
<p><input type="RADIO" name="quest[{$quest.id}]" value="{$answ.id}" style="width:48px;"> {$answ.text_a}</p>
|
||
|
{/foreach}
|
||
|
{/if}
|
||
|
{if $quest.tip==1}
|
||
|
{foreach from=$quest.answers item=answ key=k2}
|
||
|
<p><input type="CHECKBOX" name="quest[{$quest.id}][]" value="{$answ.id}"> {$answ.text_a}</p>
|
||
|
{/foreach}
|
||
|
{/if}
|
||
|
{if $quest.tip==2}
|
||
|
Введите ответ: <input type="TEXT" name="quest[{$quest.id}]" value="" style="width:48px;">
|
||
|
{/if}
|
||
|
{if $quest.tip==3}
|
||
|
<div class="row-fluid">
|
||
|
{for $i=1 to $quest.ocenka}
|
||
|
<div class="span1" style="font-size:24px;"><input type="RADIO" name="quest[{$quest.id}]" value="{$i}"> {$i}</div>
|
||
|
{/for}
|
||
|
</div>
|
||
|
{/if}
|
||
|
</div>
|
||
|
</div>
|
||
|
{/foreach}
|
||
|
</div>
|
||
|
<div class="row-fluid">
|
||
|
<div class="span8 offset2">
|
||
|
<input type="SUBMIT" name="save_test" class="btn btn-warning" value="Сохранить">
|
||
|
<input type="HIDDEN" name="id_test" value="{$test.id}">
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
|
||
|
{literal}<script type="text/javascript">$(document).ready(function () {
|
||
|
function f(){
|
||
|
$.ajax({
|
||
|
url: '/json.php', dataType:'json', type:'POST', async:false, data: 'ajdes=empty_post',
|
||
|
success: function(data){}
|
||
|
});
|
||
|
}
|
||
|
setInterval(f, 150000);
|
||
|
});</script>
|
||
|
<style>
|
||
|
#test-item {
|
||
|
margin: 20px auto;
|
||
|
width: 100%;
|
||
|
padding: 1em;
|
||
|
font-family: sans-serif;
|
||
|
font-weight: normal;
|
||
|
font-size: 1.5em;
|
||
|
color:#000;
|
||
|
}
|
||
|
</style>
|
||
|
{/literal}
|
||
|
{/if}
|