762 lines
44 KiB
PHP
762 lines
44 KiB
PHP
<?php /* Smarty version Smarty-3.1.13, created on 2022-04-12 08:08:10
|
||
compiled from "tpl/tpl_teacher_tests.html" */ ?>
|
||
<?php /*%%SmartyHeaderCode:5627128376255093ab479f6-30416071%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
'file_dependency' =>
|
||
array (
|
||
'9393a4469228e15d0ced662baf40906e434a678f' =>
|
||
array (
|
||
0 => 'tpl/tpl_teacher_tests.html',
|
||
1 => 1603183595,
|
||
2 => 'file',
|
||
),
|
||
),
|
||
'nocache_hash' => '5627128376255093ab479f6-30416071',
|
||
'function' =>
|
||
array (
|
||
),
|
||
'variables' =>
|
||
array (
|
||
'regim' => 0,
|
||
'rtests' => 0,
|
||
'test' => 0,
|
||
'id_test' => 0,
|
||
'k' => 0,
|
||
'tt' => 0,
|
||
'files' => 0,
|
||
'f' => 0,
|
||
'tests' => 0,
|
||
'lc' => 0,
|
||
'tests_ch' => 0,
|
||
'razdels' => 0,
|
||
'ra' => 0,
|
||
'gr' => 0,
|
||
'questions' => 0,
|
||
'qt' => 0,
|
||
'an' => 0,
|
||
'k1' => 0,
|
||
),
|
||
'has_nocache_code' => false,
|
||
'version' => 'Smarty-3.1.13',
|
||
'unifunc' => 'content_6255093abe1f52_71976256',
|
||
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
<?php if ($_valid && !is_callable('content_6255093abe1f52_71976256')) {function content_6255093abe1f52_71976256($_smarty_tpl) {?><!-- BEGIN PAGE HEADER-->
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<h3 class="page-title">Обзор всех тестов</h3>
|
||
<ul class="breadcrumb">
|
||
<li><a href="/">Главная</a><span class="divider">/</span></li>
|
||
<li class="active"><a href="/teach/tests/">Обучать - тесты</a></li>
|
||
<li><a class="btn btn-primary" href="/teach/tests/" style="color:#fff;">Все тесты</a></li>
|
||
<li><a class="btn btn-warning" href="/teach/tests/add/" style="color:#fff;"><i class="icon-plus icon-white"></i> Добавить тест</a></li>
|
||
<li><a class="btn btn-danger" href="/teach/tests/export/" style="color:#fff;"><i class="icon-plus icon-white"></i> Экспорт тестов</a></li>
|
||
<li><a class="btn btn-info" href="/upload/help_tests.pdf" style="color:#fff;" target="_blank"><i class="icon-question icon-white"></i> ПОМОЩЬ</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<?php echo $_smarty_tpl->getSubTemplate ("tpl_messager.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
|
||
|
||
<div class="row-fluid">
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='result'){?>
|
||
<table class="table">
|
||
<thead><tr>
|
||
<th>ФИО</th>
|
||
<th>Группа</th>
|
||
<th>Попытка</th>
|
||
<th>Дата</th>
|
||
<th>Баллы</th>
|
||
<th>Возможный максимум *</th>
|
||
<th>Удаление</th>
|
||
</tr></thead><tbody>
|
||
<?php $_smarty_tpl->tpl_vars['test'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['test']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['rtests']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['test']->key => $_smarty_tpl->tpl_vars['test']->value){
|
||
$_smarty_tpl->tpl_vars['test']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['test']->key;
|
||
?>
|
||
|
||
<?php $_smarty_tpl->tpl_vars['tt'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['tt']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['test']->value['tests']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['tt']->key => $_smarty_tpl->tpl_vars['tt']->value){
|
||
$_smarty_tpl->tpl_vars['tt']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['tt']->key;
|
||
?><tr>
|
||
<td width="45%"><span class="btn btn-success view-result" data-id="<?php echo $_smarty_tpl->tpl_vars['test']->value['id_user'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['id_test']->value;?>
|
||
">См.</span> <?php echo $_smarty_tpl->tpl_vars['test']->value['fio'];?>
|
||
</td>
|
||
<td width="20%"><?php echo $_smarty_tpl->tpl_vars['test']->value['sokr'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['test']->value['kurs'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['test']->value['num_grupp'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['test']->value['fo'];?>
|
||
</td>
|
||
<td width="10%"><b><?php echo $_smarty_tpl->tpl_vars['k']->value;?>
|
||
.</b></td>
|
||
<td width="10%"><?php echo $_smarty_tpl->tpl_vars['tt']->value['data_c'];?>
|
||
</td>
|
||
<td width="5%" style="text-align:right;"><?php echo $_smarty_tpl->tpl_vars['tt']->value['balls'];?>
|
||
</td>
|
||
<td width="5%" style="text-align:right;"><?php echo $_smarty_tpl->tpl_vars['tt']->value['balls_all'];?>
|
||
</td>
|
||
<td width="5%" style="text-align:right;"><span class="btn btn-warning del-result" data-id="<?php echo $_smarty_tpl->tpl_vars['test']->value['id_user'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['id_test']->value;?>
|
||
">Удалить</span></td>
|
||
</tr><?php } ?>
|
||
|
||
<?php } ?>
|
||
</tbody></table>
|
||
<hr />
|
||
<b>* - это возможное максимальное количество набранных баллов за тест, а не оценка студента!</b><br />
|
||
|
||
<a href="#" class="btn btn-danger del-result-all" data-id="<?php echo $_smarty_tpl->tpl_vars['id_test']->value;?>
|
||
">Удалить ВСЕ результаты</a> - <span style="color: red;">Внимание! Операция необратима!</span>
|
||
|
||
<script type="text/javascript">
|
||
$(document).ready(function(){
|
||
$(".view-result").click(function(){
|
||
var dat = $(this).data("id").split("-");
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=test_view_rez&user='+dat[0]+'&test='+dat[1],
|
||
success: function(data){
|
||
$('#ViewResult_user').text(data.user);
|
||
//$('#ViewResult_balls').text(data.ball);
|
||
$('#ViewResult_body').html(data.body);
|
||
$('#ViewResult').modal('show');
|
||
}
|
||
});
|
||
});
|
||
$(".del-result").click(function(){
|
||
var content = $(this).data("id");
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=test_del_rez&content='+content,
|
||
success: function(){
|
||
alert("Результат удален - пользователь может пройти тест еще раз");
|
||
location.href=location.href;
|
||
}
|
||
});
|
||
});
|
||
|
||
$(".del-result-all").click(function(){
|
||
var id = $(this).data("id");
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=test_del_rez_all&id='+id,
|
||
success: function(){
|
||
alert("Результаты удалены!");
|
||
location.href=location.href;
|
||
}
|
||
});
|
||
});
|
||
|
||
});
|
||
</script>
|
||
<!--МОДАЛ ОКНО ДЛЯ РЕЗУЛЬТАТОВ-->
|
||
<div id="ViewResult" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="ViewResultLabel" aria-hidden="true" style="display: none;left: 30%;width: 80%;">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h3 id="ViewResultLabel">Все результаты теста выбранного пользователя <span id="ViewResult_user"></span> <span id="ViewResult_balls"></span></h3>
|
||
</div>
|
||
<div class="modal-body" id="ViewResult_body">
|
||
</div>
|
||
<div class="modal-footer">
|
||
<span style="color: #aeaeae;">Разработчик: Яковлев А.Л.</span> <button class="btn" data-dismiss="modal" aria-hidden="true">Закрыть</button>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='export'){?>
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
|
||
<div class="widget green">
|
||
<div class="widget-title">
|
||
<h4>Загрузка файла из системы moodle </h4>
|
||
<span class="tools">
|
||
<a href="javascript:;" class="icon-chevron-down"></a>
|
||
</span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<p>Выбираете свой курс, слева выбираете "Резервное копирование", выбираете "Тесты", нажимаете продолжить, после появится файл архив в имени будет дата создания, его загружаете сюда</p>
|
||
<form method="POST" enctype="multipart/form-data">
|
||
<p>Загрузите файл</p>
|
||
<p><input type="file" name="userfile"></p>
|
||
<p><input type="submit" name="upload"></p>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<?php if (isset($_smarty_tpl->tpl_vars['files']->value)&&count($_smarty_tpl->tpl_vars['files']->value)){?>
|
||
<div class="widget green">
|
||
<div class="widget-title">
|
||
<h4>Существующие загруженные файлы </h4><span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<p>Выберите файл для экспорта в систему!</p>
|
||
<?php $_smarty_tpl->tpl_vars['f'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['f']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['files']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['f']->key => $_smarty_tpl->tpl_vars['f']->value){
|
||
$_smarty_tpl->tpl_vars['f']->_loop = true;
|
||
?>
|
||
<a href="/teach/tests/exportf/<?php echo $_smarty_tpl->tpl_vars['f']->value;?>
|
||
/"><?php echo $_smarty_tpl->tpl_vars['f']->value;?>
|
||
</a><br>
|
||
<?php } ?>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='show'){?>
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
|
||
<div class="widget green">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> Мои тесты</h4><span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<?php if (count($_smarty_tpl->tpl_vars['tests']->value)){?>
|
||
<table class="table table-striped table-bordered table-advance table-hover">
|
||
<thead>
|
||
<tr>
|
||
<th><i class="icon-bullhorn"></i> Дата</th>
|
||
<th><i class="icon-question-sign"></i> Название</th>
|
||
<th><i class="icon-bookmark"></i> Описание</th>
|
||
<th><i class="icon-bookmark"></i> Кол-во вопросов</th>
|
||
<th><i class="icon-bookmark"></i> Результаты</th>
|
||
<th><i class=" icon-edit"></i> </th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php $_smarty_tpl->tpl_vars['lc'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lc']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['tests']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['lc']->key => $_smarty_tpl->tpl_vars['lc']->value){
|
||
$_smarty_tpl->tpl_vars['lc']->_loop = true;
|
||
?>
|
||
<tr>
|
||
<td nowrap><?php echo $_smarty_tpl->tpl_vars['lc']->value['data_c'];?>
|
||
</td>
|
||
<td><strong><?php echo $_smarty_tpl->tpl_vars['lc']->value['razde'];?>
|
||
</strong><br><?php echo $_smarty_tpl->tpl_vars['lc']->value['name'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['lc']->value['descrip'];?>
|
||
</td>
|
||
<td><a class="btn btn-success tooltips" data-trigger="hover" data-original-title="Добавить/Редактировать вопросы теста" href="/teach/tests/questions/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
/"><i class="icon-question"></i></a>
|
||
<?php echo $_smarty_tpl->tpl_vars['lc']->value['questions'];?>
|
||
</td>
|
||
<td><a href="/teach/tests/result/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
/">посмотреть</a></td>
|
||
<td nowarp>
|
||
<a class="btn btn-primary" href="/teach/tests/edit/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
/"><i class="icon-pencil"></i></a>
|
||
<a class="btn btn-success copy-test" data-id="<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
" href="#"><i class="icon-plus icon-white"></i></a>
|
||
<a class="btn btn-danger" href="/teach/tests/del/<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
/" onclick="return confirm('Вы уверены, что хотите удалить?')"><i class="icon-trash "></i></a>
|
||
</td>
|
||
</tr>
|
||
<?php } ?>
|
||
</tbody>
|
||
</table>
|
||
<?php }?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<div class="row-fluid">
|
||
<div class="widget blue">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> Тесты других преподавателей</h4><span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
|
||
<form name="active" method="post" action="#" class="form-horizontal">
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Поиск теста: </label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<input type="text" name="name" minlength="5" required />
|
||
</div>
|
||
<span class="help-inline">Введите название теста</span> <input type="submit" name="search_test" class="btn btn-success" value="Искать" />
|
||
</div>
|
||
</div>
|
||
|
||
<span>Выводятся только те тесты, в которых не менее 10 вопросов и которые разрешены для копирования коллегами.</span>
|
||
|
||
|
||
</form>
|
||
<?php if (count($_smarty_tpl->tpl_vars['tests']->value)){?>
|
||
<table class="table table-striped table-bordered table-advance table-hover">
|
||
<thead>
|
||
<tr>
|
||
<th><i class="icon-bullhorn"></i> Дата</th>
|
||
<th><i class="icon-question-sign"></i> Название</th>
|
||
<th><i class="icon-bookmark"></i> Кол-во вопросов</th>
|
||
<th><i class="icon-bookmark"></i> Автор</th>
|
||
<th><i class=" icon-edit"></i> Копирование себе </th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php $_smarty_tpl->tpl_vars['lc'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lc']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['tests_ch']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['lc']->key => $_smarty_tpl->tpl_vars['lc']->value){
|
||
$_smarty_tpl->tpl_vars['lc']->_loop = true;
|
||
?>
|
||
<?php if (($_smarty_tpl->tpl_vars['lc']->value['questions']>9)){?>
|
||
<tr>
|
||
<td nowrap><?php echo $_smarty_tpl->tpl_vars['lc']->value['data_c'];?>
|
||
</td>
|
||
<td><strong><?php echo $_smarty_tpl->tpl_vars['lc']->value['razde'];?>
|
||
</strong><br><?php echo $_smarty_tpl->tpl_vars['lc']->value['name'];?>
|
||
</td>
|
||
<td>
|
||
<?php echo $_smarty_tpl->tpl_vars['lc']->value['questions'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['lc']->value['fio'];?>
|
||
</td>
|
||
<td nowrap>
|
||
<span class="btn btn-primary copy-test" data-id="<?php echo $_smarty_tpl->tpl_vars['lc']->value['id'];?>
|
||
">Скопировать</span>
|
||
</td>
|
||
</tr>
|
||
<?php }?>
|
||
<?php } ?>
|
||
</tbody>
|
||
</table>
|
||
<?php }?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$(document).ready(function(){
|
||
//
|
||
$(".copy-test").click(function(){
|
||
var id = $(this).data("id");
|
||
|
||
$(this).html("Идет копирование...");
|
||
|
||
|
||
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=copy_test&id='+id,
|
||
success: function(data){
|
||
//console.log(data.html);
|
||
location.href=location.href;
|
||
|
||
}
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='aded'){?>
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> <?php echo $_smarty_tpl->tpl_vars['test']->value['title'];?>
|
||
</h4><span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<form action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
||
<div class="control-group">
|
||
<label class="control-label">Раздел</label>
|
||
<div class="controls">
|
||
<select class="span6 tooltips" data-trigger="hover" data-original-title="Выберите раздел для теста" name="id_razdel">
|
||
<option value="0">Выберите раздел</option>
|
||
<?php $_smarty_tpl->tpl_vars['ra'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['ra']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['razdels']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['ra']->key => $_smarty_tpl->tpl_vars['ra']->value){
|
||
$_smarty_tpl->tpl_vars['ra']->_loop = true;
|
||
?>
|
||
<option value="<?php echo $_smarty_tpl->tpl_vars['ra']->value['id'];?>
|
||
"<?php if ($_smarty_tpl->tpl_vars['ra']->value['sel']==1){?> SELECTED<?php }?>><?php echo $_smarty_tpl->tpl_vars['ra']->value['name'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
<input type="text" class="span6 tooltips" data-trigger="hover" data-original-title="Если нет в выпадающем списке раздела, укажите имя нового раздела" name="new_razdel" value="" placeholder="или название нового раздела" />
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Название</label>
|
||
<div class="controls">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="наименование теста (не более 255 символов)" name="name" value="<?php echo $_smarty_tpl->tpl_vars['test']->value['name'];?>
|
||
" />
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Описание</label>
|
||
<div class="controls">
|
||
<textarea class="span12 tooltips" rows="3" data-trigger="hover" data-original-title="Опишите в кратце о чем материал" name="descrip"><?php echo $_smarty_tpl->tpl_vars['test']->value['descrip'];?>
|
||
</textarea>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<div class="controls">
|
||
<div class="span3">
|
||
<input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Если галочка стоит, то тест доступен для студентов" name="status"<?php if ($_smarty_tpl->tpl_vars['test']->value['status']==1){?> CHECKED<?php }?> /> Статус
|
||
</div>
|
||
<div class="span3">
|
||
<input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Если галочка стоит, то тест отображает вопросы в случайном порядке" name="random_q"<?php if ($_smarty_tpl->tpl_vars['test']->value['random_q']==1){?> CHECKED<?php }?> /> Случайные вопросы
|
||
</div>
|
||
<div class="span3">
|
||
<input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Если галочка стоит, то тест доступен для пробного тестирования" name="test"<?php if ($_smarty_tpl->tpl_vars['test']->value['tests']==1){?> CHECKED<?php }?> /> Пробный тест
|
||
</div>
|
||
<div class="span3">
|
||
<input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Если галочка стоит, то тест разрешено копировать коллегам" name="copy"<?php if ($_smarty_tpl->tpl_vars['test']->value['copy']==1){?> CHECKED<?php }?> /> Разрешено копировать
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Группы привязанные к тесту</label>
|
||
<div class="controls">
|
||
<div class="span8">
|
||
<select data-placeholder="Укажите для каких групп доступен тест" class="chzn-select span12" multiple="multiple" tabindex="6" name="grupps[]">
|
||
<option value=""></option>
|
||
<?php $_smarty_tpl->tpl_vars['gr'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['gr']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['test']->value['grupps']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['gr']->key => $_smarty_tpl->tpl_vars['gr']->value){
|
||
$_smarty_tpl->tpl_vars['gr']->_loop = true;
|
||
?>
|
||
<option<?php if ($_smarty_tpl->tpl_vars['gr']->value['sel']==1){?> selected<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['gr']->value['id'];?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['gr']->value['sokr'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['gr']->value['kurs'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['gr']->value['fo'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
</div>
|
||
<div class="span4">
|
||
<input type="TEXT" class="span4 tooltips" data-trigger="hover" data-original-title="Введите время и дату начала открытия контрольного теста в формате чч:мм дд.мм.ГГГГ" name="data_testa" value="<?php echo $_smarty_tpl->tpl_vars['test']->value['data_testa'];?>
|
||
" placeholder="14:30 18.04.2018"/> открыть контрольный тест
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-actions">
|
||
<?php if ($_smarty_tpl->tpl_vars['test']->value['regim']=="edit"){?>
|
||
<input type="HIDDEN" name="id" value="<?php echo $_smarty_tpl->tpl_vars['test']->value['id'];?>
|
||
">
|
||
<button type="submit" name="edit" class="btn btn-success">Редактировать</button>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['test']->value['regim']=="add"){?>
|
||
<button type="submit" name="add" class="btn btn-success">Добавить</button>
|
||
<?php }?>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['regim']->value=='questions'){?>
|
||
<div class="span12">
|
||
|
||
<h2><i class="icon-reorder"></i> Тест: <?php echo $_smarty_tpl->tpl_vars['questions']->value['test']['name'];?>
|
||
</h2>
|
||
|
||
<script type="text/javascript" src="/inc/editor1/nicEdit/nicEdit.js"></script>
|
||
<script type="text/javascript">$(document).ready(function(){
|
||
//<![CDATA[
|
||
bkLib.onDomLoaded(function() {
|
||
<?php $_smarty_tpl->tpl_vars['qt'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['qt']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['questions']->value['ques']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['qt']->key => $_smarty_tpl->tpl_vars['qt']->value){
|
||
$_smarty_tpl->tpl_vars['qt']->_loop = true;
|
||
?>
|
||
new nicEditor({fullPanel: true,buttonList : ['imagesManager'],iconsPath: '/inc/editor1/nicEdit/nicEditorIcons.gif',uploadURI: '/inc/editor1/script.php?q=imanager',imanagerURI: '/inc/editor1/script.php?q=imanager'}).panelInstance('area<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
');
|
||
<?php $_smarty_tpl->tpl_vars['an'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['an']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['qt']->value['answers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['an']->key => $_smarty_tpl->tpl_vars['an']->value){
|
||
$_smarty_tpl->tpl_vars['an']->_loop = true;
|
||
?>
|
||
new nicEditor({fullPanel: true,buttonList : ['imagesManager'],iconsPath: '/inc/editor1/nicEdit/nicEditorIcons.gif',uploadURI: '/inc/editor1/script.php?q=imanager',imanagerURI: '/inc/editor1/script.php?q=imanager'}).panelInstance('area<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
_<?php echo $_smarty_tpl->tpl_vars['an']->value['id'];?>
|
||
');
|
||
<?php } ?>
|
||
<?php } ?>
|
||
});
|
||
$(document).on('click', '.icon-chevron-up', function(){//чтобы текстовые блоки имели ширину 100%
|
||
$(this).closest('.widget').find(".textarea").children().each(function( index ) {
|
||
$(this).css({'width':'100%'});
|
||
});
|
||
$(this).closest('.widget').find(".textarea").find(".nicEdit-main").each(function( index ) {
|
||
$(this).css({'width':'100%'});
|
||
});
|
||
});
|
||
$(document).on('click', '.fsave', function(){//обработчик форм
|
||
var id = $(this).attr('id');
|
||
$('#message_'+id).html("");
|
||
//тут надо все из nicEditor перевести в textarea!
|
||
$('.textarea').each(function( index ) {
|
||
var text = $(this).find('.nicEdit-main').html();
|
||
$(this).find('textarea').val(text);
|
||
});
|
||
var dataform = $(this).closest('form').serialize();
|
||
$.ajax({//url: 'test.php',
|
||
type : "POST", dataType : 'json', data : dataform,
|
||
success : function(result) {
|
||
$('#message_'+id).html(result.rez);
|
||
if(typeof(result.qdele) != "undefined" && result.qdele !== null) {//Удаление Вопроса
|
||
$.each( result.qdele, function( key, value ) { $("#question_"+value).remove(); });
|
||
}
|
||
if(typeof(result.adele) != "undefined" && result.adele !== null) {//Удаление ответа
|
||
$.each( result.adele, function( key, value ) { $("#answer_"+value).remove(); });
|
||
}
|
||
//сделаем рефреш страницы из-за того что следующие добавленные вопросы не сохраняются изза текстареа
|
||
//location.reload();
|
||
},error: function(xhr, resp, text) {}
|
||
})
|
||
return false;
|
||
});
|
||
$(document).on('click', '.fadd_answer', function(){//добавление нового ответа
|
||
var t = $(this).attr('id').split('_');
|
||
var id_test = t[2];
|
||
var answers_kol = parseInt($('#answers_kol_'+id_test).val())+1;
|
||
var answers_new = parseInt($('#answers_new_'+id_test).val())+1; //старый вариант
|
||
var answers_new = parseInt($('#answers_new_'+id_test).val())+1+3;
|
||
var id_answer = answers_new*(-1);
|
||
//$(".ianswers_"+id_test+" .ianswer_0").clone().appendTo(".ianswers_"+id_test);
|
||
var answer = add_answer(id_test,answers_kol,id_answer);
|
||
$(".ianswers_"+id_test).append(answer);
|
||
new nicEditor({fullPanel: true,buttonList : ['imagesManager'],iconsPath: '/inc/editor1/nicEdit/nicEditorIcons.gif',uploadURI: '/inc/editor1/script.php?q=imanager',imanagerURI: '/inc/editor1/script.php?q=imanager'}).panelInstance('area'+id_test+'_'+id_answer+'');
|
||
|
||
$('#answers_kol_'+id_test).val(answers_kol);
|
||
$('#answers_new_'+id_test).val(answers_new);
|
||
return false;
|
||
});
|
||
$(document).on('click', '.fadd_question', function(){//добавление нового вопроса
|
||
var t = $(this).attr('id').split('_');
|
||
var id_test = t[2];
|
||
var questions_kol = parseInt($('#questions_kol_'+id_test).val())+1;
|
||
var questions_new = parseInt($('#questions_new_'+id_test).val())+1;
|
||
var id_question = questions_new*(-1);
|
||
var quest = '<form action="" class="form-horizontal fquest" method="POST" enctype="multipart/form-data">';
|
||
quest += '<div class="widget blue" id="question_'+id_question+'"><div class="widget-title">';
|
||
quest += '<h4><i class="icon-reorder"></i> Вопрос №'+questions_kol+' </h4><span class="tools"><a href="javascript:;" class="icon-chevron-up"></a></span></div>';
|
||
quest += '<div class="widget-body" style="display: none;">';
|
||
quest += '<div class="control-group"><label class="control-label">Тип вопроса</label><div class="controls">';
|
||
quest += '<select class="span12 tooltips" data-trigger="hover" data-original-title="Выберите тип вопроса" name="tip">';
|
||
quest += '<option value="0" SELECTED>ответ один</option><option value="1">ответ множественный</option><option value="2">ответ вводится вручную</option><option value="3">для каждого ответа ставится бал от 0 до оценки</option></select>';
|
||
quest += '</div></div>';
|
||
quest += '<div class="control-group">';
|
||
quest += '<label class="control-label">Текст вопроса</label><div class="controls textarea">';
|
||
quest += '<textarea class="span12 tooltips textedt" cols="100%" rows="4" id="area'+id_question+'" data-trigger="hover" data-original-title="Текст вопроса" name="text_q" style="width:100%;"></textarea>';
|
||
quest += '</div></div>';
|
||
quest += '<div class="control-group"><label class="control-label">Оценка</label><div class="controls">';
|
||
quest += '<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Оценка" name="ocenka" value="0" />';
|
||
quest += '</div></div>';
|
||
quest += '<div class="control-group"><label class="control-label">Позиция</label><div class="controls">';
|
||
quest += '<div class="span3"><input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Позиция вопроса" name="pos" value="0" placeholder="Позиция вопроса"/></div>';
|
||
quest += '<div class="span3"><input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Если галочка стоит, то в вопросе ответы отображаются в случайном порядке" name="random_a" CHECKED/> Случайные ответы</div>';
|
||
quest += '<div class="span3"><input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Если галочка стоит, то вопрос доступен для пробного тестирования" name="test"/> Пробный вопрос</div>';
|
||
quest += '<div class="span3"><input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Удалить вопрос" name="question_dele"/> удалить</div>';
|
||
quest += '</div></div></div>';
|
||
quest += '<div class="widget-body ianswers_'+id_question+'" style="display: none;"><h4>Ответы вопроса</h4>';
|
||
quest += add_answer(id_test,1,-1);
|
||
quest += add_answer(id_test,2,-2);
|
||
quest += add_answer(id_test,3,-3);
|
||
quest += '</div><div class="widget-body" style="display: none;"><div class="form-actions">';
|
||
quest += '<input type="HIDDEN" id="answers_new_'+id_question+'" value="0">';
|
||
quest += '<input type="HIDDEN" id="answers_kol_'+id_question+'" value="3">';
|
||
quest += '<a href="#" class="btn btn-warning fadd_answer" id="addanswer_for_'+id_question+'" style="float: left;margin-right: 10px;">Добавить еще один ответ</a>';
|
||
quest += '<input type="HIDDEN" name="test_id" value="'+id_test+'">';
|
||
quest += '<input type="HIDDEN" name="ques_id" value="'+id_question+'">';
|
||
quest += '<button type="submit" name="qedit" class="btn btn-success fsave" id="'+id_question+'">Сохранить изменения в вопросе и ответах</button>';
|
||
quest += '<div class="" id="message_'+id_question+'"></div>';
|
||
quest += '</div></div></div></form>';
|
||
|
||
$(".questions_"+id_test).append(quest);
|
||
new nicEditor({fullPanel: true,buttonList : ['imagesManager'],iconsPath: '/inc/editor1/nicEdit/nicEditorIcons.gif',uploadURI: '/inc/editor1/script.php?q=imanager',imanagerURI: '/inc/editor1/script.php?q=imanager'}).panelInstance('area'+id_question);
|
||
new nicEditor({fullPanel: true,buttonList : ['imagesManager'],iconsPath: '/inc/editor1/nicEdit/nicEditorIcons.gif',uploadURI: '/inc/editor1/script.php?q=imanager',imanagerURI: '/inc/editor1/script.php?q=imanager'}).panelInstance('area'+id_test+'_-1');
|
||
new nicEditor({fullPanel: true,buttonList : ['imagesManager'],iconsPath: '/inc/editor1/nicEdit/nicEditorIcons.gif',uploadURI: '/inc/editor1/script.php?q=imanager',imanagerURI: '/inc/editor1/script.php?q=imanager'}).panelInstance('area'+id_test+'_-2');
|
||
new nicEditor({fullPanel: true,buttonList : ['imagesManager'],iconsPath: '/inc/editor1/nicEdit/nicEditorIcons.gif',uploadURI: '/inc/editor1/script.php?q=imanager',imanagerURI: '/inc/editor1/script.php?q=imanager'}).panelInstance('area'+id_test+'_-3');
|
||
|
||
$('#questions_kol_'+id_test).val(questions_kol);
|
||
$('#questions_new_'+id_test).val(questions_new);
|
||
return false;
|
||
});
|
||
function add_answer(id_test,answers_kol,id_answer){
|
||
var answer = '<div class="control-group ianswer_'+(answers_kol-1)+'" id="answer_'+id_answer+'">';
|
||
answer += '<label class="control-label">Ответ № '+answers_kol+'</label>';
|
||
answer += '<div class="controls">';
|
||
answer += '<div class="span7 textarea">';
|
||
answer += '<textarea class="span12 textedt" cols="100%" rows="4" id="area'+id_test+'_'+id_answer+'" name="text_a['+id_answer+']"></textarea>';
|
||
answer += '</div>';
|
||
answer += '<div class="span3">';
|
||
answer += '<select class="span12 tooltips" data-trigger="hover" data-original-title="Выберите тип ответа" name="tip_a['+id_answer+']">';
|
||
answer += '<option value="1">Не правильный ответ</option><option value="0" SELECTED>Правильный ответ</option><option value="-10">для каждого ответа ставится бал от 0 до оценки вопроса</option></select>';
|
||
answer += '</div>';
|
||
answer += '<div class="span1">';
|
||
answer += '<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Позиция ответа" name="pos_a['+id_answer+']" value="0" placeholder="Позиция ответа"/> позиция ответа</div>';
|
||
answer += '<div class="span1"><input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Удалить ответ" name="answer_dele['+id_answer+']"/></div>';
|
||
answer += '</div></div>';
|
||
return answer;
|
||
}
|
||
//]]>
|
||
});</script>
|
||
|
||
<div class="questions_<?php echo $_smarty_tpl->tpl_vars['questions']->value['test']['id'];?>
|
||
">
|
||
<?php $_smarty_tpl->tpl_vars['qt'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['qt']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['questions']->value['ques']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['qt']->key => $_smarty_tpl->tpl_vars['qt']->value){
|
||
$_smarty_tpl->tpl_vars['qt']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['qt']->key;
|
||
?>
|
||
<form action="" class="form-horizontal fquest" method="POST" enctype="multipart/form-data">
|
||
<div class="widget blue" id="question_<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> Вопрос №<?php echo $_smarty_tpl->tpl_vars['k']->value+1;?>
|
||
|
||
<?php if ($_smarty_tpl->tpl_vars['qt']->value['tip']==0){?><span class="badge badge-inverse tooltips" data-trigger="hover" data-original-title="ответ один">1</span><?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['qt']->value['tip']==1){?><span class="badge badge-inverse tooltips" data-trigger="hover" data-original-title="ответ множественный">...</span><?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['qt']->value['tip']==2){?><span class="badge badge-inverse tooltips" data-trigger="hover" data-original-title="ответ вводится вручную">_</span><?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['qt']->value['tip']==3){?><span class="badge badge-inverse tooltips" data-trigger="hover" data-original-title="для каждого ответа ставится бал от 0 до оценки">1-5</span><?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['qt']->value['tests']==1){?><span class="label label-important tooltips" data-trigger="hover" data-original-title="пробный вопрос">П</span><?php }else{ ?><span class="label label-warning tooltips" data-trigger="hover" data-original-title="контрольный вопрос">К</span><?php }?>
|
||
<span style="color:#090a09;"><?php echo $_smarty_tpl->tpl_vars['qt']->value['ocenka'];?>
|
||
</span>
|
||
<span style="color:#090a09;"><?php echo mb_substr(strip_tags(htmlspecialchars_decode($_smarty_tpl->tpl_vars['qt']->value['text_q'], ENT_QUOTES)),0,60);?>
|
||
...</span>
|
||
</h4><span class="tools"><a href="javascript:;" class="icon-chevron-up">Развернуть/Свернуть</a></span>
|
||
</div>
|
||
<div class="widget-body" style="display: none;">
|
||
<div class="control-group">
|
||
<label class="control-label">Тип вопроса</label>
|
||
<div class="controls">
|
||
<select class="span12 tooltips" data-trigger="hover" data-original-title="Выберите тип вопроса" name="tip">
|
||
<option value="0"<?php if ($_smarty_tpl->tpl_vars['qt']->value['tip']==0){?> SELECTED<?php }?>>ответ один</option>
|
||
<option value="1"<?php if ($_smarty_tpl->tpl_vars['qt']->value['tip']==1){?> SELECTED<?php }?>>ответ множественный</option>
|
||
<option value="2"<?php if ($_smarty_tpl->tpl_vars['qt']->value['tip']==2){?> SELECTED<?php }?>>ответ вводится вручную</option>
|
||
<option value="3"<?php if ($_smarty_tpl->tpl_vars['qt']->value['tip']==3){?> SELECTED<?php }?>>для каждого ответа ставится бал от 0 до оценки</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Текст вопроса</label>
|
||
<div class="controls textarea">
|
||
<textarea class="span12 tooltips textedt" cols="100%" rows="4" id="area<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
" data-trigger="hover" data-original-title="Текст вопроса" name="text_q" style="width:100%;"><?php echo $_smarty_tpl->tpl_vars['qt']->value['text_q'];?>
|
||
</textarea>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Оценка</label>
|
||
<div class="controls">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Оценка" name="ocenka" value="<?php echo $_smarty_tpl->tpl_vars['qt']->value['ocenka'];?>
|
||
" />
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Позиция</label>
|
||
<div class="controls">
|
||
<div class="span3">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Позиция вопроса" name="pos" value="<?php echo $_smarty_tpl->tpl_vars['qt']->value['pos'];?>
|
||
" placeholder="Позиция вопроса"/>
|
||
</div>
|
||
<div class="span3">
|
||
<input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Если галочка стоит, то в вопросе ответы отображаются в случайном порядке" name="random_a"<?php if ($_smarty_tpl->tpl_vars['qt']->value['random_a']==1){?> CHECKED<?php }?> /> Случайные ответы
|
||
</div>
|
||
<div class="span3">
|
||
<input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Если галочка стоит, то вопрос доступен для пробного тестирования" name="test"<?php if ($_smarty_tpl->tpl_vars['qt']->value['tests']==1){?> CHECKED<?php }?> /> Пробный вопрос
|
||
</div>
|
||
<div class="span3">
|
||
<input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Удалить вопрос" name="question_dele"/> удалить
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="widget-body ianswers_<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
" style="display: none;">
|
||
<h4>Ответы вопроса</h4>
|
||
<?php $_smarty_tpl->tpl_vars['an'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['an']->_loop = false;
|
||
$_smarty_tpl->tpl_vars['k1'] = new Smarty_Variable;
|
||
$_from = $_smarty_tpl->tpl_vars['qt']->value['answers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['an']->key => $_smarty_tpl->tpl_vars['an']->value){
|
||
$_smarty_tpl->tpl_vars['an']->_loop = true;
|
||
$_smarty_tpl->tpl_vars['k1']->value = $_smarty_tpl->tpl_vars['an']->key;
|
||
?>
|
||
<div class="control-group ianswer_<?php echo $_smarty_tpl->tpl_vars['k1']->value;?>
|
||
" id="answer_<?php echo $_smarty_tpl->tpl_vars['an']->value['id'];?>
|
||
">
|
||
<label class="control-label">Ответ № <?php echo $_smarty_tpl->tpl_vars['k1']->value+1;?>
|
||
</label>
|
||
<div class="controls">
|
||
<div class="span7 textarea">
|
||
<textarea class="span12 textedt" cols="100%" rows="4" id="area<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
_<?php echo $_smarty_tpl->tpl_vars['an']->value['id'];?>
|
||
" name="text_a[<?php echo $_smarty_tpl->tpl_vars['an']->value['id'];?>
|
||
]"><?php echo $_smarty_tpl->tpl_vars['an']->value['text_a'];?>
|
||
</textarea>
|
||
</div>
|
||
<div class="span3">
|
||
<select class="span12 tooltips" data-trigger="hover" data-original-title="Выберите тип ответа" name="tip_a[<?php echo $_smarty_tpl->tpl_vars['an']->value['id'];?>
|
||
]">
|
||
<option value="1"<?php if ($_smarty_tpl->tpl_vars['an']->value['ocenka']==1){?> SELECTED<?php }?>>Не правильный ответ</option>
|
||
<option value="0"<?php if ($_smarty_tpl->tpl_vars['an']->value['ocenka']==0){?> SELECTED<?php }?>>Правильный ответ</option>
|
||
<option value="-10"<?php if ($_smarty_tpl->tpl_vars['an']->value['ocenka']==-10){?> SELECTED<?php }?>>для каждого ответа ставится бал от 0 до оценки вопроса</option>
|
||
</select>
|
||
</div>
|
||
<div class="span1">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Позиция ответа" name="pos_a[<?php echo $_smarty_tpl->tpl_vars['an']->value['id'];?>
|
||
]" value="<?php echo $_smarty_tpl->tpl_vars['an']->value['pos'];?>
|
||
" placeholder="Позиция ответа"/> позиция ответа
|
||
</div>
|
||
<div class="span1">
|
||
|
||
<input type="CHECKBOX" class="span4 tooltips" data-trigger="hover" data-original-title="Удалить ответ" name="answer_dele[<?php echo $_smarty_tpl->tpl_vars['an']->value['id'];?>
|
||
]"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php } ?>
|
||
</div>
|
||
<div class="widget-body" style="display: none;">
|
||
<div class="form-actions">
|
||
<input type="HIDDEN" id="answers_new_<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
" value="0">
|
||
<input type="HIDDEN" id="answers_kol_<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
" value="<?php echo count($_smarty_tpl->tpl_vars['qt']->value['answers']);?>
|
||
">
|
||
<a href="#" class="btn btn-warning fadd_answer" id="addanswer_for_<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
" style="float: left;margin-right: 10px;">Добавить еще один ответ</a>
|
||
<input type="HIDDEN" name="test_id" value="<?php echo $_smarty_tpl->tpl_vars['questions']->value['test']['id'];?>
|
||
">
|
||
<input type="HIDDEN" name="ques_id" value="<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
">
|
||
<button type="submit" name="qedit" class="btn btn-success fsave" id="<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
">Сохранить изменения в вопросе и ответах</button>
|
||
<div class="" id="message_<?php echo $_smarty_tpl->tpl_vars['qt']->value['id'];?>
|
||
"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<?php } ?>
|
||
</div>
|
||
<div class="form-actions">
|
||
<input type="HIDDEN" id="questions_new_<?php echo $_smarty_tpl->tpl_vars['questions']->value['test']['id'];?>
|
||
" value="0">
|
||
<input type="HIDDEN" id="questions_kol_<?php echo $_smarty_tpl->tpl_vars['questions']->value['test']['id'];?>
|
||
" value="<?php echo count($_smarty_tpl->tpl_vars['questions']->value['ques']);?>
|
||
">
|
||
<a href="#" class="btn btn-warning fadd_question" id="addquestion_for_<?php echo $_smarty_tpl->tpl_vars['questions']->value['test']['id'];?>
|
||
" style="float: left;margin-right: 10px;">Добавить еще один вопрос</a>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php }} ?>
|