Skip to content
Snippets Groups Projects
Commit 0ac284ae authored by Turchin's avatar Turchin
Browse files

Merge branch 'issue-12' of http://gitlab.mmcs.sfedu.ru/Nekrolm/grade into issue-12

parents 554d297c 707da25e
Branches
Tags
No related merge requests found
......@@ -13,6 +13,7 @@ class Controller_DeanOffice_Bill extends Controller_Environment_DeanOffice
$table = [];
$iter = 0;
echo Debug::vars(Model_Rating::getRatesForStudentsGroup(365, 11));
foreach ($disciplines as &$dis) {
$disInfo = Model_Discipline::getDisciplineRateInfo($dis['ID']);
......@@ -25,14 +26,12 @@ class Controller_DeanOffice_Bill extends Controller_Environment_DeanOffice
'grades' => []
];
}
$rate = ($record['intermediate'] + $record['bonus'] + $record['exam']);
$rateSet = isset($record['intermediate'])||isset($record['bonus'])||isset($record['exam']);
$table[$record['ID']]['grades'][] = [
'subject' => $dis['SubjectName'],
'rating' => [
'intermediate' => $record['intermediate'],
'bonus' => $record['bonus'],
'exam' => $record['exam']
],
'debt' => (float)($record['intermediate'] + $record['bonus'] + $record['exam']) < 0.6 * $disInfo['Current']
'rating' => $rateSet ? $rate : '-',
'debt' => $rateSet && (float)($record['intermediate'] + $record['bonus'] + $record['exam']) < 0.6 * $disInfo['Current']
];
}
//check: student may not be attach to discipline
......@@ -46,11 +45,7 @@ class Controller_DeanOffice_Bill extends Controller_Environment_DeanOffice
if (!isset($table[$stud['ID']]['grades'][$iter])) {
$table[$stud['ID']]['grades'][] = [
'subject' => $dis['SubjectName'],
'rating' => [
'intermediate' => null,
'bonus' => null,
'exam' => null
],
'rating' => '-',
'debt' => false
];
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment