Commit 1bd7abd6 authored by Ασπασία Κατσή's avatar Ασπασία Κατσή

Merge branch 'distribution' into 'develop'

Distribution

See merge request itminedu/e-eggrafes!123
parents 8f295f68 d0b3877a
......@@ -189,7 +189,7 @@ class DirectorView extends ControllerBase
//'relationtostudent' => $relationtostudent_decoded,
//'birthdate' => substr($epalStudent->birthdate->value, 8, 10) . '/' . substr($epalStudent->birthdate->value, 6, 8) . '/' . substr($epalStudent->birthdate->value, 0, 4),
'birthdate' => date("d-m-Y", strtotime($epalStudent->birthdate)),
'checkstatus' => $checkstudentstatus -> directorconfirm ,
'checkstatus' => $checkstudentstatus -> directorconfirm -> value ,
'lock_delete' => $lock_delete,
'created' => date('d/m/Y H:i', $epalStudent -> created ),
......
......@@ -2224,11 +2224,20 @@ public function getStudentPerSchoolGel(Request $request, $classId)
$studentIdNew = $studentId;
$choices = "";
$studentchoices = $this->entityTypeManager->getStorage('gel_student_choices')->loadByProperties(array('student_id' => $studentId));
//$studentchoices = $this->entityTypeManager->getStorage('gel_student_choices')->loadByProperties(array('student_id' => $studentId));
foreach ($studentchoices as $objects) {
$choices = $choices." ".($objects -> choice_id ->entity->get('name')->value)."/" ;
$sCon = $this->connection->select('gel_student_choices', 'eSchool')
->fields('eSchool', array('student_id', 'choice_id','order_id'))
->condition('eSchool.student_id', $studentId , '=');
$sCon -> orderBy('eSchool.order_id', 'ASC');
$studentchoices = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($studentchoices as $objects) {
$schoices = $this->entityTypeManager->getStorage('gel_choices')->loadByProperties(array('id' => $objects -> choice_id));
$schoice = reset($schoices);
$choices = $choices." ".($schoice -> name ->value )."/" ;
}
$crypt = new Crypt();
......@@ -3045,7 +3054,7 @@ public function ConfirmStudents(Request $request)
$userRole = $tmpRole;
}
}
if ($userRole === 'gel') {
if ($userRole === 'gel' || $tmpRole === 'gymlt') {
if ($content = $request->getContent()) {
$postData = json_decode($content);
$arr = $postData->students;
......
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