From 8ea5995886c319d72c1f5b9c71ac242e985218a8 Mon Sep 17 00:00:00 2001 From: PavelBegunkov <asml.Silence@gmail.com> Date: Tue, 16 Dec 2014 21:31:20 +0300 Subject: [PATCH] mx2 --- .../classes/Controller/Teacher/Rating.php | 9 ++++++--- ~dev_rating/application/views/teacher/exam.twig | 14 ++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/~dev_rating/application/classes/Controller/Teacher/Rating.php b/~dev_rating/application/classes/Controller/Teacher/Rating.php index 5c0e6fcaf..ca0dcf7aa 100644 --- a/~dev_rating/application/classes/Controller/Teacher/Rating.php +++ b/~dev_rating/application/classes/Controller/Teacher/Rating.php @@ -175,12 +175,15 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { $structureHandled[$i][$j]['SubmoduleID'] = $row['SubmoduleID']; if ($row['ModuleType'] == 'extra') { $structureHandled[$i][$j]['Title'] = 'Добор баллов'; - $maxRate += $row['MaxRate']; + $maxRate += $row['MaxRate']; } else { - $try++; + if ($try === 0) + $structureHandled[$i][$j]['Title'] = 'Основная сдача'; + else + $structureHandled[$i][$j]['Title'] = 'Пересдача '.$try; $examRate = $row['MaxRate']; - $structureHandled[$i][$j]['Title'] = 'Пересдача '.$try; + $try++; } //$structureHandled[$i][$j]['Description'] = $row['SubmoduleDescription']; // Описание $structureHandled[$i][$j]['MaxRate'] = (int) $row['MaxRate']; diff --git a/~dev_rating/application/views/teacher/exam.twig b/~dev_rating/application/views/teacher/exam.twig index 0e1164706..673c49bd2 100644 --- a/~dev_rating/application/views/teacher/exam.twig +++ b/~dev_rating/application/views/teacher/exam.twig @@ -26,9 +26,15 @@ <tr class="RatingTableModulesHead"> <td class="title" width="150px">Модуль</td> {% for i in 1..headerRate.ModulesCount %} - <td class="subject" colspan="{{headerRate[i].SubmodulesCount}}"> - {{ headerRate[i].ModuleTitle }} - </td> + {% if headerRate[i].ModuleType == 'extra' %} + <td class="subject" colspan="2"> + {{ headerRate[i].ModuleTitle }} + </td> + {% else %} + <td class="subject" colspan="{{headerRate[i].SubmodulesCount}}"> + {{ headerRate[i].ModuleTitle }} + </td> + {% endif %} {% endfor %} <td class="subject" rowspan="3">Ртог Р·Р° семестр</td> <td class="subject" rowspan="3">Ртог</td> @@ -42,7 +48,7 @@ {% set CellCount = CellCount + headerRate[i].SubmodulesCount %} {% for j in 1..headerRate[i].SubmodulesCount %} {% set col = col + 1 %} - <td class="subject col_{{ col }}" rowspan="2">{{ headerRate[i][j].Title }}</td> + <td class="subject col_{{ col }}" rowspan="2"> - </td> {% endfor %} {% set col = col + 1 %} <td class="subject col_{{ col }}" rowspan="2">{{ "Макс." }}</td> -- GitLab