From 007f9d5cfbffacd2c77230821fd0613dddc4c6e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A8=D0=B0=D0=BB=D0=B8?=
 =?UTF-8?q?=D0=BC=D0=BE=D0=B2?= <solidovic@gmail.com>
Date: Thu, 4 Sep 2014 23:03:29 +0400
Subject: [PATCH] =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?=
 =?UTF-8?q?=D0=B0=20=D0=BE=D1=86=D0=B5=D0=BD=D0=B8=D0=B2=D0=B0=D0=BD=D0=B8?=
 =?UTF-8?q?=D0=B5:=20=D1=83=20=D0=BC=D0=B8=D0=B3=D1=80=D0=B0=D0=BD=D1=82?=
 =?UTF-8?q?=D0=BE=D0=B2=20=D0=BA=D1=80=D0=BE=D0=BC=D0=B5=20=D0=B3=D1=80?=
 =?UTF-8?q?=D1=83=D0=BF=D0=BF=D1=8B=20=D0=BF=D0=B8=D1=88=D0=B5=D1=82=D1=81?=
 =?UTF-8?q?=D1=8F=20=D0=BA=D1=83=D1=80=D1=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../application/classes/Controller/Teacher/Rating.php | 11 +++++++++--
 ~dev_rating/application/views/teacher/setRate.twig    |  2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/~dev_rating/application/classes/Controller/Teacher/Rating.php b/~dev_rating/application/classes/Controller/Teacher/Rating.php
index 872ed6ea7..41bdd82e8 100644
--- a/~dev_rating/application/classes/Controller/Teacher/Rating.php
+++ b/~dev_rating/application/classes/Controller/Teacher/Rating.php
@@ -15,9 +15,9 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
         if($discipline->count() == 0)
             throw HTTP_Exception::factory (404, "Для дисциплины с ID $id не создана УКД или такой дисциплины не существует!");
         
-	$disciplineHandled = array();
+		$disciplineHandled = array();
         $maxRate = 0; $i = 0; $module = 0;
-        
+
         foreach($discipline as $row)
         {
             if($row['ModuleID'] != $module)
@@ -58,7 +58,14 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
 			$studentsHandled[$i]['FirstName'] = $row['FirstName'];
 			$studentsHandled[$i]['SecondName'] = $row['SecondName'];
 			$studentsHandled[$i]['Grade'] = $row['Grade'];
+			if ($row['Degree'] == 'bachelor')
+				$studentsHandled[$i]['GradeTitle'] = $row['Grade'].' РєСѓСЂСЃ';
+			if ($row['Degree'] == 'specialist')
+				$studentsHandled[$i]['GradeTitle'] = $row['Grade'].' РєСѓСЂСЃ';
+			if ($row['Grade'] == 'master')
+				$studentsHandled[$i]['GradeTitle'] = 'Магистратура, '.$row['Grade'].' год';
 			$studentsHandled[$i]['GroupNum'] = $row['GroupNum'];
+			$studentsHandled[$i]['isAttached'] = $row['isAttached'];
 			$rate = $db->getMapForStudent($row['StudentID'], $id);
 			$j = 0;
 			foreach($rate as $r) {
diff --git a/~dev_rating/application/views/teacher/setRate.twig b/~dev_rating/application/views/teacher/setRate.twig
index 34d76851e..35d59f192 100644
--- a/~dev_rating/application/views/teacher/setRate.twig
+++ b/~dev_rating/application/views/teacher/setRate.twig
@@ -90,7 +90,7 @@
 			{% if student.GroupNum != GroupNum %}	
 				{% set GroupNum = student.GroupNum %}
 				<tr>
-					<td class="group" colspan="{{ CellCount + 2 }}">{{ student.GroupNum }} РіСЂСѓРїРїР°</td>
+					<td class="group" colspan="{{ CellCount + 2 }}">{% if student.isAttached == 1 %} {{ student.GradeTitle }}, {% endif %}{{ student.GroupNum }} РіСЂСѓРїРїР°</td>
 				</tr>
 			{% endif %}
 			<tr>
-- 
GitLab