minor changes

parent fe1b1283
......@@ -73,7 +73,8 @@ class DirectorView extends ControllerBase
$user = reset($users);
if ($user) {
$epalId = $user->init->value;
//$epalId = 191;
//hard
//$epalId = 245;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $epalId));
$school = reset($schools);
if (!$school) {
......@@ -473,7 +474,7 @@ class DirectorView extends ControllerBase
}elseif ($userRole === 'ministry') {
$SchoolCats = $this->entityTypeManager->getStorage('eepal_school')
->loadByProperties(array('id' => $schoolid));
}
}
$SchoolCat = reset($SchoolCats);
if ($SchoolCat) {
......@@ -994,7 +995,8 @@ class DirectorView extends ControllerBase
$user = reset($users);
if ($user) {
$schoolid = $user->init->value;
//$schoolid = 191;
//hard
//$schoolid = 245;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $schoolid));
$school = reset($schools);
if (!$school) {
......@@ -1223,17 +1225,17 @@ public function getpde(Request $request)
$sCon = $this->connection->select('eepal_region_field_data', 'eStudent');
$sCon->fields('eStudent', array('id','name' ));
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($studentPerSchool as $object) {
$list[] = array(
'id' => $object -> id,
'name' => $object -> name,
);
++$i;
}
return $this->respondWithStatus($list, Response::HTTP_OK);
} //end try
......@@ -1287,7 +1289,7 @@ public function getpde(Request $request)
$schools = $this->entityTypeManager
->getStorage('eepal_school')
->loadByProperties(array('region_edu_admin_id' => $pdeId));
if ($schools) {
......@@ -1303,7 +1305,7 @@ public function getpde(Request $request)
}
return $this->respondWithStatus($list, Response::HTTP_OK);
}
}
}//end try
catch (\Exception $e) {
$this->logger->warning($e->getMessage());
......@@ -1311,7 +1313,7 @@ public function getpde(Request $request)
"message" => t("An unexpected problem occured during report")
], Response::HTTP_INTERNAL_SERVER_ERROR);
}
}
......
......@@ -2502,7 +2502,8 @@ class ReportsCreator extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
$schoolid = $user->init->value;
//$schoolid = 2838;
//hard
//$schoolid = 2420;
//user role validation
$roles = $user->getRoles();
......@@ -2554,8 +2555,9 @@ class ReportsCreator extends ControllerBase
->fields('eStudent', array('id', 'nextclass', 'name', 'studentsurname','regionaddress', 'regiontk', 'regionarea','telnum','directorconfirm'))
->condition('eStudent.id', $gelClass->student_id, '=')
->condition('eStudent.delapp', 0 , '=')
->condition('eStudent.myschool_promoted', 2 , '<=')
->condition('eStudent.myschool_promoted', 1 , '>=');
//->condition('eStudent.myschool_promoted', 2 , '<=')
//->condition('eStudent.myschool_promoted', 1 , '>=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7));
$gelStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($gelStudents as $gelStudent) {
array_push($idColumn, $gelStudent->id);
......@@ -2614,8 +2616,9 @@ class ReportsCreator extends ControllerBase
->select('gel_student', 'eStudent')
->fields('eStudent', array('id', 'name', 'studentsurname','regionaddress', 'regiontk', 'regionarea','telnum','directorconfirm'))
->condition('eStudent.lastschool_registrynumber', $gelSchool->registry_no , '=')
->condition('eStudent.myschool_promoted', 2 , '<=')
->condition('eStudent.myschool_promoted', 1 , '>=')
//->condition('eStudent.myschool_promoted', 2 , '<=')
//->condition('eStudent.myschool_promoted', 1 , '>=')
->condition(db_or()->condition('myschool_promoted', 1)->condition('myschool_promoted', 2)->condition('myschool_promoted', 6)->condition('myschool_promoted', 7))
->condition('eStudent.delapp', 0 , '=')
->condition('eStudent.nextclass', $k, '=');
......
......@@ -2735,7 +2735,8 @@ public function FindCoursesPerSchoolGel(Request $request)
$user = reset($users);
if ($user) {
$schoolid = $user->init->value;
//$schoolid = 2838;
//hard
//$schoolid = 2420;
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $schoolid));
$school = reset($schools);
if (!$school) {
......@@ -3089,7 +3090,8 @@ public function getStudentPerSchoolGel(Request $request, $classId)
$user = reset($users);
if ($user) {
$gelId = $user->init->value;
//$gelId = 2838;
//hard
//$gelId = 2420;
//$this->logger->warning($gelId."kvdikos sxoleiou".$classId);
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $gelId));
$school = reset($schools);
......
......@@ -487,7 +487,7 @@ class GelSubmittedApplications extends ControllerBase
$schoolAddress = $gelStudent->street_address;
$schoolTel = $gelStudent->phone_number;
//$this->logger->warning("Trace.." . $gelStudent->myschool_promoted . " " . $gelStudent->second_period . " " . $gelStudent->changed . " " . $dateStartInt);
$this->logger->warning("Trace.." . $applicantsResultsDisabled . " " . $gelStudent->myschool_promoted . " " . $gelStudent->second_period . " " . $gelStudent->changed . " " . $dateStartInt);
$canedit = '0';
if ( $applicantsAppModifyDisabled == "0"
&& $eggrafesConfig->activate_second_period->value == $gelStudent->second_period
......@@ -495,16 +495,20 @@ class GelSubmittedApplications extends ControllerBase
)
$canedit = '1';
$applicantsResultsDisabled = "0";
//if ($applicantsResultsDisabled === "0" && ($gelStudent->myschool_promoted === "1" || $gelStudent->myschool_promoted === "2")) {
if ($applicantsResultsDisabled === "0" && ($gelStudent->myschool_promoted != "3" && $gelStudent->myschool_promoted != "4"
&& $gelStudent->myschool_promoted != "5" && $gelStudent->myschool_promoted != "14")) {
$this->logger->warning("Test!!!..");
// περιττό (?), στη Β' περίοδο οι αιτήσεις λογικά δεν έχουν ενημερωμένο το myschool_promoted ?
if ($gelStudent->second_period === "1" && $gelStudent->changed >= $dateStartInt)
if ($gelStudent->second_period == "1" && $gelStudent->changed >= $dateStartInt)
//η αίτηση είναι της β' περιόδου με ημερομηνία μεταγενέστερη της ημερομηνίας έναρξης β' περιόδου
$status = "2";
// end new piece of code
else if ($gelStudent->school_id)
if ($gelStudent->school_id)
//υπάρχει σχολείο στον πίνακα gelstudenthighschool
$status = "1";
//else if ($gelStudent->lastschool_unittypeid == 40)
......@@ -512,7 +516,7 @@ class GelSubmittedApplications extends ControllerBase
// $status = "3";
else if ($gelStudent->student_id != null && $gelStudent->school_id == null)
//υπάρχει ο μαθητής αλλά όχι το σχολείο στον πίνακα gelstudenthighschool
$status = "8";
$status = "3";
else if ($gelStudent->student_id == null) {
//ο μαθητής δεν υπάρχει στον πίνακα gelstudenthighschool, άρα πάει αυτοδίκαια στο σχολείο τρέχουσας φοίτησης
$status = "4";
......
......@@ -342,7 +342,8 @@ class SdeDistribution extends ControllerBase
$sCon->fields('gStudent', array('lastschool_registrynumber','lastschool_unittypeid', 'lastschool_class' , 'delapp','nextclass','am','regionarea','regiontk','regionaddress','id','second_period'))
->fields('gSchool', array('id', 'name','edu_admin_id', 'registry_no','extra_unitid'))
->condition('gStudent.delapp', 0, '=')
->condition('gSchool.extra_unitid',300,'=');
->condition(db_or()->condition('gSchool.extra_unitid', 300 , '=') ->condition('gSchool.extra_unitid',1300,'='));
//->condition('gSchool.extra_unitid',300,'=');
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
}
......
......@@ -69,7 +69,7 @@ import { GelStudentDataFieldsActions } from "../actions/gelstudentdatafields.act
<p style = "font-size:1.0em">
<strong>Ενημέρωση: </strong>
Ευχαριστούμε για τη συνεργασία. Θα μπορείτε να ενημερωθείτε για το αποτέλεσμα της κατανομής της αίτησής σας από τις
<strong>02/07 (για τα ΕΠΑ.Λ.)</strong> και από τις <strong>04/07 (για τα ΓΕ.Λ.)</strong> και να εκτυπώσετε την αίτησή σας μέσω της εφαρμογής e-eggrafes.
<strong>02/07 (για τα ΕΠΑ.Λ.)</strong> και από τις <strong>05/07 (για τα ΓΕ.Λ.)</strong> και να εκτυπώσετε την αίτησή σας μέσω της εφαρμογής e-eggrafes.
</p>
......
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