Commit 1c94ffdf authored by Kostas G's avatar Kostas G

only invalid apps for DDE

parent 8835231d
......@@ -283,6 +283,16 @@ public function getStudentsPerSchool(Request $request, $schoolid, $type,$address
{
$this->logger->warning('arxh'.$schoolid);
$newsch = intval($schoolid);
$sCon = $this->connection->select('invalid_apps', 'invalid')
->fields('invalid', array('id', 'type'));
$inv_apps = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
$invalid_ids = array();
foreach ($inv_apps as $app) {
array_push($invalid_ids, $app->id);
}
if ($type === '1')
{
......@@ -332,6 +342,7 @@ public function getStudentsPerSchool(Request $request, $schoolid, $type,$address
->condition('gStudent.lastschool_unittypeid', 3 , '=')
->condition('gStudent.lastschool_class', "3", '=') // XREIAZETAI TO 3 H OXI??? MIPWS NA TOI ANOIKSW TELEIWS????
->condition(db_or()->condition('nextclass', "1")->condition('nextclass', "4"))
->condition('gStudent.id', $invalid_ids, 'IN')
->condition('gStudent.delapp', 0, '=');
$sCon -> orderBy('gStudent.second_period', 'DESC');
$studentPerSchool = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -343,6 +354,7 @@ public function getStudentsPerSchool(Request $request, $schoolid, $type,$address
->condition('gStudent.lastschool_unittypeid', 5 , '=')
//->condition(db_or()->condition('gStudent.lastschool_class', "1")->condition('gStudent.lastschool_class', "4"))
->condition('gStudent.delapp', 0, '=')
->condition('gStudent.id', $invalid_ids, 'IN')
->condition(db_or()->condition('gStudent.nextclass', "1")->condition('gStudent.nextclass', "4"));
$sCon -> orderBy('gStudent.id', 'DESC');
$studentPerSchoolfromepal = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -358,6 +370,7 @@ public function getStudentsPerSchool(Request $request, $schoolid, $type,$address
->condition('gStudent.nextclass', "1",'=')
->condition('gStudent.lastschool_class', "1",'=')
->condition('eSchool.operation_shift','ΕΣΠΕΡΙΝΟ','=')
->condition('gStudent.id', $invalid_ids, 'IN')
->condition('gStudent.delapp', 0, '=');
$sCon -> orderBy('gStudent.second_period', 'DESC');
$studentPerSchoolfromesp = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -384,6 +397,7 @@ public function getStudentsPerSchool(Request $request, $schoolid, $type,$address
->condition('gStudent.nextclass', "4",'=')
->condition('gStudent.lastschool_class', "1",'=')
->condition('eSchool.operation_shift','ΗΜΕΡΗΣΙΟ','=')
->condition('gStudent.id', $invalid_ids, 'IN')
->condition('gStudent.delapp', 0, '=');
$sCon -> orderBy('gStudent.second_period', 'DESC');
$studentPerSchooltoesp = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
......@@ -1417,14 +1431,6 @@ public function getStudentsPerSchool(Request $request, $schoolid, $type,$address
->condition('gStudent.delapp', 0, '=');
*/
$sCon = $this->connection->select('invalid_apps', 'invalid')
->fields('invalid', array('id', 'type'));
$inv_apps = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
$invalid_ids = array();
foreach ($inv_apps as $app) {
array_push($invalid_ids, $app->id);
}
$sCon = $this->connection->select('gel_student', 'gStudent');
$sCon->leftJoin('eepal_school_field_data', 'eSchool', 'eSchool.registry_no = gStudent.lastschool_registrynumber');
......@@ -2795,7 +2801,7 @@ public function FindCoursesPerSchoolGel(Request $request)
if ($user) {
$schoolid = $user->init->value;
//hard
//$schoolid = 361;
//$schoolid = 1184;
//$schoolid = 1877;
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $schoolid));
$school = reset($schools);
......@@ -3165,7 +3171,7 @@ public function getStudentPerSchoolGel(Request $request, $classId)
$gelId = $user->init->value;
//hard
//$gelId = 361;
//$gelId = 1877;
$gelId = 1184;
//$this->logger->warning($gelId."kvdikos sxoleiou".$classId);
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $gelId));
$school = reset($schools);
......
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