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
1c956df0
Commit
1c956df0
authored
Feb 18, 2016
by
Georgios Tsakalos
Browse files
add course functionality to lab action
needs clean up
parent
102baa54
Changes
1
Hide whitespace changes
Inline
Side-by-side
module/schools/src/Action/Lab/ListAll.php
View file @
1c956df0
...
...
@@ -39,6 +39,20 @@ class ListAll
return
$res
->
withStatus
(
403
,
'No school'
);
}
// $lab = R::dispense('lab');
// $lab->school_id = 1;
// $teacher = R::load('teacher', 2);
// $lab->sharedCourse = array($course1, $course2);
// $lab->area = 55;
// $lab->in_school_use = true;
// $lab->out_school_use = false;
// $lab->attachment = 'foo/bar/qux/arxeio.gph';
// $lab->has_network = true;
// $lab->has_server = true;
// R::store($lab);
$labs
=
$this
->
labservice
->
getLabsBySchoolId
(
$school
->
id
);
$staff
=
$this
->
staffservice
->
getTeachersBySchoolId
(
$school
->
id
);
$clean_staff
=
[];
...
...
@@ -50,7 +64,13 @@ class ListAll
];
}
}
$courses
=
$this
->
labservice
->
getCourses
();
$lessons
=
[];
foreach
(
$courses
as
$lesson
){
$lessons
[]
=
[
'value'
=>
$lesson
->
id
,
'label'
=>
$lesson
->
name
];
}
error_log
(
print_r
(
$courses
,
TRUE
));
error_log
(
print_r
(
'courses'
,
TRUE
));
return
$this
->
view
->
render
(
$res
,
'schools/labs.twig'
,
[
'labs'
=>
$labs
,
'staff'
=>
$clean_staff
,
...
...
@@ -68,16 +88,7 @@ class ListAll
'label'
=>
'ΓΡΑΦΕΙΟ'
,
],
],
'lessons'
=>
[
[
'value'
=>
1
,
'label'
=>
'ΦΥΣΙΚΗ'
,
],
[
'value'
=>
2
,
'label'
=>
'ΠΛΗΡΟΦΟΡΙΚΗ'
,
],
],
'lessons'
=>
$lessons
,
]);
}
}
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