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

fix6

parent 6f9787e1
Branches
Tags
No related merge requests found
...@@ -250,8 +250,6 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { ...@@ -250,8 +250,6 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
} else { } else {
$extraNum = $i_r; $extraNum = $i_r;
$rateHandled[$i_g]['Students'][$i_s]['RateResult'] += $r['Rate']; $rateHandled[$i_g]['Students'][$i_s]['RateResult'] += $r['Rate'];
$i_r++;
$rateHandled[$i_g]['Students'][$i_s]['RateResult'] = $r['Rate'];
} }
} }
$rateHandled[$i_g]['Students'][$i_s]['RateResult'] += $examRate; $rateHandled[$i_g]['Students'][$i_s]['RateResult'] += $examRate;
...@@ -262,9 +260,9 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { ...@@ -262,9 +260,9 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
$rateHandled[$i_g]['Students'][$i_s]['Rates'][$extraNum+1]['SubmoduleID'] = -1; $rateHandled[$i_g]['Students'][$i_s]['Rates'][$extraNum+1]['SubmoduleID'] = -1;
$curRate = $total[0]['Num'] - $examRate - $rateHandled[$i_g]['Students'][$i_s]['Rates'][$extraNum+1]['Rate']; $curRate = $total[0]['Num'] - $examRate - $rateHandled[$i_g]['Students'][$i_s]['Rates'][$extraNum+1]['Rate'];
if ($curRate < 32 OR $curRate > 38) if ($curRate < 32 OR $curRate > 38)
$rateHandled[$i_g]['Students'][$i_s]['Rates'][$extraNum+1]['Rate'] = 0; $rateHandled[$i_g]['Students'][$i_s]['Extra'] = 0;
else else
$rateHandled[$i_g]['Students'][$i_s]['Rates'][$extraNum+1]['Rate'] = 38 - $curRate; $rateHandled[$i_g]['Students'][$i_s]['Extra'] = 38 - $curRate;
} }
//echo Debug::vars($structureHandled,$rateHandled); //echo Debug::vars($structureHandled,$rateHandled);
......
...@@ -25,18 +25,12 @@ ...@@ -25,18 +25,12 @@
<table class="studentsRate" border="0" cellspacing="0" cellpadding="0"> <table class="studentsRate" border="0" cellspacing="0" cellpadding="0">
<tr class="RatingTableModulesHead"> <tr class="RatingTableModulesHead">
<td class="title" width="150px">Модуль</td> <td class="title" width="150px">Модуль</td>
<td class="subject" rowspan="3">Итог за семестр</td>
{% for i in 1..headerRate.ModulesCount %} {% for i in 1..headerRate.ModulesCount %}
{% if headerRate[i].ModuleType == 'extra' %} <td class="subject" colspan="{{headerRate[i].SubmodulesCount}}">
<td class="subject" colspan="2"> {{ headerRate[i].ModuleTitle }}
{{ headerRate[i].ModuleTitle }} </td>
</td>
{% else %}
<td class="subject" colspan="{{headerRate[i].SubmodulesCount}}">
{{ headerRate[i].ModuleTitle }}
</td>
{% endif %}
{% endfor %} {% endfor %}
<td class="subject" rowspan="3">Итог за семестр</td>
<td class="subject" rowspan="3">Итог</td> <td class="subject" rowspan="3">Итог</td>
</tr> </tr>
<tr class="RatingTableSubmodulesHead"> <tr class="RatingTableSubmodulesHead">
...@@ -44,23 +38,12 @@ ...@@ -44,23 +38,12 @@
{% 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 %}
{% if headerRate[i].ModuleType == 'extra' %} {% set CellCount = CellCount + headerRate[i].SubmodulesCount %}
{% set CellCount = CellCount + headerRate[i].SubmodulesCount %} {% for j in 1..headerRate[i].SubmodulesCount %}
{% for j in 1..headerRate[i].SubmodulesCount %} {% set col = col + 1 %}
{% set col = col + 1 %} <td class="subject col_{{ col }}"> - </td>
<td class="subject col_{{ col }}"> - </td> {% endfor %}
{% endfor %} {% set col = col + 1 %}
{% set col = col + 1 %}
<td class="subject col_{{ col }}">{{ "Макс." }}</td>
{% else %}
{% set CellCount = CellCount + headerRate[i].SubmodulesCount %}
{% for j in 1..headerRate[i].SubmodulesCount %}
{% set col = col + 1 %}
<td class="subject col_{{ col }}">{{ headerRate[i][j].Title }}</td>
{% endfor %}
{% endif %}
{% endfor %} {% endfor %}
</tr> </tr>
<tr class="RatingTableSubmodulesHeadMaxRate"> <tr class="RatingTableSubmodulesHeadMaxRate">
...@@ -75,13 +58,6 @@ ...@@ -75,13 +58,6 @@
<input type="hidden" class="MaxRate" value="{{ headerRate[i][j].MaxRate }}"> <input type="hidden" class="MaxRate" value="{{ headerRate[i][j].MaxRate }}">
</td> </td>
{% endfor %} {% endfor %}
{% if headerRate[i].ModuleType == 'extra' %}
{% set CellCount = CellCount + 1 %}
{% set col = col + 1 %}
<td class="subject col_{{ col }}" id="{{ headerRate[i][j].SubmoduleID }}"> -
<input type="hidden" class="MaxRate" value="-">
</td>
{% endif %}
{% endfor %} {% endfor %}
</tr> </tr>
{% set row = 0 %} {% set row = 0 %}
...@@ -93,6 +69,7 @@ ...@@ -93,6 +69,7 @@
{% set row = row + 1 %} {% set row = row + 1 %}
{% set j = 0 %} {% set j = 0 %}
<tr id="{{ row }}" class="{{ group.GroupID }}"> <tr id="{{ row }}" class="{{ group.GroupID }}">
<td class="row_{{ row }} col_{{ i + 1 }} RateSemesterResult">{{ student.RateSemesterResult }}</td>
<td class="student" id="{{ student.ID }}">{{ student.Last }} {{ student.First }}</td> <td class="student" id="{{ student.ID }}">{{ student.Last }} {{ student.First }}</td>
{% for i in 1..CellCount %} {% for i in 1..CellCount %}
{% set j = j + 1 %} {% set j = j + 1 %}
...@@ -100,8 +77,7 @@ ...@@ -100,8 +77,7 @@
<input type="text" value="{{ student.Rates[i].Rate }}"> <input type="text" value="{{ student.Rates[i].Rate }}">
</td> </td>
{% endfor %} {% endfor %}
<td class="row_{{ row }} col_{{ i + 1 }} RateSemesterResult">{{ student.RateSemesterResult }}</td> <td class="row_{{ row }} col_{{ i + 1 }} RateResult">{{ student.RateResult }}</td>
<td class="row_{{ row }} col_{{ i + 2 }} RateResult">{{ student.RateResult }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
......
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