diff --git a/~dev_rating/application/classes/Controller/Teacher/Rating.php b/~dev_rating/application/classes/Controller/Teacher/Rating.php index 4fe8b7982087c17b2db5a974cc2e234974c2ce79..cbb84b7d3621c15ba8711b8071a94b343aa8a52e 100644 --- a/~dev_rating/application/classes/Controller/Teacher/Rating.php +++ b/~dev_rating/application/classes/Controller/Teacher/Rating.php @@ -139,7 +139,7 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { $structureHandled = array(); - $maxRate = 0; $i = 1; $module = 0; + $maxRate = 0; $i = 1; $module = 0; $try_1 = 0; // try = 1 - экзамен, = 2, 3 - пересдачи foreach($structure as $row) { @@ -163,7 +163,14 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { $twig->examSubmoduleID = $row['SubmoduleID']; $structureHandled[$i][$j]['SubmoduleID'] = $row['SubmoduleID']; - $structureHandled[$i][$j]['Title'] = 'Попытка '.$j; + if ($row{'ModuleType'] == 'extra') + $structureHandled[$i][$j]['Title'] = 'Добор баллов'; + else { + $try++; + if ($try > 1) + $structureHandled[$i][$j]['Title'] = 'Пересдача '.($try - 1); + else $structureHandled[$i][$j]['Title'] = 'Ркзамен'; + } //$structureHandled[$i][$j]['Description'] = $row['SubmoduleDescription']; // Описание $structureHandled[$i][$j]['MaxRate'] = (int) $row['MaxRate']; $maxRate += $row['MaxRate']; @@ -222,7 +229,7 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { } } - //echo debug::vars($structureHandled); + echo debug::vars($structure); $twig->rateTable = $rateHandled; $twig->groups = $groupsHandled;