diff --git a/~dev_rating/application/classes/Controller/Teacher/Rating.php b/~dev_rating/application/classes/Controller/Teacher/Rating.php index 872ed6ea76acded3be43843932a40bb2f4f29f44..41bdd82e8a677d00d3c5c1c1497daef7328c993e 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 34d76851ec9e1918e146ea097029b3f65fe819c2..35d59f192e1afc283476ed7b66a9d80478d96aa6 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>