Commit c37f368b authored by Georgios Tsakalos's avatar Georgios Tsakalos

update lab action

choose only teachers responsible
for lab
parent d2267a77
......@@ -41,15 +41,14 @@ class ListAll
$labs = $this->labservice->getLabsBySchoolId($school->id);
$staff = $this->staffservice->getTeachersBySchoolId($school->id);
$staff = R::exportAll($staff);
$clean_staff = [];
foreach ($staff as $obj) {
$clean_staff[] = [
if ($obj['is_responsible'])
'value' => $obj['id'],
'label' => $obj['name']." ".$obj['surname']
];
if ($obj['is_responsible']){
$clean_staff[] = [
'value' => $obj['id'],
'label' => $obj['name']." ".$obj['surname']
];
}
}
return $this->view->render($res, 'schools/labs.twig', [
......
Markdown is supported
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