Removed buggy code(undefined variables)

parent 6b248da5
......@@ -81,7 +81,6 @@ class DirectorView extends ControllerBase
'error_code' => 4003,
], Response::HTTP_FORBIDDEN);
} elseif ($userRole === 'epal') {
$selectIdNew = $selectId;
if ($classId == 1) {
$selectIdNew = -1;
} elseif ($classId == 2) {
......@@ -555,7 +554,7 @@ class DirectorView extends ControllerBase
$specialityid = $object->specialty_id->entity->id();
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')
->loadByProperties(array('epal_id' => $schoolid, 'specialization_id' => $specialityid, 'currentclass' => 4));
$capacity_class_d = ($object -> capacity_class_specialty_d ->value) *25;
$capacity_class_d = ($object -> capacity_class_specialty_d ->value) *25;
$list[] = array(
'id' => $object->specialty_id->entity->id(),
'name' => 'Δ Λυκείου '.$object->specialty_id->entity->get('name')->value,
......
......@@ -259,9 +259,9 @@ class SubmitedApplications extends ControllerBase
'name' => $name_decoded,
'studentsurname' => $studentsurname_decoded,
'fatherfirstname' => $fatherfirstname_decoded,
'fathersurname' => $object->fathersurname->value,
'fathersurname' => '',
'motherfirstname' => $motherfirstname_decoded,
'mothersurname' => $object->mothersurname->value,
'mothersurname' => '',
'guardian_name' => $guardian_name_decoded,
'guardian_surname' => $guardian_surname_decoded,
'guardian_fathername' => $guardian_fathername_decoded,
......@@ -436,9 +436,9 @@ class SubmitedApplications extends ControllerBase
'name' => $name_decoded,
'studentsurname' => $studentsurname_decoded,
'fatherfirstname' => $fatherfirstname_decoded,
'fathersurname' => $epalStudent->fathersurname,
'fathersurname' => '',
'motherfirstname' => $motherfirstname_decoded,
'mothersurname' => $epalStudent->mothersurname,
'mothersurname' => '',
'guardian_name' => $guardian_name_decoded,
'guardian_surname' => $guardian_surname_decoded,
'guardian_fathername' => $guardian_fathername_decoded,
......@@ -720,7 +720,7 @@ class SubmitedApplications extends ControllerBase
}
$transaction = $this->connection->startTransaction();
try {
//ανάκτηση τιμής από ρυθμίσεις διαχειριστή για lock_school_students_view
......@@ -749,7 +749,7 @@ class SubmitedApplications extends ControllerBase
if ($epalStudent) {
$epalStudentClasses = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('student_id' => $applicationId));
$epalStudentClass = reset($epalStudentClasses);
if ($epalStudentClass) {
if ($epalStudentClass->directorconfirm->value === "1") {
return $this->respondWithStatus([
......@@ -801,4 +801,4 @@ class SubmitedApplications extends ControllerBase
return $res;
}
}
\ No newline at end of file
}
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