diff --git a/~dev_rating/application/classes/Controller/Teacher/Rating.php b/~dev_rating/application/classes/Controller/Teacher/Rating.php
index b7353d03f0aeaaaa4e9f0141d5e021bbb577f903..d44a918e9fe5dbfaa340e6c74e43e297d04c9c52 100644
--- a/~dev_rating/application/classes/Controller/Teacher/Rating.php
+++ b/~dev_rating/application/classes/Controller/Teacher/Rating.php
@@ -148,17 +148,18 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
 
         
         $structureHandled = array();
-        $maxRate = 0; $i = 1; $module = 0; $try_1 = 0; // try = 1 - экзамен, = 2, 3 - пересдачи
+        $maxRate = 0; $i = 0; $module = 0; $try_1 = 0; // try = 1 - экзамен, = 2, 3 - пересдачи
+        $examRate = 0;
 
         foreach($structure as $row)
         {
-            //if($row['ModuleID'] != $module)
-            //{
-            //    $i = 1;
-            //    $module = $row['ModuleID'];
-            //}
-            //if ($i == 1)
-            //       $twig->SubjectName = $row['SubjectName'];
+            if($row['ModuleID'] != $module)
+            {
+               ++$i;
+               $module = $row['ModuleID'];
+            }
+            if ($i == 1)
+                  $twig->SubjectName = $row['SubjectName'];
             if(!isset($structureHandled[$i]['SubmodulesCount']))
             {
                 $structureHandled[$i]['SubmodulesCount'] = 0;
@@ -172,17 +173,18 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
                 $twig->examSubmoduleID = $row['SubmoduleID'];
                     
             $structureHandled[$i][$j]['SubmoduleID'] = $row['SubmoduleID'];
-            if ($row['ModuleType'] == 'extra')
+            if ($row['ModuleType'] == 'extra') {
                 $structureHandled[$i][$j]['Title'] = 'Добор баллов';
+                 $maxRate += $row['MaxRate'];
+            }
             else {
                 $try++;
-                if ($try > 1)
-                   $structureHandled[$i][$j]['Title'] = 'Пересдача '.($try - 1);
-                else  $structureHandled[$i][$j]['Title'] = 'Экзамен';
+                $examRate = $row['MaxRate'];
+                $structureHandled[$i][$j]['Title'] = 'Пересдача '.$try;
             }
             //$structureHandled[$i][$j]['Description'] = $row['SubmoduleDescription']; // Описание
             $structureHandled[$i][$j]['MaxRate'] = (int) $row['MaxRate'];
-            $maxRate += $row['MaxRate'];
+           
         }
         $structureHandled['ModulesCount'] = $i;
         $structureHandled['MaxRate'] = (int) $maxRate; 
@@ -198,7 +200,7 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
         $i_g = 0; $i_s = 0; $curGroup = 0;
 
         foreach($students as $row) {
-            // Группа
+            // Группа 
             if ($curGroup !== $row['GroupID']) {
                 $curGroup = $row['GroupID'];
                 $i_g++;
@@ -230,12 +232,21 @@ class Controller_Teacher_Rating extends Controller_UserEnvi {
             $rate = $db->getMapForStudentExam($row['ID'], $id);
             $i_r = 0;
             $rateHandled[$i_g]['Students'][$i_s]['RateResult'] = 0;
+            $examRate = 0;
+
             foreach($rate as $r) {
                 $i_r++;
+                if ($r['ModuleType'] == 'exam') {
+                    if (!is_null($r['Rate']))
+                        $examRate = $r['Rate'];
+                } else {
+                    $rateHandled[$i_g]['Students'][$i_s]['RateResult'] += $r['Rate']; 
+                }
+
                 $rateHandled[$i_g]['Students'][$i_s]['Rates'][$i_r]['SubmoduleID'] = $r['SubmoduleID'];
-                $rateHandled[$i_g]['Students'][$i_s]['Rates'][$i_r]['Rate'] = $r['Rate'];
-                $rateHandled[$i_g]['Students'][$i_s]['RateResult'] += $r['Rate'];
+                $rateHandled[$i_g]['Students'][$i_s]['Rates'][$i_r]['Rate'] = $r['Rate'];       
             }
+            $rateHandled[$i_g]['Students'][$i_s]['RateResult'] += $examRate;
         }
 
 
diff --git a/~dev_rating/application/views/teacher/exam.twig b/~dev_rating/application/views/teacher/exam.twig
index e44e61f05b31f29ae7a7d9e0f06a0826a5786f7d..3937974c14754dd70b8a3d9b5a0339d13e0f4b25 100644
--- a/~dev_rating/application/views/teacher/exam.twig
+++ b/~dev_rating/application/views/teacher/exam.twig
@@ -26,7 +26,7 @@
 		<tr class="RatingTableModulesHead">
 			<td class="title" width="150px">Модуль</td>
 			{% for i in 1..headerRate.ModulesCount %}
-				<td class="subject {% if headerRate[i].ModuleType == 'bonus' %} bonus{% endif %}" colspan="{{headerRate[i].SubmodulesCount}}">
+				<td class="subject" colspan="{{headerRate[i].SubmodulesCount}}" {% if headerRate[i].ModuleType != 'exam' %} rowspan="2" {% endif %}>
 					{{ headerRate[i].ModuleTitle }}
 				</td>
 			{% endfor %}