fix survey service when no answer; update develop.md file

parent 76b9f1aa
......@@ -295,6 +295,15 @@ This module provides the services, views and javascript for schools to submit th
- application module
- `zendframework/zend-inputfilter`: ^2.0
### tpe_survey
This module overrides staff view of schools module. It allows school user to submit
information about teachers using IT in education.
#### Dependencies
- schools module
## ER diagram
![ER diagram](https://github.com/eellak/gredu_labs/blob/develop/data/db/er.png)
......
......@@ -18,6 +18,9 @@ class SurveyService implements SurveyServiceInterface
public function getAnswers($teacherId)
{
$bean = R::findOne('tpesurvey', 'teacher_id = ?', [$teacherId]);
if (null === $bean) {
return;
}
$data = $bean->export();
$data['assets_in_use'] = explode('|', $data['assets_in_use']);
if (!$data['assets_in_use']) {
......
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