Newer
Older
{% block title %}Выставление баллов{% endblock %} {# head -> title #}
{% block media %} {# head -> css, js #}
{{ HTML.script('media/js/functions.js')|raw }}
{{ HTML.script('media/js/jquery.fileDownload.js')|raw }}
{{ HTML.style('media/less/teacher/rating.css')|raw }}
{% endblock %}
{% block main_top_title %}Выставление баллов{% endblock %}
{% block main_content %}
{% if disciplineInfo.milestone > 0 %}
<p class="canNotEdit">
Семестр завершен. Выставление баллов <u>запрещено</u>.
</p>
{% endif %}
{#
{% if disciplineInfo.type == 'exam' %}
<p class="canNotEdit">
Выставление баллов за экзамен возможно только на странице "Сессия".
</p>
{% endif %}
#}
<h2 class="h2_titleSubject">{{ disciplineInfo.subjectName }}</h2>
<button class="downloadExcel" style="display: none">Скачать в excel формате [dev version]</button>
Антон Шалимов
committed
{{ HTML.anchor('exam/'~disciplineInfo.ID,
"Перейти к сессии →",
{'title': 'Сессия', 'class': 'exam_a'})|raw }}
<select class="groupSelector">
<option value="0">Все группы</option>
{% for key, group in groups %}
<option value="{{ key }}">{{ group }}</option>
{% endfor %}
</select>
</div>
<p class="notification notif_rating" style="display: none">Обратите внимание, что пустая клетка эквивалентна нулю</p>
<table class="studentsRate" border="0" cellspacing="0" cellpadding="0">
<tr class="RatingTableModulesHead">
{% for i in 1..headerRate.ModulesCount %}
{% if headerRate[i].ModuleType != 'regular' %} {% set rowSpan=2 %} {% endif %}
<td class="subject {% if headerRate[i].ModuleType == 'bonus' %}bonus{% endif %}" rowspan="{{rowSpan}}"
{% if headerRate[i].ModuleType != 'extra' %} colspan="{{headerRate[i].SubmodulesCount}}" {% endif %} >
{{ headerRate[i].ModuleTitle }}
</td>
<tr class="RatingTableSubmodulesHead">
{% for i in 1..headerRate.ModulesCount %}
{% set CellCount = CellCount + headerRate[i].SubmodulesCount %}
{% if headerRate[i]['ModuleType'] == 'regular' %}
{% for j in 1..headerRate[i].SubmodulesCount %}
{% set col = col + 1 %}
<td class="subject col_{{ col }}">{{ headerRate[i][j].Title }}</td>
{% endfor %}
{% endif %}
Антон Шалимов
committed
<tr class="RatingTableSubmodulesHeadMaxRate">
Антон Шалимов
committed
{% for i in 1..headerRate.ModulesCount %}
{% set CellCount = CellCount + headerRate[i].SubmodulesCount %}
{% for j in 1..headerRate[i].SubmodulesCount %}
<td class="subject" id="{{ headerRate[i][j].SubmoduleID }}">{{ headerRate[i][j].MaxRate }}</td>
{% elseif headerRate[i].ModuleType == "extra" %}
{% if j==1 %}
<td class="subject" id="{{ headerRate[i][j].SubmoduleID }}"></td>
{% else %}
{% set CellCount = CellCount - 1 %} {# при наличии второго сабмодуля у добора выводим только первый #}
{% endif %}
<td class="subject col_{{ col }}" id="{{ headerRate[i][j].SubmoduleID }}">
{{ headerRate[i][j].MaxRate }}
{# <input type="hidden" class="MaxRate" value="{{ headerRate[i][j].MaxRate }}"> #}
Антон Шалимов
committed
{% endfor %}
{% endfor %}
</tr>
{% for j in 1..headerRate[i].SubmodulesCount if headerRate[i].ModuleType != "extra" or j==1 %}
<td class="info col_{{ col }}" id="{{ headerRate[i][j].SubmoduleID }}"></td>
{% set row = 0 %}
{% for group in rateTable %}
<tr id="group_{{ group.GroupID }}" class="group_{{ group.GroupID }}">
<td class="group" colspan="{{ CellCount + 2 }}">{% if group.isAttached == 1 %} {{ group.GradeTitle }} {% endif %}{{ group.GroupNum }} группа</td>
{% set additionalRate = 0 %}
{% set row = row + 1 %}
{% set j = 0 %}
PavelBegunkov
committed
<td id="student_{{ student.ID }}" class="studentCell staticCell">{{ student.LastName }} {{ student.FirstName }}</td>
{% for i in 1..CellCount %}
{% set j = j + 1 %}
{% if student.Rates[i].SubmoduleID >= 0 and disciplineInfo.milestone == 0 %}
<input type="text" value="{{ student.Rates[i].Rate }}">
</td>
{% else %}
{% set j = j - 1 %}
{% if student.Rates[i].Type == 'extra' %}
{% set additionalRate = additionalRate + student.Rates[i].Rate %}
{% else %}
<td class="staticCell{% if student.Rates[i].Type == 'exam' %} examCell{% endif %}">
<p>{{ student.Rates[i].Rate }}</p>
</td>
{% endif %}
<td class="staticCell">
<p>{% if additionalRate != 0 %}{{additionalRate}}{% endif %}</p>
</td>
<td class="rateResultCell staticCell">{% if student.RateResult > 100 %} 100+ {% else %} {{ student.RateResult }} {% endif %}</td>
{% endfor %}
<div id="tdInfo_wrap">
<div id="tdInfo">
<span id="student">Студент: <b></b></span>
<span id="submodule">Мероприятие: <b></b></span>
<span id="maxRate">Максимальный балл: <b></b></span>
</div>
</div>
Антон Шалимов
committed
{{ disciplineInfo_JSON|raw }}
<input type="hidden" id="pageType" value="rating"/>