448 lines
17 KiB
HTML
448 lines
17 KiB
HTML
|
<!-- 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">
|
|||
|
{if ($msg == -1)}
|
|||
|
<div class="alert alert-warning">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Направление уже есть!</strong>
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
{if ($msg == 1)}
|
|||
|
<div class="alert alert-success">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Направление создано!</strong>
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
{if ($msg == 2)}
|
|||
|
<div class="alert alert-success">
|
|||
|
<button data-dismiss="alert" class="close">×</button>
|
|||
|
<strong>Ведомость создана!</strong>
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
|
|||
|
<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">
|
|||
|
{foreach from=$grupps item=grupp}
|
|||
|
<option value="{$grupp.id}">{$grupp.sokr}-{$grupp.kurs} {$grupp.fo}</option>
|
|||
|
{/foreach}
|
|||
|
</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>
|
|||
|
{foreach from=$teachers item=teach}
|
|||
|
<option value="{$teach.id_user}">{$teach.fio}</option>
|
|||
|
{/foreach}
|
|||
|
</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="{$fakultet}" 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>
|
|||
|
<span> | </span>
|
|||
|
|
|||
|
<a href="#" class="btn {if $filter_fo=="all"}btn-warning{else}btn-info{/if} btn_filter" data-filter="all">Все</a>
|
|||
|
<a href="#" class="btn {if $filter_fo=="ofo"}btn-warning{else}btn-info{/if} btn_filter" data-filter="ofo">ОФО</a>
|
|||
|
<a href="#" class="btn {if $filter_fo=="zfo"}btn-warning{else}btn-info{/if} btn_filter" data-filter="zfo">ЗФО</a>
|
|||
|
<a href="#" class="btn {if $filter_fo=="ozfo"}btn-warning{else}btn-info{/if} btn_filter" data-filter="ozfo">ОЗФО</a>
|
|||
|
<span> | </span>
|
|||
|
|
|||
|
{for $i=date('Y')-4 to date('Y')}
|
|||
|
<a href="#" class="btn {if $filter_year==$i}btn-warning{else}btn-info{/if} btn_filter_year" data-filter="{$i}">{$i}</a>
|
|||
|
{/for}
|
|||
|
<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>
|
|||
|
{foreach from=$naprs item=napr}
|
|||
|
<tr class="napr-tr" data-print="{$napr.print}" data-mark="{if ($napr.mark == NULL)}Нет{else}{$napr.mark}{/if}">
|
|||
|
<td>{$napr.i}</td>
|
|||
|
<td>с {$napr.date_create} до {$napr.date_end}</td>
|
|||
|
<td><b>{$napr.name} </b>({$napr.control})<br /> <i>{$napr.fio}</i></td>
|
|||
|
<td>
|
|||
|
{$napr.id_student}<br />({$napr.semestr} семестр)
|
|||
|
<span class="badge badge-info">{$napr.grupp.sokr}</span>
|
|||
|
{if ($napr.fo == 'ОФО')}<span class="badge badge-success">ОФО</span>{/if}
|
|||
|
{if ($napr.fo == 'ЗФО')}<span class="badge badge-important">ЗФО</span>{/if}
|
|||
|
{if ($napr.fo == 'ОЗФО')}<span class="badge badge-purple" style="background-color: #db9136;">ОЗФО</span>{/if}
|
|||
|
|
|||
|
</td>
|
|||
|
<td>{if ($napr.mark == NULL)}Нет{else}{$napr.mark}{/if}</td>
|
|||
|
<td>
|
|||
|
{if ($napr.print == 0)}<span style="color:red;">Направление не распечатано</span>{else}<span style="color:green;">Направление распечатано</span>{/if}<br />
|
|||
|
{if ($napr.mark == NULL)}<button class="btn btn-danger del-naprav" data-id="{$napr.id_liq}">Удалить</button>{else}
|
|||
|
<a href="/dekanat/liquidation/{$napr.id_liq}/" class="btn btn-primary">Печатать</a> <button class="btn btn-warning zero-naprav" data-id="{$napr.id_liq}">Убрать оценку</button>{/if}
|
|||
|
<!--a href="/teach/liquidation/{$napr.id}" class="btn btn-primary">Печатать</a-->
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
{/foreach}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
{if count($napr_null)}
|
|||
|
<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">
|
|||
|
<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>
|
|||
|
{foreach from=$napr_null item=napr}
|
|||
|
<tr class="napr-tr" data-print="{$napr.print}" data-mark="{if ($napr.mark == NULL)}Нет{else}{$napr.mark}{/if}">
|
|||
|
<td>{$napr.i}</td>
|
|||
|
<td>с {$napr.date_create} до {$napr.date_end}</td>
|
|||
|
<td><b>{$napr.name} </b>({$napr.control})<br /> <i>{$napr.fio}</i></td>
|
|||
|
<td>
|
|||
|
{$napr.id_student}<br />({$napr.semestr} семестр)
|
|||
|
<span class="badge badge-info">{$napr.grupp.sokr}</span>
|
|||
|
{if ($napr.fo == 'ОФО')}<span class="badge badge-success">ОФО</span>{/if}
|
|||
|
{if ($napr.fo == 'ЗФО')}<span class="badge badge-important">ЗФО</span>{/if}
|
|||
|
{if ($napr.fo == 'ОЗФО')}<span class="badge badge-purple" style="background-color: #db9136;">ОЗФО</span>{/if}
|
|||
|
|
|||
|
</td>
|
|||
|
<td>{if ($napr.mark == NULL)}Нет{else}{$napr.mark}{/if}</td>
|
|||
|
<td>
|
|||
|
{if ($napr.print == 0)}<span style="color:red;">Направление не распечатано</span>{else}<span style="color:green;">Направление распечатано</span>{/if}<br />
|
|||
|
{if ($napr.mark == NULL)}<button class="btn btn-danger del-naprav" data-id="{$napr.id_liq}">Удалить</button>{else}
|
|||
|
<a href="/dekanat/liquidation/{$napr.id_liq}/" class="btn btn-primary">Печатать</a> <button class="btn btn-warning zero-naprav" data-id="{$napr.id_liq}">Убрать оценку</button>{/if}
|
|||
|
<!--a href="/teach/liquidation/{$napr.id}" class="btn btn-primary">Печатать</a-->
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
{/foreach}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{/if}
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
{literal}
|
|||
|
<script type="text/javascript">
|
|||
|
$(document).ready(function(){
|
|||
|
|
|||
|
$(".chosen-container").css({"width":"100%"});
|
|||
|
$(".btn_filter_year").click(function(){
|
|||
|
let filter=$(this).data('filter');
|
|||
|
$.ajax({
|
|||
|
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=liquidation_ved_filter_year&filter='+filter,
|
|||
|
success: function(data){
|
|||
|
location.href='/dekanat/liquidation/';
|
|||
|
}
|
|||
|
});
|
|||
|
return false;
|
|||
|
});
|
|||
|
$(".btn_filter").click(function(){
|
|||
|
let filter=$(this).data('filter');
|
|||
|
$.ajax({
|
|||
|
url: '/json.php', dataType: 'json', type: 'POST', async: false, data: 'ajdes=liquidation_ved_filter&filter='+filter,
|
|||
|
success: function(data){
|
|||
|
location.href='/dekanat/liquidation/';
|
|||
|
}
|
|||
|
});
|
|||
|
return false;
|
|||
|
});
|
|||
|
//сортировка по направлениям
|
|||
|
$(".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>
|
|||
|
{/literal}
|