Skip to content
Snippets Groups Projects
Commit ed4e1b3d authored by PavelBegunkov's avatar PavelBegunkov
Browse files

FIX: more exam page fixes!!!

parent 2b4bef2d
Branches
Tags
No related merge requests found
......@@ -41,7 +41,10 @@
{% for i in 1..headerRate.ModulesCount %}
{% set colSpan = headerRate[i].SubmodulesCount %}
{% set rowSpan = 1 %}
{% if headerRate[i].ModuleType == 'exam' %}{% set colSpan = 2*colSpan+1 %}{% endif %}
{% if headerRate[i].ModuleType == 'exam' %}
{% set colSpan = 2*colSpan %}
{% if i==1 %} {% set colSpan = colSpan + 1 %} {% endif %}
{% endif %}
{% if headerRate[i].ModuleType == 'extra' %}{% set rowSpan = 3 %}{% endif %}
<td class="subject" colspan="{{colSpan}}" rowspan="{{rowSpan}}">
{{ headerRate[i].ModuleTitle }}
......@@ -70,29 +73,31 @@
<tr class="RatingTableSubmodulesHeadMaxRate">
{% set columnsCount = 4 %} {# студенты, итог за семестр, бонусы, итог #}
{% set col = 0 %}
{% set col = 1 %}
<td class="title">Макс. балл</td>
{% for i in 1..headerRate.ModulesCount %}
{% set columnsCount = columnsCount + headerRate[i].SubmodulesCount %}
{% set examModule = false %}
{% if headerRate[i].ModuleType == 'exam' %}{% set examModule = true %}{% endif %}
{% for j in 1..headerRate[i].SubmodulesCount if headerRate[i].ModuleType != 'extra' %}
{% for j in 1..headerRate[i].SubmodulesCount %}
{% set col = col + 1 %}
<td class="subject col_{{ col }}"> {# id="{{ headerRate[i][j].SubmoduleID }}"> #}
{% if headerRate[i].ModuleType != 'extra' %}{{ headerRate[i][j].MaxRate }}{% endif %}
{# <input type="hidden" class="MaxRate" value="{{ headerRate[i][j].MaxRate }}"> #}
</td>
{% if examModule %}
{% set columnsCount = columnsCount + 1 %}
<td class="subject col_absence_{{ col }}">
Неявка
{% if headerRate[i].ModuleType != 'extra' %}
<td class="subject col_{{ col }}"> {# id="{{ headerRate[i][j].SubmoduleID }}"> #}
{% if headerRate[i].ModuleType != 'extra' %}{{ headerRate[i][j].MaxRate }}{% endif %}
{# <input type="hidden" class="MaxRate" value="{{ headerRate[i][j].MaxRate }}"> #}
</td>
{% if j == 1 and i == 1 %}
{% if examModule %}
{% set columnsCount = columnsCount + 1 %}
<td class="subject col_autopass_{{ col }}">
Автомат
<td class="subject col_absence_{{ col }}">
Неявка
</td>
{% if j == 1 and i == 1 %}
{% set columnsCount = columnsCount + 1 %}
<td class="subject col_autopass_{{ col }}">
Автомат
</td>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
......@@ -103,7 +108,7 @@
<td class="info"></td>
<td class="info"></td>
{% set col = 0 %}
{% set col = 1 %}
{% for i in 1..headerRate.ModulesCount %}
{% set examModule = false %}
{% if headerRate[i].ModuleType == 'exam' %}{% set examModule = true %}{% endif %}
......@@ -112,7 +117,7 @@
<td class="info col_{{ col }}" id="{{ headerRate[i][j].SubmoduleID }}"></td>
{% if examModule %}
<td class="info col_absence_{{ col }}" id="absence_{{ headerRate[i][j].SubmoduleID }}"></td>
{% if j == 1 %}
{% if j == 1 and i==1 %}
<td class="info col_autopass_{{ col }}" id="autopass_{{ headerRate[i][j].SubmoduleID }}"></td>
{% endif %}
{% endif %}
......@@ -141,7 +146,7 @@
{% set autoPassNotAdded = true %}
{% for r in student.Rates %}
{% set col = col + 1 %}
{% if r.ModuleType == 'exam' %}
{% set td_class = 'attemptCell' %}
......@@ -170,7 +175,6 @@
{% endif %}
{% if r.ModuleType == 'exam' %}
{% set col = col + 1 %}
<td class="absenceCell {{ td_class }}" id="absence_{{col}}_{{row}}">
<input type="checkbox" class="absenceCheck">
</td>
......@@ -185,7 +189,7 @@
{% endfor %}
<td class="bonus staticCell" colspan="2">{% if student.Bonus is null %}0{% else %}{{ student.Bonus }}{% endif %} </td>
<td class="bonus staticCell" >{% if student.Bonus is null %}0{% else %}{{ student.Bonus }}{% endif %} </td>
<td class="rateResultCell staticCell">{% if student.RateResult > 100 %} 100+ {% else %} {{ student.RateResult }} {% endif %}</td>
</tr>
{% endfor %}
......
......@@ -146,6 +146,7 @@ $(function() {
if (jCurSubmoduleHead.length < 1 && $(".RatingTableModulesHead .bonus").length > 0 )
g_submoduleTitle = 'Бонусные баллы';
g_submoduleMaxRate = parseInt($(".RatingTableSubmodulesHeadMaxRate .col_"+g_col).text());
console.log(g_col);
// Проверяем допустимое значение (только для добора)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment