Skip to content
Snippets Groups Projects
Commit 15f456f0 authored by Anton Bagliy's avatar Anton Bagliy
Browse files

CHG: readable group lists in teacher's discipline lists #50

parent 5633f621
Branches
No related merge requests found
......@@ -39,14 +39,21 @@ class Controller_Teacher_Index extends Controller_Environment_Teacher
} else {
$dis_groups = $dis->getAllGroups()->groupByUniqueKey('ID');
foreach ($dis_groups as $dis_group) {
$groupDesc = $dis->GroupNum . ' гр';
$groupDesc = '';
if ($dis_group['Degree'] === 'bachelor') {
$groupDesc = $dis->GroupNum . ' гр. бакалавриат' ;
}
if ($dis_group['Degree'] === 'master') {
$groupDesc = $dis->GroupNum . 'гр. магистратура ';
}
if ($dis_group['FormID'] === 'очно-заочная') {
$groupDesc = $groupDesc.' ВО';
}
if ($dis_group['FormID'] === 'заочная') {
$groupDesc = $groupDesc.' ЗО';
}
$groups[$dis->ID][] = $dis_group['GroupNum'] . $groupDesc;
$groups[$dis->ID][] = $dis_group['GradeNum'] . ' к. '. $dis_group['GroupNum'] . $groupDesc;
}
}
......@@ -66,7 +73,13 @@ class Controller_Teacher_Index extends Controller_Environment_Teacher
'Subjects' => $subjects,
'Teachers' => $teachers,
'Groups' => $groups,
'Students' => $students,
// http://gitlab.mmcs.sfedu.ru/it-lab/grade/issues/50
// Передача списка прикрепленных студентов отключена чтобы
// не загромождать пользовательский интерфейс
// и потому что списки студентов определяются только данными из 1С
// теперь в списке дисциплин нельзя быстро увидеть список студентов
// но можно вернуть эту функциональность, раскомментировав строку
// 'Students' => $students,
'DisciplineCreationISAllowed' => Model_System::loadConfig()->Functional->DisciplineCreation,
'EMailChanged' => $EMailChanged,
])->set_filename('teacher/index');
......
......@@ -28,10 +28,10 @@
{% set StudentsList = StudentsList | merge([StudentName]) %}
{% endfor %}
{% if GroupsList and StudentsList %}
{{ GroupsList | join(', ') }},
{{ GroupsList | join(' <br> ') | raw }},
<abbr title="{{ StudentsList | join('\n') }}">Отдельные студенты</abbr>
{% elseif GroupsList %}
{{ GroupsList | join(', ') }}.
{{ GroupsList | join(' <br> ') | raw }}.
{% elseif StudentsList %}
<abbr title="{{ StudentsList | join('\n') }}">Отдельные студенты</abbr>
{% else %}
......
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