minor changes

parent 20441e8b
......@@ -468,3 +468,9 @@ epal.svc.transition-bperiod:
_controller: '\Drupal\epal\Controller\WSConsumer::transitionToBPeriod'
requirements:
_user_is_logged_in: 'TRUE'
epal.test:
path: '/epal/encodeddata'
defaults:
_controller: '\Drupal\epal\Controller\CreateEncodedData::createData'
requirements:
_access: 'TRUE'
<?php
/**
* @file
* Contains \Drupal\query_example\Controller\QueryExampleController.
*/
namespace Drupal\epal\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\epal\Crypt;
class CreateEncodedData 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;
//$connection = Database::getConnection();
$this->connection = $connection;
$this->logger = $loggerChannel->get('epal');
}
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 createData() {
$crypt = new Crypt();
/*
print_r("decodedname: " . "<br>");
$name_encoded = $crypt->encrypt("6059");
print_r("Decrypted: " . $name_encoded);
print_r("<br>");
*/
//ΕΠΑΛ
$sCon = $this->connection
->select('epal_student', 'eStudent')
->fields('eStudent', array('id', 'guardian_surname','guardian_name','epaluser_id'))
->condition('eStudent.delapp', 0, '=');
$epalSurnames = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalSurnames as $epalSurname) {
if ($epalSurname->guardian_surname != null)
$str1 = $crypt->decrypt($epalSurname->guardian_surname);
else
$str1 = "EMPTY";
//$str1_n = $crypt->decrypt($epalSurname->guardian_name);
$sCon = $this->connection
->select('applicant_users', 'eApplicant')
->fields('eApplicant', array('surname','name'))
->condition('eApplicant.id', $epalSurname->epaluser_id, '=');
$applicantSurnames = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
$applicantSurname = reset($applicantSurnames);
if ($applicantSurname->surname != null)
$str2 = $crypt->decrypt($applicantSurname->surname);
else
$str2 = "EMPTY";
//$str2_n = $crypt->decrypt($applicantSurname->name);
if ($str1 != $str2
//|| ($str1 == $str2 && $str1_n != $str2_n )
)
{
print_r("id: " . $epalSurname->epaluser_id . " epalSurname: " . $str1 . " applicantName: " . $str2 );
print_r("\r");
}
}
//ΓΕΛ
/*
$sCon = $this->connection
->select('gel_student', 'eStudent')
->fields('eStudent', array('id', 'guardian_surname','guardian_name', 'gel_userid'))
->condition('eStudent.delapp', 0, '=');
$gelSurnames = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($gelSurnames as $gelSurname) {
if ($gelSurname->guardian_surname != null)
$str1 = $crypt->decrypt($gelSurname->guardian_surname);
else
$str1 = "EMPTY";
//$str1_n = $crypt->decrypt($gelSurname->guardian_name);
$sCon = $this->connection
->select('applicant_users', 'eApplicant')
->fields('eApplicant', array('surname','name'))
->condition('eApplicant.id', $gelSurname->gel_userid, '=');
$applicantSurnames = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
$applicantSurname = reset($applicantSurnames);
if ($applicantSurname->surname != null)
$str2 = $crypt->decrypt($applicantSurname->surname);
else
$str2 = "EMPTY";
//$str2_n = $crypt->decrypt($applicantSurname->name);
//if ($str1 != $str2) {
if ( $str1 != $str2
//|| ($str1 == $str2 && $str1_n != $str2_n )
) {
print_r("id: " . $gelSurname->id . " gel_userid: " . $gelSurname->gel_userid . " gelSurname: " . $str1 . " applicantName: " . $str2 );
print_r("\r");
}
}
*/
//ΕΛΕΓΧΟΣ ΕΠΙΒΕΒΑΙΩΣΗΣ
/*
$sCon = $this->connection
->select('gel_student', 'eStudent')
->fields('eStudent', array('id', 'guardian_surname', 'gel_userid'))
->condition('eStudent.delapp', 0, '=');
$gelSurnames = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($gelSurnames as $gelSurname) {
if ($gelSurname->id == 739 || $gelSurname->id == 1000 || $gelSurname->id == 1014 || $gelSurname->id == 2588 || $gelSurname->id == 3379 ||
$gelSurname->id == 6919 || $gelSurname->id == 13884 || $gelSurname->id == 13988 || $gelSurname->id == 14255 || $gelSurname->id == 14482 ||
$gelSurname->id == 19543 || $gelSurname->id == 19691 || $gelSurname->id == 23855 || $gelSurname->id == 25097 || $gelSurname->id == 25196 ||
$gelSurname->id == 25773 || $gelSurname->id == 27097 || $gelSurname->id == 28375 || $gelSurname->id == 32468 || $gelSurname->id == 34116 ||
$gelSurname->id == 38145 || $gelSurname->id == 46005 || $gelSurname->id == 47575 || $gelSurname->id == 50425 || $gelSurname->id == 52831 ||
$gelSurname->id == 52916
) {
$sCon = $this->connection
->select('epal_student', 'eEpalStudent')
->fields('eEpalStudent', array('guardian_surname','epaluser_id'))
->condition('eEpalStudent.id', $gelSurname->id, '=');
$epalSurnames = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalSurnames as $epalSurname) {
$name1 = $crypt->decrypt($gelSurname->guardian_surname);
$name2 = $crypt->decrypt($epalSurname->guardian_surname);
print_r("id: " . $gelSurname->id . " gelGuardianSurname: " . $name1 . " epalGuardianSurname: " . $name2);
print_r("\r");
}
}
}
*/
//για ΔΔΕ ΑΧΑΙΑΣ!
/*
$sCon = $this->connection
->select('gel_school', 'eSchool')
->fields('eSchool', array('registry_no', 'name'))
->condition('eSchool.edu_admin_id', 17, '=');
$epalSchools = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalSchools as $epalSchool) {
$sCon = $this->connection
->select('epal_student', 'eStudent')
->fields('eStudent', array('id', 'am'))
->condition('eStudent.delapp', 0, '=')
->condition('eStudent.lastschool_registrynumber',$epalSchool->registry_no , '=');
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($epalStudents as $epalStudent) {
if ($epalStudent->am != null) {
print_r("Am," . $crypt->decrypt($epalStudent->am) . ",reg_no," . strval($epalSchool->registry_no) . ", schName," . $epalSchool->name );
print_r("<br/>");
}
}
}
*/
print_r("\rΤΕΛΟΣ!");
}
}
......@@ -589,8 +589,10 @@ class SubmitedApplications extends ControllerBase
else if ($applicantsResultsDisabled === "0" && ($es->myschool_promoted === "6" || $es->myschool_promoted === "7") )
$status = "5";
else if ($applicantsResultsDisabled === "0" && $es->myschool_promoted != "1" && $es->myschool_promoted != "2"
&& $es->myschool_promoted != "6" && $es->myschool_promoted != "7")
&& $es->myschool_promoted != "6" && $es->myschool_promoted != "7" && $es->myschool_promoted != "0")
$status = "6";
else if ($applicantsResultsDisabled === "0" && $es->myschool_promoted === "0" )
$status = "7";
else
$status = "0";
......
......@@ -542,8 +542,10 @@ class GelSubmittedApplications extends ControllerBase
else if ($applicantsResultsDisabled === "0" && ($gelStudent->myschool_promoted === "6" || $gelStudent->myschool_promoted === "7") )
$status = "5";
else if ($applicantsResultsDisabled === "0" && $gelStudent->myschool_promoted != "1" && $gelStudent->myschool_promoted != "2"
&& $gelStudent->myschool_promoted != "6" && $gelStudent->myschool_promoted != "7")
&& $gelStudent->myschool_promoted != "6" && $gelStudent->myschool_promoted != "7" && $gelStudent->myschool_promoted != "0")
$status = "6";
else if ($applicantsResultsDisabled === "0" && $gelStudent->myschool_promoted === "0" )
$status = "7";
else
$status = "0";
......
......@@ -56,7 +56,7 @@ import { HelperDataService } from "../../services/helper-data-service";
<!--<p style="margin-top: 20px; line-height: 2em;">Παρακαλούμε επιβεβαιώσετε με Ναι ή Όχι την αίτηση του κάθε μαθητή. </p>-->
<div class="row">
<div class="col-md-10" style="font-weight: bold;"> Τα τμήματα του σχολείου σας.</div>
<div class="col-md-10" style="font-weight: bold;"> Οι τάξεις του σχολείου σας.</div>
<div class="col-md-2" style="font-weight: bold;"> <span class="pull-right" style="text-align: right; padding-right: 2px;">Αριθμός Μαθητών</span></div>
</div>
<div *ngFor="let CoursesPerSchools$ of CoursesPerSchool$ | async; let i=index; let isOdd=odd; let isEven=even" >
......
......@@ -142,6 +142,12 @@ import { IAppState } from "../../store/store";
Σε περίπτωση προαγωγής σας τις αμέσως επόμενες ημέρες θα τοποθετηθείτε σε σχολείο χωρίς καμία δική σας περαιτέρω ενέργεια.<br><br>
</div>
</div>
<div *ngIf = "GelStudentDetails$.status == '7' " >
<div class="col-md-12" style="font-size: 1.0em; color: #a52a2a; font-weight: bold;">
Το αποτέλεσμα της προαγωγής σας δεν έχει καταχωρισθεί στo πληροφοριακό σύστημα του σχολείου (myschool).
Παρακαλώ επικοινωνήστε με τον διευθυντή του σχολείου σας.<br><br>
</div>
</div>
</div>
......@@ -350,6 +356,12 @@ import { IAppState } from "../../store/store";
Σε περίπτωση προαγωγής σας τις αμέσως επόμενες ημέρες θα τοποθετηθείτε σε σχολείο χωρίς καμία δική σας περαιτέρω ενέργεια.<br><br>
</div>
</div>
<div *ngIf = "StudentDetails$.status == '7' " >
<div class="col-md-12" style="font-size: 1.0em; color: #a52a2a; font-weight: bold;">
Το αποτέλεσμα της προαγωγής σας δεν έχει καταχωρισθεί στο πληροφοριακό σύστημα του σχολείου (myschool).
Παρακαλώ επικοινωνήστε με τον διευθυντή του σχολείου σας.<br><br>
</div>
</div>
</div>
......@@ -470,7 +482,7 @@ import { IAppState } from "../../store/store";
ενεργοποίηση Τροποποίησης Αίτησης όταν: δεν υπάρχει αποτέλεσμα κατανομής για αυτήν την αίτηση
ΚΑΙ επιτρέπεται η τροποποίηση αιτήσεων
-->
<div *ngIf = "(StudentDetails$.status == '3' || StudentDetails$.status == '4' || StudentDetails$.status == '5' || StudentDetails$.status == '0') && StudentDetails$.applicantsAppModifyDisabled == '0'" >
<div *ngIf = "(StudentDetails$.status == '3' || StudentDetails$.status == '4' || StudentDetails$.status == '0') && StudentDetails$.applicantsAppModifyDisabled == '0'" >
<button type="button" class="btn-primary btn-lg pull-left isclickable" style="width: 10em;" (click)="editEpalApplication()">
<span style="font-size: 0.9em; font-weight: bold;">Επεξεργασία&nbsp;&nbsp;&nbsp;</span>
</button>
......
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