...
 
Commits (22)
......@@ -78,3 +78,11 @@ deploysystem.get_school_list:
_controller: '\Drupal\deploysystem\Controller\CustomViews::getSchoolList'
requirements:
_user_is_logged_in: 'TRUE'
deploysystem.get_gelschool_list:
path: '/deploysystem/getgelschoollist/{schsearch}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\deploysystem\Controller\CustomViews::getGelSchoolList'
requirements:
_user_is_logged_in: 'TRUE'
\ No newline at end of file
......@@ -87,6 +87,37 @@ class CustomViews extends ControllerBase {
}
public function getGelSchoolList(Request $request, $schsearch) {
try {
$sCon = $this->connection->select('gel_school', 'eSchool')
->fields('eSchool', array('name', 'registry_no', 'unit_type_id', 'id'));
//->condition('eSchool.name', '%' . db_like($schsearch) . '%', 'LIKE');
$words = preg_split('/[\s]+/', $schsearch);
foreach ($words as $word)
$sCon->condition('eSchool.name', '%' . db_like($word) . '%', 'LIKE');
$schools = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
//$school = reset($schools);
$list = array();
foreach ($schools as $object) {
$list[] = array(
'registry_no' => $object->registry_no,
'name' => $object->name,
'unit_type_id' => $object->unit_type_id,
'school_id' => $object->id,
);
}
return $this->respondWithStatus($list, Response::HTTP_OK);
} catch (\Exception $e) {
$this->logger->error($e->getMessage());
return $this->respondWithStatus([
'message' => t("error in getSchoolList function"),
], Response::HTTP_FORBIDDEN);
}
}
......
......@@ -285,14 +285,14 @@ class Distribution extends ControllerBase
$total_count = 0;
try {
$sCon = $this->connection->select('epal_student', 'eStudent')
->fields('eStudent', array('id', 'currentclass', 'currentepal', 'second_period', 'created'))
->fields('eStudent', array('id', 'currentclass', 'currentepal', 'second_period', 'created', 'changed'))
->condition('eStudent.delapp', 1, '!=');
if ($period === self::IS_SECOND_PERIOD) {
$sCon->condition('eStudent.second_period', 1, '=');
//$datelimit = '7-9-2017';
$datelimitInt = strtotime($datelimit);
$sCon->condition('eStudent.created', $datelimitInt, '>=');
$sCon->condition('eStudent.changed', $datelimitInt, '>=');
}
......@@ -913,7 +913,8 @@ class Distribution extends ControllerBase
try {
$this->connection->delete('epal_student_class')
->condition('second_period', 1)
->condition('created', $datelimitInt, '>=')
//->condition('created', $datelimitInt, '>=')
->condition('changed', $datelimitInt, '>=')
->execute();
} catch (\Exception $e) {
$this->logger->error($e->getMessage());
......
......@@ -221,12 +221,14 @@ class PDFCreator extends ControllerBase {
else
$this->pdf->MultiCell(0, 8, $this->prepareString('με αριθμό δήλωσης: ' . $student->id->value . ' / ' . date('d-m-y (ώρα: H:i:s)', $student->created->value)), 0, 'C');
/*
$this->pdf->SetFont($this->fontLight, '', 11);
//if ($this->applicantsResultsDisabled === "1")
if ($status === "0" || $status === "3" || $status === "4" || $status === "5" || $status === "6" || $status === "7")
$this->pdf->MultiCell(0, 8, $this->prepareString('(Αρχική)'), 0, 'R');
else if ($status === "1" || $status === "2")
$this->pdf->MultiCell(0, 8, $this->prepareString('(Οριστική)'), 0, 'R');
*/
$this->pdf->Ln();
}
......
......@@ -2231,7 +2231,7 @@ class ReportsCreator extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
$schoolid = $user->init->value;
//$schoolid = 162;
//$schoolid = 2838;
//user role validation
$roles = $user->getRoles();
......@@ -2278,8 +2278,11 @@ class ReportsCreator extends ControllerBase
->fields('eStudent', array('name','studentsurname','regionaddress', 'regiontk', 'regionarea','telnum'))
->condition('eStudent.id', $epalStudentClass->student_id, '=')
->condition('eStudent.delapp', 0 , '=')
->condition('eStudent.myschool_promoted', 2 , '<=')
->condition('eStudent.myschool_promoted', 1 , '>=');
//Για α' περίοδο: myschool_promoted in (1,2), Για β' περίοδο: myschool_promoted in (1,2,6,7)
//Να παραμετροποιηθεί με βάση την περίοδο, στην επόμενη έκδοση!
//->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));
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalStudents as $epalStudent) {
array_push($idColumn, $epalStudentClass->student_id);
......@@ -2335,8 +2338,9 @@ class ReportsCreator extends ControllerBase
->fields('eStudent', array('name','studentsurname','regionaddress', 'regiontk', 'regionarea','telnum'))
->condition('eStudent.delapp', 0 , '=')
->condition('eStudent.id', $epalStudentClass->student_id, '=')
->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));
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalStudents as $epalStudent) {
array_push($idColumn, $epalStudentClass->student_id);
......@@ -2382,8 +2386,9 @@ class ReportsCreator extends ControllerBase
->fields('eStudent', array('name','studentsurname','regionaddress', 'regiontk', 'regionarea','telnum'))
->condition('eStudent.delapp', 0 , '=')
->condition('eStudent.id', $epalStudentClass->student_id, '=')
->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));
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalStudents as $epalStudent) {
array_push($idColumn, $epalStudentClass->student_id);
......@@ -2429,8 +2434,9 @@ class ReportsCreator extends ControllerBase
->fields('eStudent', array('name','studentsurname','regionaddress', 'regiontk', 'regionarea','telnum'))
->condition('eStudent.delapp', 0 , '=')
->condition('eStudent.id', $epalStudentClass->student_id, '=')
->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));
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalStudents as $epalStudent) {
array_push($idColumn, $epalStudentClass->student_id);
......@@ -2496,7 +2502,7 @@ class ReportsCreator extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
$schoolid = $user->init->value;
//$schoolid = 1164;
//$schoolid = 2838;
//user role validation
$roles = $user->getRoles();
......@@ -2705,7 +2711,7 @@ class ReportsCreator extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
$schoolid = $user->init->value;
//$schoolid = 2792;
//$schoolid = 2838;
//user role validation
$roles = $user->getRoles();
......
......@@ -574,31 +574,62 @@ class SubmitedApplications extends ControllerBase
//$this->logger->warning("Trace2.." . $applicantsResultsDisabled . " " . $es->myschool_promoted );
if ($applicantsResultsDisabled === "0" && ($es->myschool_promoted === "1" || $es->myschool_promoted === "2") ) {
if ($epalStudent->finalized === "1")
$status = "1";
else if ($epalStudent->finalized === "0")
//$status = "2"; Τροποποίηση για να βγαίνει μήνυμα ότι τοποθετήθηκε "κανονικά" και ας είναι ολιγομελές
$status = "1";
else if ( ($epalStudent->second_period === "0" && /*$studInDistr === false*/ $epalStudent->finalized === null) ||
($epalStudent->second_period === "1" && $epalStudent->changed < $dateStartInt) )
$status = "3";
else if ($epalStudent->second_period === "1" &&
$epalStudent->changed >= $dateStartInt)
$status = "4";
if ($epalStudent->second_period === "0") {
if ($applicantsResultsDisabled === "0" && ($es->myschool_promoted === "1" || $es->myschool_promoted === "2") ) {
if ($epalStudent->finalized === "1")
$status = "1";
else if ($epalStudent->finalized === "0")
//$status = "2"; Τροποποίηση για να βγαίνει μήνυμα ότι τοποθετήθηκε "κανονικά" και ας είναι ολιγομελές
$status = "1";
else if ( ($epalStudent->second_period === "0" && /*$studInDistr === false*/ $epalStudent->finalized === null) ||
($epalStudent->second_period === "1" && $epalStudent->changed < $dateStartInt) )
$status = "3";
else if ($epalStudent->second_period === "1" &&
$epalStudent->changed >= $dateStartInt)
$status = "4";
}
else if ($applicantsResultsDisabled === "0" && ($es->myschool_promoted === "6" || $es->myschool_promoted === "7") )
$status = "5";
else if ($applicantsResultsDisabled === "0" &&
$es->myschool_promoted != null && $es->myschool_promoted != "0" &&
$es->myschool_promoted != "1" && $es->myschool_promoted != "2" &&
$es->myschool_promoted != "6" && $es->myschool_promoted != "7"
)
$status = "6";
else if ($applicantsResultsDisabled === "0" && $es->myschool_promoted === "0" )
$status = "7";
else
$status = "0";
}
else if ($applicantsResultsDisabled === "0" && ($es->myschool_promoted === "6" || $es->myschool_promoted === "7") )
$status = "5";
else if ($applicantsResultsDisabled === "0" &&
$es->myschool_promoted != null && $es->myschool_promoted != "0" &&
$es->myschool_promoted != "1" && $es->myschool_promoted != "2" &&
$es->myschool_promoted != "6" && $es->myschool_promoted != "7"
)
$status = "6";
else if ($applicantsResultsDisabled === "0" && $es->myschool_promoted === "0" )
$status = "7";
else
$status = "0";
else if ($epalStudent->second_period === "1") {
if ($applicantsResultsDisabled === "0" && ($es->myschool_promoted != "3" && $es->myschool_promoted != "4" &&
$es->myschool_promoted != "5" && $es->myschool_promoted != "14") )
{
if ($epalStudent->finalized === "1")
$status = "1";
else if ($epalStudent->finalized === "0")
//$status = "2"; Τροποποίηση για να βγαίνει μήνυμα ότι τοποθετήθηκε "κανονικά" και ας είναι ολιγομελές
$status = "1";
else if ( $epalStudent->changed < $dateStartInt )
$status = "3";
else if ($epalStudent->changed >= $dateStartInt)
$status = "4";
}
else if ($applicantsResultsDisabled === "0" &&
$es->myschool_promoted === "3" || $es->myschool_promoted === "4" ||
$es->myschool_promoted === "5" || $es->myschool_promoted != "14"
)
$status = "6";
else
$status = "0";
}
if ($epalStudent->changed != 1529867143)
$appchanged = $epalStudent->changed;
......
......@@ -134,6 +134,9 @@ class WSConsumer extends ControllerBase
$sCon->condition('gel_app.lastschool_schoolyear','2017-2018', '<');
$sCon->condition('gel_app.myschool_id',NULL, 'IS NOT');
$sCon->condition('gel_app.delapp',0, '=');
$sCon->condition('gel_app.myschool_promoted',NULL, 'IS');
$sCon->condition('gel_app.second_period',1, '=');
$students_promotions = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($students_promotions as $student) {
......@@ -151,14 +154,16 @@ class WSConsumer extends ControllerBase
}
if ($result==NULL){
$this->logger->warning($count.",".$student->myschool_id.", null response");
$this->logger->warning($count.",".$student->myschool_id.", null result");
}
else{
$promotion=json_decode($result);
if ($promotion==NULL){
$this->logger->warning($count.",".$student->myschool_id.", null response");
$this->logger->warning($count.",".$student->myschool_id.", null promotion");
$promotion=0;
}
$transaction = $this->connection->startTransaction();
......@@ -194,6 +199,10 @@ class WSConsumer extends ControllerBase
$sCon->condition('epal_app.lastschool_schoolyear','2017-2018', '<');
$sCon->condition('epal_app.myschool_id',NULL, 'IS NOT');
$sCon->condition('epal_app.delapp',0, '=');
//$sCon->condition('epal_app.myschool_promoted',2, '=');
$sCon->condition('epal_app.myschool_promoted',NULL, 'IS');
$sCon->condition('epal_app.second_period',1, '=');
$students_promotions = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($students_promotions as $student) {
......@@ -211,14 +220,15 @@ class WSConsumer extends ControllerBase
}
if ($result==NULL){
$this->logger->warning($count.",".$student->myschool_id.", null response");
$this->logger->warning($count.",".$student->myschool_id.", null result");
}
else{
$promotion=json_decode($result);
if ($promotion==NULL){
$this->logger->warning($count.",".$student->myschool_id.", null response");
$this->logger->warning($count.",".$student->myschool_id.", null promotion");
$promotion=0;
}
$transaction = $this->connection->startTransaction();
......
......@@ -174,6 +174,22 @@ gel.deleteFromDirector:
_controller: '\Drupal\gel\Controller\GelDistribution::deleteApplicationFromDirector'
requirements:
_user_is_logged_in: 'TRUE'
gel.sdeallstudents:
path: '/gel/sde_all_students'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\SdeDistribution::getSdeStudents'
requirements:
_user_is_logged_in: 'TRUE'
gel.savehighscoolselectionforSDE:
path: '/gel/saveselectionforSDE/{studentid}/{schoolid}/{undoselection}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\SdeDistribution::SaveSdeStudentHighSchhool'
requirements:
_user_is_logged_in: 'TRUE'
gel.initializationBperiod:
path: '/gel/initializationBperiod'
options:
......@@ -182,3 +198,19 @@ gel.initializationBperiod:
_controller: '\Drupal\gel\Controller\GelDistribution::Initializationbperiod'
requirements:
_user_is_logged_in: 'TRUE'
gel.idiwtallstudents:
path: '/gel/idiwt_all_students'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\SdeDistribution::getIdiwtStudents'
requirements:
_user_is_logged_in: 'TRUE'
gel.savehighscoolselectionforIDIWT:
path: '/gel/saveselectionforIDIWT/{studentid}/{schoolid}/{undoselection}'
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\gel\Controller\SdeDistribution::SaveIdiwtStudentHighSchhool'
requirements:
_user_is_logged_in: 'TRUE'
\ No newline at end of file
<?php
/**
* @file
* Contains \Drupal\query_example\Controller\QueryExampleController.
*/
namespace Drupal\gel\Controller;
use Drupal\Core\Entity\Query\QueryFactory;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Drupal\Core\Database\Connection;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use Drupal\gel\Crypt;
class CreateGelDemoData extends ControllerBase {
protected $entity_query;
protected $entityTypeManager;
protected $logger;
protected $connection;
public function __construct(
EntityTypeManagerInterface $entityTypeManager,
QueryFactory $entity_query,
Connection $connection,
LoggerChannelFactoryInterface $loggerChannel)
{
$this->entityTypeManager = $entityTypeManager;
$this->entity_query = $entity_query;
$this->connection = $connection;
$this->logger = $loggerChannel->get('gel');
}
public static function create(ContainerInterface $container)
{
return new static(
$container->get('entity.manager'),
$container->get('entity.query'),
$container->get('database'),
$container->get('logger.factory')
);
}
public function make_seed() {
list($usec, $sec) = explode(' ', microtime());
return $sec + $usec * 1000000;
}
public function UniqueRandNum($min, $max, $quantity) {
$numbers = range($min, $max);
shuffle($numbers);
return array_slice($numbers, 0, $quantity);
}
public function createData() {
$crypt = new Crypt();
$transaction = $this->connection->startTransaction();
try {
//insert demo records in entity: gel_student
$entity_manager = \Drupal::entityTypeManager();
$geluserid = \Drupal::currentUser()->id();
//$geluserid = 25;
$schoolIdsList = array();
$sCon = $this->connection->select('gel_school', 'eSchool')
->fields('eSchool', array('name', 'registry_no', 'unit_type_id','edu_admin_id'))
//περιοχή Γ' Αθήνας'
->condition('eSchool.edu_admin_id', 9, '=');
//
//->condition('eSchool.unit_type_id', 3, '=');
$gelSchools = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($gelSchools as $gelSchool) {
array_push($schoolIdsList, $gelSchool->id);
}
for ($i = 1; $i <= 5000; $i++) {
$curclass = rand(1,7);
$lastclass = rand(1,4);
$am = rand(1,100000);
$myschool_id = rand(1,100000);
$lastschool_id = rand(0, sizeof($schoolIdsList));
$lastschool_schoolname = $gelSchools[$lastschool_id]->name;
$lastschool_unittypeid = $gelSchools[$lastschool_id]->unit_type_id;
$lastschool_registrynumber = $gelSchools[$lastschool_id]->registry_no;
//$lastschool_schoolname = "8ο ΗΜΕΡΗΣΙΟ ΓΥΜΝΑΣΙΟ ΙΛΙΟΥ";
//$lastschool_unittypeid = 3;
//$lastschool_registrynumber = "0501067";
$student = array(
'gel_userid' => $geluserid,
'am' => $crypt->encrypt(strval($am)),
'myschool_id' =>$myschool_id,
'name' => $crypt->encrypt("όνομα" . $i),
'studentsurname' => $crypt->encrypt("επώνυμο" . $i),
'birthdate' => '01/01/1970',
'fatherfirstname' => $crypt->encrypt("όνομα_πατέρα" . $i),
'motherfirstname' => $crypt->encrypt("όνομα_μητέρας" . $i),
'regionaddress' => $crypt->encrypt("διεύθυνση" . $i),
'regionarea' => $crypt->encrypt("περιοχή" . $i),
'regiontk' => $crypt->encrypt("ΤΚ" . $i),
'nextclass' => $curclass,
'relationtostudent' => 'Γονέα/Κηδεμόνα',
'telnum' => $crypt->encrypt('6944123456'),
'guardian_name' => $crypt->encrypt('όνομα_κηδεμόνα'),
'guardian_surname' => $crypt->encrypt('επώνυμο_κηδεμόνα'),
'guardian_fathername' => $crypt->encrypt('όνομα_πατέρα_κηδεμόνα'),
'guardian_mothername' => $crypt->encrypt('όνομα_μητέρας_κηδεμόνα'),
'lastschool_class' => $lastclass,
'lastschool_schoolyear' => "2017-2018",
'lastschool_schoolname' => $lastschool_schoolname,
'lastschool_unittypeid' => $lastschool_unittypeid,
'lastschool_registrynumber' => $lastschool_registrynumber,
'agreement' => 1,
'myschool_currentsection' => "ΟΝΟΜΑ ΤΟΜΕΑ / ΟΜΑΔΑΣ ΠΡΟΣΑΝΑΤΟΛΙΣΜΟΥ"
);
$entity_storage_student = $entity_manager->getStorage('gel_student');
$entity_object = $entity_storage_student->create($student);
$entity_storage_student->save($entity_object);
//insert records in entity: gel_student_choices
//...
$created_student_id = $entity_object->id();
//$entity_storage_student->resetCache();
if ($curclass === 3 || $curclass === 7 || $curclass === 2 || $curclass === 6 ) {
$choice_id_OP = 0;
if ($curclass === 3 || $curclass === 7 )
$choice_id_OP = rand(15,17);
else if ($curclass === 2 || $curclass === 6)
$choice_id_OP = rand(15,16);
$studentChoicesOP = array(
'name' => '',
'student_id' =>$created_student_id,
'choice_id' => strval($choice_id_OP),
);
$entity_storage_choice = $entity_manager->getStorage('gel_student_choices');
$entity_object = $entity_storage_choice->create($studentChoicesOP);
$entity_storage_choice->save($entity_object);
}
else if ($curclass === 1 || $curclass === 4 || $curclass === 3 ) {
//$choice_id_EPIL;
if ($curclass === 1 || $curclass === 4)
//$choice_id_EPIL = rand(4,7);
$choice_id_EPIL = $this->UniqueRandNum(4,7,2);
else if ($curclass === 3)
//$choice_id_EPIL = rand(8,13);
$choice_id_EPIL = $this->UniqueRandNum(8,13,2);
for ($j=1; $j <= 2; $j++) {
$studentChoicesEPIL = array(
'name' => '',
'student_id' =>$created_student_id,
'choice_id' => strval($choice_id_EPIL[$j-1]),
'order_id' => $j,
);
$entity_storage_choice = $entity_manager->getStorage('gel_student_choices');
$entity_object = $entity_storage_choice->create($studentChoicesEPIL);
$entity_storage_choice->save($entity_object);
} //end for
} //end if
} //end for
} //end try
catch (\Exception $e) {
$this->logger->warning($e->getMessage());
$returnmsg = "Αποτυχία καταχώρησης demo data!";
$response = new JsonResponse([$returnmsg]);
// $transaction->rollback();
return $response;
}
$response = new JsonResponse(['hello' => 'world']);
$response->headers->set('X-AUTH-TOKEN', 'HELLOTOKEN');
return $response;
}
}
......@@ -488,20 +488,15 @@ class GelSubmittedApplications extends ControllerBase
$schoolTel = $gelStudent->phone_number;
//$this->logger->warning("Trace.." . $gelStudent->myschool_promoted . " " . $gelStudent->second_period . " " . $gelStudent->changed . " " . $dateStartInt);
//new piece of code concerning to enable / disable edit functionality
//$this->logger->warning("Trace2.." . $gelStudent->changed . " " . $dateStartInt );
$canedit = '0';
if ( $applicantsAppModifyDisabled == "0"
&& $eggrafesConfig->activate_second_period->value == $gelStudent->second_period
/*&& $gelStudent->changed >= $dateStartInt*/
)
$canedit = '1';
//end new piece
if ($applicantsResultsDisabled === "0" && ($gelStudent->myschool_promoted === "1" || $gelStudent->myschool_promoted === "2")) {
//new piece of code
// περιττό (?), στη Β' περίοδο οι αιτήσεις λογικά δεν έχουν ενημερωμένο το myschool_promoted ?
if ($gelStudent->second_period === "1" && $gelStudent->changed >= $dateStartInt)
//η αίτηση είναι της β' περιόδου με ημερομηνία μεταγενέστερη της ημερομηνίας έναρξης β' περιόδου
......@@ -552,6 +547,7 @@ class GelSubmittedApplications extends ControllerBase
else
$status = "0";
if ($gelStudent->changed != 1529867143)
$appchanged = $gelStudent->changed;
else
......
......@@ -194,12 +194,14 @@ class PDFCreator extends ControllerBase {
else
$this->pdf->MultiCell(0, 8, $this->prepareString('με αριθμό δήλωσης: ' . $student->id->value . ' / ' . date('d-m-y (ώρα: H:i:s)', $student->created->value)), 0, 'C');
/*
$this->pdf->SetFont($this->fontLight, '', 11);
//if ($this->applicantsResultsDisabled === "1")
if ($status === "0" || $status === "2" || $status === "3" || $status === "5" || $status === "6" || $status === "7" || $status === "8")
$this->pdf->MultiCell(0, 8, $this->prepareString('(Αρχική)'), 0, 'R');
else if ($status === "1" || $status === "4" )
$this->pdf->MultiCell(0, 8, $this->prepareString('(Οριστική)'), 0, 'R');
*/
$this->pdf->Ln();
......
This diff is collapsed.
......@@ -59,11 +59,17 @@ import { GelStudentDataFieldsActions } from "../actions/gelstudentdatafields.act
</p>
-->
<!--
<p style = "font-size:1.0em">
<strong>Ενημέρωση: </strong>
Μπορείτε να ενημερωθείτε μέσω της εφαρμογής για το αποτέλεσμα της δήλωσης προτίμησής σας χωρίς δυνατότητα τροποποίησης.
Από <strong>25/6/2018 έως και 29/6/2018 (ώρα 14:00)</strong> για όσους απορρίφθηκαν ή δεν έχουν υποβάλει Ηλεκτρονική Αίτηση εγγραφής για λόγους ανωτέρας βίας, θα υπάρχει δυνατότητα υποβολής Ηλεκτρονικής Αίτησης εγγραφής-Δήλωσης προτίμησης για τα ΓΕ.Λ. και ΕΠΑ.Λ. μέσω της εφαρμογής.
</p>
-->
<p style = "font-size:1.0em">
<strong>Ενημέρωση: </strong>
Ευχαριστούμε για τη συνεργασία.
Από <strong>22/6/2018 έως και 29/6/2018</strong> θα μπορείτε να ενημερωθείτε μέσω της εφαρμογής για το αποτέλεσμα της δήλωσης προτίμησής σας χωρίς δυνατότητα τροποποίησης.
Από <strong>25/6/2018 έως και 29/6/2018</strong> για όσους απορρίφθηκαν ή δεν έχουν υποβάλει Ηλεκτρονική Αίτηση εγγραφής για λόγους ανωτέρας βίας, θα υπάρχει δυνατότητα υποβολής Ηλεκτρονικής Αίτησης εγγραφής-Δήλωσης προτίμησης για τα ΓΕ.Λ. και ΕΠΑ.Λ. μέσω της εφαρμογής.
Ευχαριστούμε για τη συνεργασία. Θα μπορείτε να ενημερωθείτε για το αποτέλεσμα της κατανομής της αίτησής σας από τις
<strong>02/07 (για τα ΕΠΑ.Λ.)</strong> και από τις <strong>04/07 (για τα ΓΕ.Λ.)</strong> και να εκτυπώσετε την αίτησή σας μέσω της εφαρμογής e-eggrafes.
</p>
......
......@@ -74,15 +74,15 @@ import { IAppState } from "../../store/store";
<div class="col-md-6">
<button type="submit" class="btn btn-lg btn-block" *ngIf="(loginInfo$ | async).size !== 0" (click)="goToSecondPeriod()" >
Μετάπτωση Αιτήσεων σε Β' περίδο<span class="glyphicon glyphicon-menu-right"></span>
Μετάπτωση Αιτήσεων σε Β' περίοδο<span class="glyphicon glyphicon-menu-right"></span>
</button>
</div>
<br>
<div class="col-md-6">
<button type="submit" class="btn btn-lg btn-block"
<button type="submit" class="btn btn-lg btn-block"
*ngIf="(loginInfo$ | async).size !== 0" (click)="InitializeBPeriod()" >
Initialization Β Περιόδου <span class="glyphicon glyphicon-menu-right"></span>
Αρχικοποίηση Διαχειριστικού Β' περιόδου <span class="glyphicon glyphicon-menu-right"></span>
</button>
</div>
<br>
......@@ -296,6 +296,3 @@ import { IAppState } from "../../store/store";
}
//}
......@@ -44,7 +44,7 @@
</div>
<div *ngIf="(loginInfo$ | async).size > 0 " class="nav-item" >
<li *ngIf="(authRole=='director_gel') || (authRole=='director_gymlt')" class="nav-item">
<li *ngIf="(authRole=='director_gel') " class="nav-item">
<a class="nav-link" [routerLink]="['/school/directorgel-reports']" [routerLinkActive]="['active']"><b>Αναφορές</b></a>
</li>
</div>
......
......@@ -209,6 +209,7 @@ import { StudentCourseChosen, StudentEpalChosen, StudentSectorChosen } from "../
private birtdateFormView: BehaviorSubject<string>;
private father1: string;
private father2:string;
private bypassGuardianVer: number;
constructor(
private _hds: HelperDataService,
......@@ -253,6 +254,8 @@ import { StudentCourseChosen, StudentEpalChosen, StudentSectorChosen } from "../
this.birtdateFormView = new BehaviorSubject("");
this.bypassGuardianVer = 0;
//this.wsIdentSub = this._hds.isWS_ident_enabled().subscribe(z => {
// this.wsEnabled.next(Number(z.res)) ;
//});
......@@ -271,6 +274,10 @@ import { StudentCourseChosen, StudentEpalChosen, StudentSectorChosen } from "../
this.epalUserDataSub = this._hds.getApplicantUserData().subscribe(x => {
if ( Number(x.numAppSelf) > 0 && Number(x.numAppChildren) >= Number(x.numChildren))
this.hasright = 0;
if (Number(x.verificationCodeVerified) == 1)
this.bypassGuardianVer = 1;
});
this.loginInfoSub = this._ngRedux.select("loginInfo")
......@@ -554,7 +561,7 @@ import { StudentCourseChosen, StudentEpalChosen, StudentSectorChosen } from "../
}
if (this.guardianEnabled.getValue() === 1 && (aitisiObj[0].websrv_cu_surname === null || aitisiObj[0].websrv_cu_surname === "") ) {
if (this.bypassGuardianVer === 0 && this.guardianEnabled.getValue() === 1 && (aitisiObj[0].websrv_cu_surname === null || aitisiObj[0].websrv_cu_surname === "") ) {
let mTitle = "Αποτυχία Ταυτοποίησης Κηδεμόνα";
let mText = "Δεν έχει δηλωθεί Κηδεμόνας στο Πληροφοριακό Σύστημα του Σχολείου. " +
"Παρακαλείστε να επικοινωνήσετε με το σχολείο όπου φοιτά τώρα το παιδί για να επιβεβαιώσετε ότι το ονοματεπώνυμο του κηδεμόνα έχει καταχωρηθεί στο Πληροφοριακό Σύστημα του Σχολείου (myschοol) όπως είναι καταχωρημένο στην εφορία. " +
......@@ -570,7 +577,7 @@ import { StudentCourseChosen, StudentEpalChosen, StudentSectorChosen } from "../
return;
}
if (this.guardianEnabled.getValue() === 1 && aitisiObj[0].websrv_cu_surname.replace(/ |-/g, "") !== aitisiObj[0].cu_surname.replace(/ |-/g, "")) {
if (this.bypassGuardianVer === 0 && this.guardianEnabled.getValue() === 1 && aitisiObj[0].websrv_cu_surname.replace(/ |-/g, "") !== aitisiObj[0].cu_surname.replace(/ |-/g, "")) {
this.father1 = aitisiObj[0].websrv_cu_surname.replace(/ |-/g, "");
this.father2 = aitisiObj[0].cu_surname.replace(/ |-/g, "");
......
......@@ -223,8 +223,9 @@ import { StudentGelCourseChosen } from "../students/student";
//private guardianIdentSub: Subscription;
private guardianEnabled: BehaviorSubject<number>;
private birtdateFormView: BehaviorSubject<string>;
private father1: string;
private father1: string;
private father2:string;
private bypassGuardianVer: number;
constructor(
private _hds: HelperDataService,
......@@ -262,6 +263,8 @@ import { StudentGelCourseChosen } from "../students/student";
this.hasright = 1;
this.limitSchoolYear = "2013-2014";
this.bypassGuardianVer = 0;
//this.wsIdentSub = this._hds.isWS_ident_enabled().subscribe(z => {
// this.wsEnabled.next(Number(z.res)) ;
//});
......@@ -276,8 +279,13 @@ import { StudentGelCourseChosen } from "../students/student";
this.gelUserDataSub = this._hds.getApplicantUserData().subscribe(x => {
if ( Number(x.numAppSelf) > 0 && Number(x.numAppChildren) >= Number(x.numChildren))
this.hasright = 0;
if (Number(x.verificationCodeVerified) == 1)
this.bypassGuardianVer = 1;
});
//this.guardianIdentSub = this._hds.isGuardian_ident_enabled().subscribe(w => {
// this.guardianEnabled.next(Number(w.res)) ;
//});
......@@ -549,7 +557,7 @@ import { StudentGelCourseChosen } from "../students/student";
return;
}
if (this.guardianEnabled.getValue() === 1 && (aitisiObj[0].websrv_cu_surname === null || aitisiObj[0].websrv_cu_surname === "")) {
if (this.bypassGuardianVer === 0 && this.guardianEnabled.getValue() === 1 && (aitisiObj[0].websrv_cu_surname === null || aitisiObj[0].websrv_cu_surname === "")) {
let mTitle = "Αποτυχία Ταυτοποίησης Κηδεμόνα";
let mText = "Δεν έχει δηλωθεί Κηδεμόνας στο Πληροφοριακό Σύστημα του Σχολείου. " +
"Παρακαλείστε να επικοινωνήσετε με το σχολείο όπου φοιτά τώρα το παιδί για να επιβεβαιώσετε ότι το ονοματεπώνυμο του κηδεμόνα έχει καταχωρηθεί στο Πληροφοριακό Σύστημα του Σχολείου (myschοol) όπως είναι καταχωρημένο στην εφορία. " +
......@@ -565,7 +573,7 @@ import { StudentGelCourseChosen } from "../students/student";
return;
}
if (this.guardianEnabled.getValue() === 1 && aitisiObj[0].websrv_cu_surname.replace(/ |-/g, "") !== aitisiObj[0].cu_surname.replace(/ |-/g, "")) {
if (this.bypassGuardianVer === 0 && this.guardianEnabled.getValue() === 1 && aitisiObj[0].websrv_cu_surname.replace(/ |-/g, "") !== aitisiObj[0].cu_surname.replace(/ |-/g, "")) {
this.father1 = aitisiObj[0].websrv_cu_surname.replace(/ |-/g, "");
this.father2 = aitisiObj[0].cu_surname.replace(/ |-/g, "");
......
......@@ -33,8 +33,8 @@ export default class Main {
//make storeEnhancers = [] in order for PRODUCTION MODE
const storeEnhancers =
_devTools.isEnabled() ?
[ _devTools.enhancer() ] :
//_devTools.isEnabled() ?
//[ _devTools.enhancer() ] :
[];
_ngRedux.configureStore(
......
......@@ -1911,4 +1911,78 @@ deleteApplicationforDirectorGel(appId) {
}
getAllSDEStudents() {
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
let headers = new Headers({
"Content-Type": "application/json",
});
this.createAuthorizationHeader(headers);
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}/gel/sde_all_students` , options)
.map(response => response.json());
}
saveHighScoolSelectionforSDE(studentid, schoolid, undosel){
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
let headers = new Headers({
"Content-Type": "application/json",
});
this.createAuthorizationHeader(headers);
let options = new RequestOptions({ headers: headers });
//if (oldschool == false)
//{
// oldschool = 999999;
//}
return this.http.get(`${AppSettings.API_ENDPOINT}/gel/saveselectionforSDE/`+ studentid + '/'+schoolid + '/' + undosel, options)
.map(response => response.json());
}
getAllIDIWTStudents() {
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
let headers = new Headers({
"Content-Type": "application/json",
});
this.createAuthorizationHeader(headers);
let options = new RequestOptions({ headers: headers });
return this.http.get(`${AppSettings.API_ENDPOINT}/gel/idiwt_all_students` , options)
.map(response => response.json());
}
saveHighScoolSelectionforIDIWT(studentid, schoolid, undosel){
this.loginInfo$.getValue().forEach(loginInfoToken => {
this.authToken = loginInfoToken.auth_token;
this.authRole = loginInfoToken.auth_role;
});
let headers = new Headers({
"Content-Type": "application/json",
});
this.createAuthorizationHeader(headers);
let options = new RequestOptions({ headers: headers });
//if (oldschool == false)
//{
// oldschool = 999999;
//}
return this.http.get(`${AppSettings.API_ENDPOINT}/gel/saveselectionforIDIWT/`+ studentid + '/'+schoolid + '/' + undosel, options)
.map(response => response.json());
}
}