v2.1, updated to Angular5, added applicantUsers entity in oauthost module,...

v2.1, updated to Angular5, added applicantUsers entity in oauthost module, deleted epalUsers entity in epal module, several minor changes
parent 89ef396d
dist/* dist/*
source/app.settings.ts source/app.settings.ts
node_modules/* node_modules/*
!node_modules/zone.js/
!drupal/ !drupal/
drupal/* drupal/*
!drupal/modules/ !drupal/modules/
......
...@@ -18,11 +18,6 @@ entity.epal_student_course_field.add_form: ...@@ -18,11 +18,6 @@ entity.epal_student_course_field.add_form:
title: 'Add Epal student course field' title: 'Add Epal student course field'
appears_on: appears_on:
- entity.epal_student_course_field.collection - entity.epal_student_course_field.collection
entity.epal_users.add_form:
route_name: entity.epal_users.add_form
title: 'Add Epal users'
appears_on:
- entity.epal_users.collection
entity.epal_student_sector_field.add_form: entity.epal_student_sector_field.add_form:
route_name: entity.epal_student_sector_field.add_form route_name: entity.epal_student_sector_field.add_form
title: 'Add Epal student sector field' title: 'Add Epal student sector field'
......
...@@ -55,20 +55,6 @@ epal_student_course_field.admin.structure.settings: ...@@ -55,20 +55,6 @@ epal_student_course_field.admin.structure.settings:
route_name: epal_student_course_field.settings route_name: epal_student_course_field.settings
parent: system.admin_structure parent: system.admin_structure
# Epal users menu items definition
entity.epal_users.collection:
title: 'Epal users list'
route_name: entity.epal_users.collection
description: 'List Epal users entities'
parent: system.admin_structure
weight: 100
epal_users.admin.structure.settings:
title: Epal users settings
description: 'Configure Epal users entities'
route_name: epal_users.settings
parent: system.admin_structure
# Epal student sector field menu items definition # Epal student sector field menu items definition
entity.epal_student_sector_field.collection: entity.epal_student_sector_field.collection:
title: 'Epal student sector field list' title: 'Epal student sector field list'
......
...@@ -86,28 +86,6 @@ entity.epal_student_course_field.delete_form: ...@@ -86,28 +86,6 @@ entity.epal_student_course_field.delete_form:
title: Delete title: Delete
weight: 10 weight: 10
# Epal users routing definition
epal_users.settings_tab:
route_name: epal_users.settings
title: 'Settings'
base_route: epal_users.settings
entity.epal_users.canonical:
route_name: entity.epal_users.canonical
base_route: entity.epal_users.canonical
title: 'View'
entity.epal_users.edit_form:
route_name: entity.epal_users.edit_form
base_route: entity.epal_users.canonical
title: 'Edit'
entity.epal_users.delete_form:
route_name: entity.epal_users.delete_form
base_route: entity.epal_users.canonical
title: Delete
weight: 10
# Epal student sector field routing definition # Epal student sector field routing definition
epal_student_sector_field.settings_tab: epal_student_sector_field.settings_tab:
route_name: epal_student_sector_field.settings route_name: epal_student_sector_field.settings
...@@ -216,4 +194,3 @@ entity.epal_config.delete_form: ...@@ -216,4 +194,3 @@ entity.epal_config.delete_form:
base_route: entity.epal_config.canonical base_route: entity.epal_config.canonical
title: Delete title: Delete
weight: 10 weight: 10
...@@ -86,28 +86,7 @@ view published epal student course field entities: ...@@ -86,28 +86,7 @@ view published epal student course field entities:
view unpublished epal student course field entities: view unpublished epal student course field entities:
title: 'View unpublished Epal student course field entities' title: 'View unpublished Epal student course field entities'
add epal users entities:
title: 'Create new Epal users entities'
administer epal users entities:
title: 'Administer Epal users entities'
description: 'Allow to access the administration form to configure Epal users entities.'
restrict access: true
delete epal users entities:
title: 'Delete Epal users entities'
edit epal users entities:
title: 'Edit Epal users entities'
access epal users overview:
title: 'Access the Epal users overview page'
view published epal users entities:
title: 'View published Epal users entities'
view unpublished epal users entities:
title: 'View unpublished Epal users entities'
add epal student sector field entities: add epal student sector field entities:
title: 'Create new Epal student sector field entities' title: 'Create new Epal student sector field entities'
......
...@@ -167,7 +167,7 @@ class ApplicationSubmit extends ControllerBase ...@@ -167,7 +167,7 @@ class ApplicationSubmit extends ControllerBase
try { try {
//insert records in entity: epal_student //insert records in entity: epal_student
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if (!$epalUser) { if (!$epalUser) {
return $this->respondWithStatus([ return $this->respondWithStatus([
...@@ -179,17 +179,6 @@ class ApplicationSubmit extends ControllerBase ...@@ -179,17 +179,6 @@ class ApplicationSubmit extends ControllerBase
$student = array( $student = array(
'langcode' => 'el', 'langcode' => 'el',
'student_record_id' => 0,
'sex' => 0,
'fathersurname' => '',
'mothersurname' => '',
'studentamka' => '',
'lastam' => '',
'graduate_school' => 0,
'apolytirio_id' => '',
'currentsector' => '',
'currentcourse' => '',
'points' => 0,
'user_id' => $epalUser->user_id->target_id, 'user_id' => $epalUser->user_id->target_id,
'epaluser_id' => $epalUser->id(), 'epaluser_id' => $epalUser->id(),
'name' => $name_encoded, 'name' => $name_encoded,
...@@ -200,8 +189,6 @@ class ApplicationSubmit extends ControllerBase ...@@ -200,8 +189,6 @@ class ApplicationSubmit extends ControllerBase
'regionaddress' => $regionaddress_encoded, 'regionaddress' => $regionaddress_encoded,
'regionarea' => $regionarea_encoded, 'regionarea' => $regionarea_encoded,
'regiontk' => $regiontk_encoded, 'regiontk' => $regiontk_encoded,
// 'certificatetype' => $certificatetype_encoded,
// 'graduation_year' => $applicationForm[0]['graduation_year'],
'lastschool_registrynumber' => $applicationForm[0]['lastschool_registrynumber'], 'lastschool_registrynumber' => $applicationForm[0]['lastschool_registrynumber'],
'lastschool_unittypeid' => $applicationForm[0]['lastschool_unittypeid'], 'lastschool_unittypeid' => $applicationForm[0]['lastschool_unittypeid'],
'lastschool_schoolname' => $applicationForm[0]['lastschool_schoolname'], 'lastschool_schoolname' => $applicationForm[0]['lastschool_schoolname'],
...@@ -214,7 +201,6 @@ class ApplicationSubmit extends ControllerBase ...@@ -214,7 +201,6 @@ class ApplicationSubmit extends ControllerBase
'guardian_mothername' => $guardian_mothername_encoded, 'guardian_mothername' => $guardian_mothername_encoded,
'agreement' => $applicationForm[0]['disclaimer_checked'], 'agreement' => $applicationForm[0]['disclaimer_checked'],
'hasright' => $applicationForm[0]['hasright'], 'hasright' => $applicationForm[0]['hasright'],
//'relationtostudent' => $relationtostudent_encoded,
'relationtostudent' => $relationtostudent, 'relationtostudent' => $relationtostudent,
'telnum' => $telnum_encoded, 'telnum' => $telnum_encoded,
'second_period' => $second_period, 'second_period' => $second_period,
...@@ -421,7 +407,7 @@ class ApplicationSubmit extends ControllerBase ...@@ -421,7 +407,7 @@ class ApplicationSubmit extends ControllerBase
try { try {
//insert records in entity: epal_student //insert records in entity: epal_student
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if (!$epalUser) { if (!$epalUser) {
return $this->respondWithStatus([ return $this->respondWithStatus([
...@@ -432,17 +418,6 @@ class ApplicationSubmit extends ControllerBase ...@@ -432,17 +418,6 @@ class ApplicationSubmit extends ControllerBase
//$second_period = $epalConfig->activate_second_period->value; //$second_period = $epalConfig->activate_second_period->value;
$student = array( $student = array(
'langcode' => 'el', 'langcode' => 'el',
'student_record_id' => 0,
'sex' => 0,
'fathersurname' => '',
'mothersurname' => '',
'studentamka' => '',
'lastam' => '',
'graduate_school' => 0,
'apolytirio_id' => '',
'currentsector' => '',
'currentcourse' => '',
'points' => 0,
'user_id' => $epalUser->user_id->target_id, 'user_id' => $epalUser->user_id->target_id,
'epaluser_id' => $epalUser->id(), 'epaluser_id' => $epalUser->id(),
'name' => $name_encoded, 'name' => $name_encoded,
...@@ -453,8 +428,6 @@ class ApplicationSubmit extends ControllerBase ...@@ -453,8 +428,6 @@ class ApplicationSubmit extends ControllerBase
'regionaddress' => $regionaddress_encoded, 'regionaddress' => $regionaddress_encoded,
'regionarea' => $regionarea_encoded, 'regionarea' => $regionarea_encoded,
'regiontk' => $regiontk_encoded, 'regiontk' => $regiontk_encoded,
// 'certificatetype' => $certificatetype_encoded,
// 'graduation_year' => $applicationForm[0]['graduation_year'],
'lastschool_registrynumber' => $applicationForm[0]['lastschool_registrynumber'], 'lastschool_registrynumber' => $applicationForm[0]['lastschool_registrynumber'],
'lastschool_unittypeid' => $applicationForm[0]['lastschool_unittypeid'], 'lastschool_unittypeid' => $applicationForm[0]['lastschool_unittypeid'],
'lastschool_schoolname' => $applicationForm[0]['lastschool_schoolname'], 'lastschool_schoolname' => $applicationForm[0]['lastschool_schoolname'],
...@@ -466,7 +439,6 @@ class ApplicationSubmit extends ControllerBase ...@@ -466,7 +439,6 @@ class ApplicationSubmit extends ControllerBase
'guardian_fathername' => $guardian_fathername_encoded, 'guardian_fathername' => $guardian_fathername_encoded,
'guardian_mothername' => $guardian_mothername_encoded, 'guardian_mothername' => $guardian_mothername_encoded,
'agreement' => $applicationForm[0]['disclaimer_checked'], 'agreement' => $applicationForm[0]['disclaimer_checked'],
//'relationtostudent' => $relationtostudent_encoded,
'relationtostudent' => $relationtostudent, 'relationtostudent' => $relationtostudent,
'telnum' => $telnum_encoded, 'telnum' => $telnum_encoded,
'second_period' => $epalConfig->activate_second_period->value, 'second_period' => $epalConfig->activate_second_period->value,
......
...@@ -84,7 +84,7 @@ class CurrentUser extends ControllerBase ...@@ -84,7 +84,7 @@ class CurrentUser extends ControllerBase
} }
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
...@@ -145,7 +145,7 @@ class CurrentUser extends ControllerBase ...@@ -145,7 +145,7 @@ class CurrentUser extends ControllerBase
{ {
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
$user = $this->entityTypeManager->getStorage('user')->load($epalUser->user_id->target_id); $user = $this->entityTypeManager->getStorage('user')->load($epalUser->user_id->target_id);
...@@ -232,7 +232,7 @@ class CurrentUser extends ControllerBase ...@@ -232,7 +232,7 @@ class CurrentUser extends ControllerBase
$trx = $this->connection->startTransaction(); $trx = $this->connection->startTransaction();
try { try {
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
$user = $this->entityTypeManager->getStorage('user')->load($epalUser->user_id->target_id); $user = $this->entityTypeManager->getStorage('user')->load($epalUser->user_id->target_id);
...@@ -309,7 +309,7 @@ class CurrentUser extends ControllerBase ...@@ -309,7 +309,7 @@ class CurrentUser extends ControllerBase
} }
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
...@@ -355,14 +355,19 @@ class CurrentUser extends ControllerBase ...@@ -355,14 +355,19 @@ class CurrentUser extends ControllerBase
} }
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
$postData = null; $postData = null;
if ($content = $request->getContent()) { if ($content = $request->getContent()) {
$postData = json_decode($content); $postData = json_decode($content);
/*
if (isset($postData->userProfile->representRole))
$representRole = $postData->userProfile->representRole;
if (isset($postData->userProfile->userChildren))
$userChildren = $postData->userProfile->userChildren;
*/
$representRole = $postData->userProfile->representRole;
//validate representRole //validate representRole
/* /*
if ( $epalUser->name->value !== "" && intval($epalUser->representative->value) !== $representRole ) if ( $epalUser->name->value !== "" && intval($epalUser->representative->value) !== $representRole )
...@@ -396,9 +401,16 @@ class CurrentUser extends ControllerBase ...@@ -396,9 +401,16 @@ class CurrentUser extends ControllerBase
$epalUser->set('surname', $surname_encoded); $epalUser->set('surname', $surname_encoded);
$epalUser->set('mothername', $fathername_encoded); $epalUser->set('mothername', $fathername_encoded);
$epalUser->set('fathername', $mothername_encoded); $epalUser->set('fathername', $mothername_encoded);
$epalUser->set('representative', $representRole);
if ($representRole) $representRole = "0";
if (isset($postData->userProfile->representRole)) {
$representRole = $postData->userProfile->representRole;
$epalUser->set('representative', $representRole);
}
if ($representRole === "1")
$epalUser->set('numchildren', self::CHILDREN_LIMIT); $epalUser->set('numchildren', self::CHILDREN_LIMIT);
else if (isset($postData->userProfile->userChildren))
$epalUser->set('numchildren', $postData->userProfile->userChildren);
$epalUser->save(); $epalUser->save();
$user = $this->entityTypeManager->getStorage('user')->load($epalUser->user_id->target_id); $user = $this->entityTypeManager->getStorage('user')->load($epalUser->user_id->target_id);
......
...@@ -138,8 +138,6 @@ class DirectorView extends ControllerBase ...@@ -138,8 +138,6 @@ class DirectorView extends ControllerBase
$regionaddress_decoded = $crypt->decrypt($epalStudent->regionaddress->value); $regionaddress_decoded = $crypt->decrypt($epalStudent->regionaddress->value);
$regiontk_decoded = $crypt->decrypt($epalStudent->regiontk->value); $regiontk_decoded = $crypt->decrypt($epalStudent->regiontk->value);
$regionarea_decoded = $crypt->decrypt($epalStudent->regionarea->value); $regionarea_decoded = $crypt->decrypt($epalStudent->regionarea->value);
// $certificatetype_decoded = $crypt->decrypt($epalStudent->certificatetype->value); // obsolete
//$relationtostudent_decoded = $crypt->decrypt($epalStudent->relationtostudent->value);
$telnum_decoded = $crypt->decrypt($epalStudent->telnum->value); $telnum_decoded = $crypt->decrypt($epalStudent->telnum->value);
$guardian_name_decoded = $crypt->decrypt($epalStudent->guardian_name->value); $guardian_name_decoded = $crypt->decrypt($epalStudent->guardian_name->value);
$guardian_surname_decoded = $crypt->decrypt($epalStudent->guardian_surname->value); $guardian_surname_decoded = $crypt->decrypt($epalStudent->guardian_surname->value);
...@@ -171,8 +169,7 @@ class DirectorView extends ControllerBase ...@@ -171,8 +169,7 @@ class DirectorView extends ControllerBase
'regionaddress' => $regionaddress_decoded, 'regionaddress' => $regionaddress_decoded,
'regiontk' => $regiontk_decoded, 'regiontk' => $regiontk_decoded,
'regionarea' => $regionarea_decoded, 'regionarea' => $regionarea_decoded,
'certificatetype' => '', // $certificatetype_decoded, // obsolete //'graduation_year' => $epalStudent->graduation_year->value,
'graduation_year' => $epalStudent->graduation_year->value,
'telnum' => $telnum_decoded, 'telnum' => $telnum_decoded,
'relationtostudent' => $relationtostudent_decoded, 'relationtostudent' => $relationtostudent_decoded,
//'birthdate' => substr($epalStudent->birthdate->value, 8, 10) . '/' . substr($epalStudent->birthdate->value, 6, 8) . '/' . substr($epalStudent->birthdate->value, 0, 4), //'birthdate' => substr($epalStudent->birthdate->value, 8, 10) . '/' . substr($epalStudent->birthdate->value, 6, 8) . '/' . substr($epalStudent->birthdate->value, 0, 4),
...@@ -958,7 +955,7 @@ class DirectorView extends ControllerBase ...@@ -958,7 +955,7 @@ class DirectorView extends ControllerBase
} }
} }
private function respondWithStatus($arr, $s) private function respondWithStatus($arr, $s)
......
...@@ -95,7 +95,7 @@ class InformUnlocatedStudents extends ControllerBase { ...@@ -95,7 +95,7 @@ class InformUnlocatedStudents extends ControllerBase {
$sCon->fields('eStudentClass', array('student_id')) $sCon->fields('eStudentClass', array('student_id'))
->fields('eStudent', array('id', 'user_id', 'created')) ->fields('eStudent', array('id', 'user_id', 'created'))
->isNull('eStudentClass.student_id'); ->isNull('eStudentClass.student_id');
$sCon->join('epal_users', 'eUsers', 'eUsers.user_id = eStudent.user_id'); $sCon->join('applicant_users', 'eUsers', 'eUsers.user_id = eStudent.user_id');
$sCon->join('users_field_data', 'users', 'users.uid = eUsers.user_id'); $sCon->join('users_field_data', 'users', 'users.uid = eUsers.user_id');
$sCon->fields('users', array('mail', 'preferred_langcode')); $sCon->fields('users', array('mail', 'preferred_langcode'));
$epalNonLocatedStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ); $epalNonLocatedStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
...@@ -167,7 +167,7 @@ class InformUnlocatedStudents extends ControllerBase { ...@@ -167,7 +167,7 @@ class InformUnlocatedStudents extends ControllerBase {
} }
$sCon->fields('eStudent', array('id', 'user_id', 'created')); $sCon->fields('eStudent', array('id', 'user_id', 'created'));
$sCon->join('epal_users', 'eUsers', 'eUsers.user_id = eStudent.user_id'); $sCon->join('applicant_users', 'eUsers', 'eUsers.user_id = eStudent.user_id');
$sCon->join('users_field_data', 'users', 'users.uid = eUsers.user_id'); $sCon->join('users_field_data', 'users', 'users.uid = eUsers.user_id');
$sCon->fields('users', array('mail', 'preferred_langcode')); $sCon->fields('users', array('mail', 'preferred_langcode'));
$sCon->join('eepal_school_field_data', 'eSchool', 'eSchool.id = eStudentClass.user_id'); $sCon->join('eepal_school_field_data', 'eSchool', 'eSchool.id = eStudentClass.user_id');
...@@ -255,7 +255,7 @@ class InformUnlocatedStudents extends ControllerBase { ...@@ -255,7 +255,7 @@ class InformUnlocatedStudents extends ControllerBase {
$sCon->join('epal_student', 'eStudent', 'eStudent.id = eStudentClass.student_id'); $sCon->join('epal_student', 'eStudent', 'eStudent.id = eStudentClass.student_id');
} }
$sCon->fields('eStudent', array('id', 'user_id', 'created')); $sCon->fields('eStudent', array('id', 'user_id', 'created'));
$sCon->join('epal_users', 'eUsers', 'eUsers.user_id = eStudent.user_id'); $sCon->join('applicant_users', 'eUsers', 'eUsers.user_id = eStudent.user_id');
$sCon->join('users_field_data', 'users', 'users.uid = eUsers.user_id'); $sCon->join('users_field_data', 'users', 'users.uid = eUsers.user_id');
$sCon->fields('users', array('mail', 'preferred_langcode')); $sCon->fields('users', array('mail', 'preferred_langcode'));
$sCon->join('eepal_school_field_data', 'eSchool', 'eSchool.id = eStudentClass.user_id'); $sCon->join('eepal_school_field_data', 'eSchool', 'eSchool.id = eStudentClass.user_id');
......
...@@ -92,7 +92,7 @@ class PDFCreator extends ControllerBase { ...@@ -92,7 +92,7 @@ class PDFCreator extends ControllerBase {
//Epal-user validation //Epal-user validation
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
$userid = $epalUser->id(); $userid = $epalUser->id();
...@@ -317,8 +317,6 @@ class PDFCreator extends ControllerBase { ...@@ -317,8 +317,6 @@ class PDFCreator extends ControllerBase {
$studentsurname_decoded = $this->crypt->decrypt($student->studentsurname->value); $studentsurname_decoded = $this->crypt->decrypt($student->studentsurname->value);
$fatherfirstname_decoded = $this->crypt->decrypt($student->fatherfirstname->value); $fatherfirstname_decoded = $this->crypt->decrypt($student->fatherfirstname->value);
$motherfirstname_decoded = $this->crypt->decrypt($student->motherfirstname->value); $motherfirstname_decoded = $this->crypt->decrypt($student->motherfirstname->value);
//$certificatetype_decoded = $this->crypt->decrypt($student->certificatetype->value);
//$relationtostudent_decoded = $this->crypt->decrypt($student->relationtostudent->value);
$telnum_decoded = $this->crypt->decrypt($student->telnum->value); $telnum_decoded = $this->crypt->decrypt($student->telnum->value);
} }
catch (\Exception $e) { catch (\Exception $e) {
...@@ -395,22 +393,6 @@ class PDFCreator extends ControllerBase { ...@@ -395,22 +393,6 @@ class PDFCreator extends ControllerBase {
$this->pdf->Ln(); $this->pdf->Ln();
/*
$this->pdf->SetFont($this->fontLight, '', $this->fontSizeRegular);
$this->pdf->Cell($width+15, $height, $this->prepareString('Τύπος απολυτηρίου:'), 0, 'L');
$this->pdf->SetFont($this->fontBold, '', $this->fontSizeRegular);
$this->pdf->Cell($width, $height, $this->prepareString($certificatetype_decoded), 0, 'L');
$this->pdf->Ln();
*/
/*
$this->pdf->SetFont($this->fontLight, '', $this->fontSizeRegular);
$this->pdf->Cell($width+15, $height, $this->prepareString('Έτος κτήσης απολυτηρίου:'), 0, 'L');
$this->pdf->SetFont($this->fontBold, '', $this->fontSizeRegular);
$this->pdf->Cell($width, $height, $this->prepareString($student->graduation_year->value), 0, 'L');
$this->pdf->Ln();
*/
$this->pdf->SetFont($this->fontLight, '', $this->fontSizeRegular); $this->pdf->SetFont($this->fontLight, '', $this->fontSizeRegular);
$this->pdf->Cell($width+15, $height, $this->prepareString('Σχολείο τελευταίας φοίτησης:'), 0, 'L'); $this->pdf->Cell($width+15, $height, $this->prepareString('Σχολείο τελευταίας φοίτησης:'), 0, 'L');
$this->pdf->SetFont($this->fontBold, '', $this->fontSizeRegular); $this->pdf->SetFont($this->fontBold, '', $this->fontSizeRegular);
......
...@@ -76,7 +76,7 @@ class SubmitedApplications extends ControllerBase ...@@ -76,7 +76,7 @@ class SubmitedApplications extends ControllerBase
"error_code" => 3002 "error_code" => 3002
], Response::HTTP_FORBIDDEN); ], Response::HTTP_FORBIDDEN);
} }
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
$userid = $epalUser->id(); $userid = $epalUser->id();
...@@ -178,7 +178,7 @@ class SubmitedApplications extends ControllerBase ...@@ -178,7 +178,7 @@ class SubmitedApplications extends ControllerBase
], Response::HTTP_FORBIDDEN); ], Response::HTTP_FORBIDDEN);
} }
*/ */
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
$userid = $epalUser->id(); $userid = $epalUser->id();
...@@ -229,7 +229,7 @@ class SubmitedApplications extends ControllerBase ...@@ -229,7 +229,7 @@ class SubmitedApplications extends ControllerBase
public function getSubmittedApplications(Request $request) public function getSubmittedApplications(Request $request)
{ {
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));
$epalUser = reset($epalUsers); $epalUser = reset($epalUsers);
if ($epalUser) { if ($epalUser) {
$userid = $epalUser->id(); $userid = $epalUser->id();
...@@ -305,7 +305,7 @@ class SubmitedApplications extends ControllerBase ...@@ -305,7 +305,7 @@ class SubmitedApplications extends ControllerBase
public function getStudentApplications(Request $request, $studentId) public function getStudentApplications(Request $request, $studentId)
{ {
$authToken = $request->headers->get('PHP_AUTH_USER'); $authToken = $request->headers->get('PHP_AUTH_USER');
$epalUsers = $this->entityTypeManager->getStorage('epal_users')->loadByProperties(array('authtoken' => $authToken)); $epalUsers = $this->entityTypeManager->getStorage('applicant_users')->loadByProperties(array('authtoken' => $authToken));