431 lines
17 KiB
PHP
431 lines
17 KiB
PHP
<?php /* Smarty version Smarty-3.1.13, created on 2022-04-11 20:30:46
|
||
compiled from "tpl/tpl_teacher_liquidation.html" */ ?>
|
||
<?php /*%%SmartyHeaderCode:117076582625465c6f32217-18797136%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
'file_dependency' =>
|
||
array (
|
||
'316ad15d18400b7c809dde6a179f36023146cdb6' =>
|
||
array (
|
||
0 => 'tpl/tpl_teacher_liquidation.html',
|
||
1 => 1604558460,
|
||
2 => 'file',
|
||
),
|
||
),
|
||
'nocache_hash' => '117076582625465c6f32217-18797136',
|
||
'function' =>
|
||
array (
|
||
),
|
||
'variables' =>
|
||
array (
|
||
'msg' => 0,
|
||
'grupps' => 0,
|
||
'grupp' => 0,
|
||
'teachers' => 0,
|
||
'teach' => 0,
|
||
'fakultet' => 0,
|
||
'naprs' => 0,
|
||
'napr' => 0,
|
||
),
|
||
'has_nocache_code' => false,
|
||
'version' => 'Smarty-3.1.13',
|
||
'unifunc' => 'content_625465c7030a32_93280811',
|
||
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
<?php if ($_valid && !is_callable('content_625465c7030a32_93280811')) {function content_625465c7030a32_93280811($_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/liquidation/">Создание направлений</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<?php if (($_smarty_tpl->tpl_vars['msg']->value==-1)){?>
|
||
<div class="alert alert-warning">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Направление уже есть!</strong>
|
||
</div>
|
||
<?php }?>
|
||
<?php if (($_smarty_tpl->tpl_vars['msg']->value==1)){?>
|
||
<div class="alert alert-success">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Направление создано!</strong>
|
||
</div>
|
||
<?php }?>
|
||
<?php if (($_smarty_tpl->tpl_vars['msg']->value==2)){?>
|
||
<div class="alert alert-success">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Ведомость создана!</strong>
|
||
</div>
|
||
<?php }?>
|
||
|
||
<div class="row-fluid">
|
||
<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-up"> Развернуть/Свернуть</a></span>
|
||
</div>
|
||
<div class="widget-body" style="display: none;">
|
||
<form name="add_napr" action="#" method="post" class="form-horizontal">
|
||
<div class="control-group">
|
||
<label class="control-label">Группа студента</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<select name="grupp" class="form-control">
|
||
<?php $_smarty_tpl->tpl_vars['grupp'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['grupp']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['grupps']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['grupp']->key => $_smarty_tpl->tpl_vars['grupp']->value){
|
||
$_smarty_tpl->tpl_vars['grupp']->_loop = true;
|
||
?>
|
||
<option value="<?php echo $_smarty_tpl->tpl_vars['grupp']->value['id'];?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['grupp']->value['sokr'];?>
|
||
-<?php echo $_smarty_tpl->tpl_vars['grupp']->value['kurs'];?>
|
||
<?php echo $_smarty_tpl->tpl_vars['grupp']->value['fo'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
</div>
|
||
<span class="help-inline"> Начните вводить первые буквы...</span>
|
||
</div>
|
||
</div>
|
||
<div class="hide-content" style="display: none;">
|
||
<div class="control-group">
|
||
<label class="control-label">Студент</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<select name="student" class="form-control">
|
||
|
||
</select>
|
||
</div>
|
||
<span class="help-inline"> Начните вводить...</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Преподаватель</label>
|
||
<div class="contros">
|
||
<select data-placeholder="Укажите преподавателя" class="chzn-select span6" tabindex="6" name="teacher" style="width: 350px!important;">
|
||
<option value="0">Выберите преподавателя</option>
|
||
<?php $_smarty_tpl->tpl_vars['teach'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['teach']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['teachers']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['teach']->key => $_smarty_tpl->tpl_vars['teach']->value){
|
||
$_smarty_tpl->tpl_vars['teach']->_loop = true;
|
||
?>
|
||
<option value="<?php echo $_smarty_tpl->tpl_vars['teach']->value['id_user'];?>
|
||
"><?php echo $_smarty_tpl->tpl_vars['teach']->value['fio'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Факультет</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<input type="text" name="fakultet" value="<?php echo $_smarty_tpl->tpl_vars['fakultet']->value;?>
|
||
" readonly class="form-control" />
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Тип</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<select name="type" class="form-control">
|
||
<option value="1">Досрочная</option>
|
||
<option value="2">Первичная</option>
|
||
<option value="3">Повторная</option>
|
||
<option value="4">С комиссией</option>
|
||
</select>
|
||
</div>
|
||
<span class="help-inline"></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Учебный план:</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<select name="iup" class="form-control">
|
||
<option value="1">Индивидуальный</option>
|
||
<option value="0">Обычный</option>
|
||
</select>
|
||
</div>
|
||
<span class="help-inline"></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Дисциплина</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<input type="text" name="name" class="form-control" required />
|
||
</div>
|
||
<span class="help-inline">Например: Алгебра и геометрия</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Форма контроля</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<select name="control" class="form-control">
|
||
<option value="1">Экзамен</option>
|
||
<option value="2">Зачет</option>
|
||
<option value="6">Зачет с оценкой</option>
|
||
<option value="3">Курсовая работа</option>
|
||
<option value="4">Курсовой проект</option>
|
||
<option value="5">Отчет по практике</option>
|
||
</select>
|
||
</div>
|
||
<span class="help-inline"></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Действительно с:</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<input type="date" name="date_create" class="form-control" />
|
||
</div>
|
||
<span class="help-inline"></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Действительно до:</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<input type="date" name="date_end" class="form-control" />
|
||
</div>
|
||
<span class="help-inline"></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label">Семестр</label>
|
||
<div class="controls">
|
||
<div class="input-prepend">
|
||
<select name="semestr" class="form-control">
|
||
<option value="1">1</option>
|
||
<option value="2">2</option>
|
||
<option value="3">3</option>
|
||
<option value="4">4</option>
|
||
<option value="5">5</option>
|
||
<option value="6">6</option>
|
||
<option value="7">7</option>
|
||
<option value="8">8</option>
|
||
<option value="9">9</option>
|
||
<option value="10">10</option>
|
||
<option value="11">11</option>
|
||
<option value="12">12</option>
|
||
|
||
</select>
|
||
</div>
|
||
<span class="help-inline"></span>
|
||
</div>
|
||
</div>
|
||
|
||
<input type="submit" name="add_liq" value="Сформировать направление" class="btn btn-success" />
|
||
|
||
</div>
|
||
|
||
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<!--Созданные направления-->
|
||
<div class="widget red">
|
||
<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">
|
||
<span class="btn btn-info sort-napr" data-id="0">Все</span>
|
||
<span class="btn btn-info sort-napr" data-id="1">Распечатанные</span>
|
||
<span class="btn btn-info sort-napr" data-id="2">Нераспечатанные</span>
|
||
<span class="btn btn-info sort-napr" data-id="3">Есть оценка</span>
|
||
<span class="btn btn-info sort-napr" data-id="4">Нет оценки</span>
|
||
<br /><br />
|
||
<table class="table table-striped table-bordered table-advance table-hover">
|
||
<thead>
|
||
<tr>
|
||
<th width="2%">№</th>
|
||
<th width="15%">Сроки</th>
|
||
<th width="20%">Дисциплина</th>
|
||
<th width="25%">Студент</th>
|
||
<th width="10%">Отметка</th>
|
||
<th>Операции</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php $_smarty_tpl->tpl_vars['napr'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['napr']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['naprs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['napr']->key => $_smarty_tpl->tpl_vars['napr']->value){
|
||
$_smarty_tpl->tpl_vars['napr']->_loop = true;
|
||
?>
|
||
<tr class="napr-tr" data-print="<?php echo $_smarty_tpl->tpl_vars['napr']->value['print'];?>
|
||
" data-mark="<?php if (($_smarty_tpl->tpl_vars['napr']->value['mark']==null)){?>Нет<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['napr']->value['mark'];?>
|
||
<?php }?>">
|
||
<td><?php echo $_smarty_tpl->tpl_vars['napr']->value['i'];?>
|
||
</td>
|
||
<td>с <?php echo $_smarty_tpl->tpl_vars['napr']->value['date_create'];?>
|
||
до <?php echo $_smarty_tpl->tpl_vars['napr']->value['date_end'];?>
|
||
</td>
|
||
<td><b><?php echo $_smarty_tpl->tpl_vars['napr']->value['name'];?>
|
||
</b>(<?php echo $_smarty_tpl->tpl_vars['napr']->value['control'];?>
|
||
)<br /> <i><?php echo $_smarty_tpl->tpl_vars['napr']->value['fio'];?>
|
||
</i></td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['napr']->value['id_student'];?>
|
||
<br />(<?php echo $_smarty_tpl->tpl_vars['napr']->value['semestr'];?>
|
||
семестр)</td>
|
||
<td><?php if (($_smarty_tpl->tpl_vars['napr']->value['mark']==null)){?>Нет<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['napr']->value['mark'];?>
|
||
<?php }?></td>
|
||
<td>
|
||
<?php if (($_smarty_tpl->tpl_vars['napr']->value['print']==0)){?><span style="color:red;">Направление не распечатано</span><?php }else{ ?><span style="color:green;">Направление распечатано</span><?php }?><br />
|
||
<?php if (($_smarty_tpl->tpl_vars['napr']->value['mark']==null)){?><button class="btn btn-danger del-naprav" data-id="<?php echo $_smarty_tpl->tpl_vars['napr']->value['id_liq'];?>
|
||
">Удалить</button><?php }else{ ?>
|
||
<a href="/dekanat/liquidation/<?php echo $_smarty_tpl->tpl_vars['napr']->value['id_liq'];?>
|
||
/" class="btn btn-primary">Печатать</a> <button class="btn btn-warning zero-naprav" data-id="<?php echo $_smarty_tpl->tpl_vars['napr']->value['id_liq'];?>
|
||
">Убрать оценку</button><?php }?>
|
||
<!--a href="/teach/liquidation/<?php echo $_smarty_tpl->tpl_vars['napr']->value['id'];?>
|
||
" class="btn btn-primary">Печатать</a-->
|
||
</td>
|
||
</tr>
|
||
<?php } ?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$(document).ready(function(){
|
||
|
||
//сортировка по направлениям
|
||
$(".sort-napr").click(function(){
|
||
var id = $(this).data("id");
|
||
|
||
$('tr.napr-tr').css("display","none");
|
||
|
||
|
||
if (id == 0) $('tr.napr-tr').css("display","table-row"); //все
|
||
if (id == 1) $('tr.napr-tr[data-print=1]').css("display","table-row"); //только распечатанные
|
||
if (id == 2) $('tr.napr-tr[data-print=0]').css("display","table-row"); //только нераспечатанные
|
||
if (id == 3) { //с оценкой
|
||
$('tr.napr-tr[data-mark]').css("display","table-row");
|
||
$('tr.napr-tr[data-mark=Нет]').css("display","none");
|
||
}
|
||
if (id == 4) $('tr.napr-tr[data-mark=Нет]').css("display","table-row"); //без оценки
|
||
});
|
||
|
||
|
||
//выбор группы и вывод списка необходимых студентов
|
||
$("select[name=grupp]").change(function(){
|
||
|
||
var id_grupp = $(this).val();
|
||
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=show_students&id_grupp='+id_grupp,
|
||
success: function(data){
|
||
//alert(123);
|
||
$('select[name=student]').html(data.html);
|
||
$('.hide-content').css('display', 'block');
|
||
}
|
||
});
|
||
});
|
||
|
||
//выбор группы и вывод списка необходимых студентов - ДЛЯ ВЕДОМОСТЕЙ
|
||
$("select[name=grupp_v]").change(function(){
|
||
|
||
var id_grupp = $(this).val();
|
||
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=show_students_v&id_grupp='+id_grupp,
|
||
success: function(data){
|
||
//alert(123);
|
||
$('.student-ved').html(data.html);
|
||
$('.hide-content2').css('display', 'block');
|
||
}
|
||
});
|
||
});
|
||
|
||
//удаление направления
|
||
$(".del-naprav").click(function(){
|
||
var id = $(this).data("id");
|
||
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=del_napr&id='+id,
|
||
success: function(data){
|
||
alert('Направление удалено!');
|
||
location.href='/dekanat/liquidation/';
|
||
}
|
||
});
|
||
});
|
||
|
||
//удаление оценки zero-naprav
|
||
$(".zero-naprav").click(function(){
|
||
var id = $(this).data("id");
|
||
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=zero_napr&id='+id,
|
||
success: function(data){
|
||
alert('Оценка удалено, преподаватель вновь может выставить оценку по направлению.');
|
||
location.href='/dekanat/liquidation/';
|
||
}
|
||
});
|
||
});
|
||
|
||
//удаление ведомости
|
||
$('.del-stat').click(function(){
|
||
var id = $(this).data('id');
|
||
|
||
$.ajax({
|
||
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=del_stat&id='+id,
|
||
success: function(data){
|
||
alert('Ведомость удалена');
|
||
location.href='/dekanat/liquidation_ved/';
|
||
}
|
||
});
|
||
});
|
||
|
||
|
||
|
||
|
||
//выбрать всех
|
||
$('.sel-all-stud').click(function(){
|
||
$('input[type=checkbox]').prop('checked', true);
|
||
|
||
});
|
||
|
||
//выбрать конкретную подгруппу
|
||
$('.sel-pd-stud').click(function(){
|
||
var num = $('input[name=numgrupp]').val();
|
||
|
||
$('input[data-num='+num+']').prop('checked', true);
|
||
|
||
});
|
||
|
||
});
|
||
</script>
|
||
<?php }} ?>
|