From 7b76100f86299e02bf41fe5efa806de0313c22fe Mon Sep 17 00:00:00 2001 From: xamgore <xamgore@ya.ru> Date: Tue, 7 Jun 2016 10:31:40 +0300 Subject: [PATCH] Make credit disciplines green after 60-threshold --- .../application/classes/Controller/Student/Index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/~dev_rating/application/classes/Controller/Student/Index.php b/~dev_rating/application/classes/Controller/Student/Index.php index 30843a96b..f5884d332 100644 --- a/~dev_rating/application/classes/Controller/Student/Index.php +++ b/~dev_rating/application/classes/Controller/Student/Index.php @@ -8,8 +8,12 @@ class Controller_Student_Index extends Controller_Environment_Student $marks = []; foreach ($disciplines as $dis) { - if (isset($dis->Rate) && isset($dis->MaxCurrentRate)) + if (isset($dis->Rate) && isset($dis->MaxCurrentRate)) { $marks[$dis->ID] = Model_Subject::getECTSMark($dis->Rate, $dis->MaxCurrentRate, $exam = NULL); + + if ($dis->Type == Model_Discipline::CREDIT && $dis->Rate >= 60) + $marks[$dis->ID] = Model_Subject::MARK_A; + } } $teachers = $student->getTeachers(); -- GitLab