Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Σταύρος Παπαδάκης
gredu_labs
Commits
c37f368b
Commit
c37f368b
authored
Feb 17, 2016
by
Georgios Tsakalos
Browse files
update lab action
choose only teachers responsible for lab
parent
d2267a77
Changes
1
Hide whitespace changes
Inline
Side-by-side
module/schools/src/Action/Lab/ListAll.php
View file @
c37f368b
...
...
@@ -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'
,
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment