Skip to content
Snippets Groups Projects
Commit 45277fec authored by Чердынцева Марина's avatar Чердынцева Марина
Browse files

Merge branch 'develop' of http://itlab.mmcs.sfedu.ru/git/grade-rating into develop

Conflicts:
	~dev_rating/media/js/rating.js
parents 421c1706 69428e3c
Branches
Tags
No related merge requests found
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
{% block title %}Сессия{% endblock %} {# head -> title #} {% block title %}Сессия{% endblock %} {# head -> title #}
{% block media %} {# head -> css, js #} {% block media %} {# head -> css, js #}
{{ HTML.script('media/js/rating.js')|raw }}
{{ HTML.script('media/js/functions.js')|raw }} {{ HTML.script('media/js/functions.js')|raw }}
{{ HTML.script('media/js/jquery.fileDownload.js')|raw }} {{ HTML.script('media/js/jquery.fileDownload.js')|raw }}
{{ HTML.style('media/css/rating.css')|raw }} {{ HTML.style('media/css/rating.css')|raw }}
{{ HTML.script('media/js/rating.js')|raw }}
{% endblock %} {% endblock %}
{% block main_top_title %}Сессия{% endblock %} {% block main_top_title %}Сессия{% endblock %}
...@@ -38,8 +38,13 @@ ...@@ -38,8 +38,13 @@
<tr class="RatingTableModulesHead"> <tr class="RatingTableModulesHead">
<td class="title" width="150px">Модуль</td> <td class="title" width="150px">Модуль</td>
<td class="subject" rowspan="3">Итог за семестр</td> <td class="subject" rowspan="3">Итог за семестр</td>
{% for i in 1..headerRate.ModulesCount %} {% for i in 1..headerRate.ModulesCount %}
<td class="subject" colspan="{{headerRate[i].SubmodulesCount}}"> {% set colSpan = headerRate[i].SubmodulesCount %}
{% set rowSpan = 1 %}
{% if headerRate[i].ModuleType == 'exam' %}{% set colSpan = 2*colSpan+1 %}{% endif %}
{% if headerRate[i].ModuleType == 'extra' %}{% set rowSpan = 3 %}{% endif %}
<td class="subject" colspan="{{colSpan}}" rowspan="{{rowSpan}}">
{{ headerRate[i].ModuleTitle }} {{ headerRate[i].ModuleTitle }}
</td> </td>
{% endfor %} {% endfor %}
...@@ -47,37 +52,53 @@ ...@@ -47,37 +52,53 @@
<td class="subject" rowspan="3">Итог</td> <td class="subject" rowspan="3">Итог</td>
</tr> </tr>
<tr class="RatingTableSubmodulesHead"> <tr class="RatingTableSubmodulesHead">
{% set CellCount = 0 %}
{% set col = 0 %} {% set col = 0 %}
<td class="title">Мероприятие</td> <td class="title">Мероприятие</td>
{% for i in 1..headerRate.ModulesCount %} {% for i in 1..headerRate.ModulesCount %}
{% set CellCount = CellCount + headerRate[i].SubmodulesCount %} {% set colSpanGeneral = 1 %}
{% for j in 1..headerRate[i].SubmodulesCount %} {% if headerRate[i].ModuleType == 'exam' %}{% set colSpanGeneral = 2*colSpanGeneral%}{% endif %}
{% for j in 1..headerRate[i].SubmodulesCount if headerRate[i].ModuleType != 'extra' %}
{% set col = col + 1 %} {% set col = col + 1 %}
<td class="subject col_{{ col }}"> {{ headerRate[i][j].Title }} </td> {% set colSpan = colSpanGeneral %}
{% if j == 1 %}{% set colSpan = colSpan+1 %}{% endif %}
<td class="subject col_{{ col }}" colspan="{{colSpan}}"> {{ headerRate[i][j].Title }} </td>
{% endfor %} {% endfor %}
{# {% set col = col + 1 %} #}
{% endfor %} {% endfor %}
</tr> </tr>
<tr class="RatingTableSubmodulesHeadMaxRate"> <tr class="RatingTableSubmodulesHeadMaxRate">
{% set CellCount = 0 %} {% set columnsCount = 4 %} {# студенты, итог за семестр, бонусы, итог #}
{% set col = 0 %} {% set col = 0 %}
<td class="title">Макс. балл</td> <td class="title">Макс. балл</td>
{% for i in 1..headerRate.ModulesCount %} {% for i in 1..headerRate.ModulesCount %}
{% set CellCount = CellCount + headerRate[i].SubmodulesCount %} {% set columnsCount = columnsCount + headerRate[i].SubmodulesCount %}
{% for j in 1..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' %}
{% set col = col + 1 %} {% set col = col + 1 %}
<td class="subject col_{{ col }}" id="{{ headerRate[i][j].SubmoduleID }}"> <td class="subject col_{{ col }}" id="{{ headerRate[i][j].SubmoduleID }}">
{% if headerRate[i].ModuleType != 'extra' %}{{ headerRate[i][j].MaxRate }}{% endif %} {% if headerRate[i].ModuleType != 'extra' %}{{ headerRate[i][j].MaxRate }}{% endif %}
<input type="hidden" class="MaxRate" value="{{ headerRate[i][j].MaxRate }}"> <input type="hidden" class="MaxRate" value="{{ headerRate[i][j].MaxRate }}">
</td> </td>
{% if examModule %}
{% set columnsCount = columnsCount + 1 %}
<td class="subject col_absence_{{ col }}" id="absence_{{ headerRate[i][j].SubmoduleID }}">
Неявка
</td>
{% if j == 1 %}
{% set columnsCount = columnsCount + 1 %}
<td class="subject col_autopass_{{ col }}" id="autopass_{{ headerRate[i][j].SubmoduleID }}">
Автомат
</td>
{% endif %}
{% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
</tr> </tr>
{% set row = 0 %} {% set row = 0 %}
{% for group in rateTable %} {% for group in rateTable %}
<tr id="group_{{ group.GroupID }}" class="group_{{ group.GroupID }}"> <tr id="group_{{ group.GroupID }}" class="group_{{ group.GroupID }}">
<td class="group" colspan="{{ CellCount + 3 }}"> <td class="group" colspan="{{ columnsCount }}">
{% if group.isAttached == 1 %} {{ group.GradeTitle }} {% endif %}{{ group.GroupNum }} группа. {% if group.isAttached == 1 %} {{ group.GradeTitle }} {% endif %}{{ group.GroupNum }} группа.
<span class="downloadExcelStatement" id="group_{{ group.GroupID }}">Скачать ведомость</span> <span class="downloadExcelStatement" id="group_{{ group.GroupID }}">Скачать ведомость</span>
</td> </td>
...@@ -90,6 +111,7 @@ ...@@ -90,6 +111,7 @@
<td id="student_{{ student.ID }}" class="studentCell staticCell">{{ student.Last }} {{ student.First }}</td> <td id="student_{{ student.ID }}" class="studentCell staticCell">{{ student.Last }} {{ student.First }}</td>
<td class="semesterRateResultCell staticCell">{{ student.RateSemesterResult }}</td> <td class="semesterRateResultCell staticCell">{{ student.RateSemesterResult }}</td>
{% set autoPassNotAdded = true %}
{% for r in student.Rates %} {% for r in student.Rates %}
{% set col = col + 1 %} {% set col = col + 1 %}
...@@ -101,15 +123,29 @@ ...@@ -101,15 +123,29 @@
{% endif %} {% endif %}
{% if r.Block == 'True' %} {% if r.Block == 'True' %}
<td class="staticCell {{ td_class }}" id="col_{{ col }}"> <td class="staticCell {{ td_class }}" id="col_{{ col }}"> {# todo _row_{{row}} #}
<input type="text" value="{{ r.Rate }}" disabled="disabled"> <input type="text" value="{{ r.Rate }}" disabled="disabled">
</td> </td>
{% else %} {% else %}
<td class="commonCell {{ td_class }}" id="col_{{ col }}"> <td class="commonCell {{ td_class }}" id="col_{{ col }}"> {# todo _row_{{row}} #}
<input type="text" value="{{ r.Rate }}" {% if r.ModuleType == 'extra' %} <input type="text" value="{{ r.Rate }}" {% if r.ModuleType == 'extra' %}
placeholder="{% if r.MaxRate > 0 %} макс. {{r.MaxRate}} {% else %} --- {% endif %}"{% endif %}> placeholder="{% if r.MaxRate > 0 %} макс. {{r.MaxRate}} {% else %} --- {% endif %}"{% endif %}>
</td> </td>
{% endif %} {% endif %}
{% if r.ModuleType == 'exam' %}
<td class="absenceCell {{ td_class }}" id="absence_{{col}}_{{row}}">
<input type="checkbox" class="absenceCheck">
</td>
{% if autoPassNotAdded %}
<td class="autoPass {{ td_class }}" id="autopass_{{col}}_{{row}}">
<input type="checkbox" class="autoPassCheck">
</td>
{% set autoPassNotAdded = false %}
{% endif %}
{% endif %}
{% endfor %} {% endfor %}
<td class="bonus staticCell">{{ student.Bonus }}</td> <td class="bonus staticCell">{{ student.Bonus }}</td>
......
No preview for this file type
...@@ -180,13 +180,23 @@ $(function() { ...@@ -180,13 +180,23 @@ $(function() {
{ {
// страница оценивания // страница оценивания
jThis.siblings(".commonCell").each(function(){ // добавим сумму баллов в соседних ячейках jThis.siblings(".commonCell").each(function(){ // добавим сумму баллов в соседних ячейках
<<<<<<< HEAD
var rate = $(this).children("input").val(); var rate = $(this).children("input").val();
if (rate) if (rate)
rateResult += parseInt(rate); rateResult += parseInt(rate);
=======
var rateStr = $(this).children("input").val();
if (rateStr)
rateResult += parseInt(rateStr);
>>>>>>> 69428e3c86e45c103f595f121529a831a6d6c742
}); });
var examRateStr = jThis.siblings(".examCell").children("p").text(); var examRateStr = jThis.siblings(".examCell").children("p").text();
if (examRateStr) if (examRateStr)
rateResult += parseInt(examRateStr); rateResult += parseInt(examRateStr);
<<<<<<< HEAD
=======
>>>>>>> 69428e3c86e45c103f595f121529a831a6d6c742
} }
if (newRate <= g_submoduleMaxRate) if (newRate <= g_submoduleMaxRate)
......
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