Skip to content
Snippets Groups Projects
Commit 824de166 authored by Антон Шалимов's avatar Антон Шалимов
Browse files

...

parent 993873b0
Branches
Tags
No related merge requests found
......@@ -278,6 +278,8 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
$rateHandled[$i_g]['Students'][$i_s]['Rates'][$extraNum+1]['SubmoduleID'] = -1;
$curRate = $total - $examRate - $rateHandled[$i_g]['Students'][$i_s]['Rates'][$extraNum+1]['Rate'];
// Добор баллов
if ($curRate < 32 OR $curRate > 38)
$rateHandled[$i_g]['Students'][$i_s]['Extra'] = 0;
else
......@@ -285,7 +287,7 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
}
//echo Debug::vars($structureHandled);
//echo Debug::vars($rateHandled);
echo Debug::vars($rateHandled);
$twig->rateTable = $rateHandled;
$twig->groups = $groupsHandled;
......
......@@ -73,7 +73,9 @@
{% set CellCount = CellCount + headerRate[i].SubmodulesCount %}
{% for j in 1..headerRate[i].SubmodulesCount %}
{% set col = col + 1 %}
<td class="subject col_{{ col }}" id="{{ headerRate[i][j].SubmoduleID }}">{{ headerRate[i][j].MaxRate }}
<td class="subject col_{{ col }}" id="{{ headerRate[i][j].SubmoduleID }}">
{% if headerRate[i].ModuleType == 'extra' %}max {% endif %}
{{ headerRate[i][j].MaxRate }}
<input type="hidden" class="MaxRate" value="{{ headerRate[i][j].MaxRate }}">
</td>
{% endfor %}
......@@ -112,7 +114,7 @@
</td>
{% else %}
<td id="col_{{ col }}" class="commonCell {{ td_class }}">
<input type="text" value="{{ r.Rate }}">
<input type="text" value="{{ r.Rate }}" {% if r.ModuleType == 'extra' %}placeholder="max {{ student.Extra }}"{% endif %}>
</td>
{% endif %}
{% endfor %}
......
......@@ -29,7 +29,7 @@
</select>
</div>
<p class="notification notif_rating">Обратите внимание, что пустая клетка эквивалентна нулю</p>
<p class="notification notif_rating" style="display: none">Обратите внимание, что пустая клетка эквивалентна нулю</p>
<table class="studentsRate" border="0" cellspacing="0" cellpadding="0">
<tr class="RatingTableModulesHead">
......
......@@ -49,6 +49,7 @@ td.group {
display: block;
float: right;
margin-right: 34px;
margin-bottom: 5px;
}
.groupSelectorText {
......
......@@ -82,7 +82,12 @@ $(function() {
g_submoduleTitle = $(".RatingTableSubmodulesHead .col_"+g_col+":first").text();
if ($(".RatingTableSubmodulesHead .col_"+g_col+":first").length < 1 && $(".RatingTableModulesHead .bonus").length > 0 )
g_submoduleTitle = 'Бонусные баллы';
g_submoduleMaxRate = parseInt($(".RatingTableSubmodulesHeadMaxRate #"+g_submoduleID).children("input").val());
g_submoduleMaxRate = parseInt($(".RatingTableSubmodulesHeadMaxRate #"+g_submoduleID).children("input").val());
if (jThis.attr("class").indexOf("additionalCell") >= 0)
{
g_submoduleMaxRate = 38 - parseInt(jThis.siblings(".semesterRateResultCell").text());
}
// Получаем студента
g_studentID = jThis.siblings('.studentCell').attr("id");
......@@ -121,14 +126,16 @@ $(function() {
// exams
if (jThis.attr("class").indexOf("attemptCell") >= 0)
if (jThis.siblings(".semesterRateResultCell ").length > 0) {
{
//if (jThis.siblings(".semesterRateResultCell ").length > 0) {
rateResult = parseInt(jThis.siblings(".semesterRateResultCell").text()) + newRate; // todo
jThis.siblings(".additionalCell").each(function(){
if ($(this).children("input").val() !== "")
rateResult += parseInt($(this).children("input").val());
});
}
//}
}
//end exams
if (rateResult > 100) {
......
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