Commit c0296d05 authored by Χάρης Παπαδόπουλος's avatar Χάρης Παπαδόπουλος
Browse files

Merge branch 'application_form' into 'develop'

Various fixes, new logos

See merge request !163
parents 1471e4a8 3548157a
......@@ -191,7 +191,7 @@ class CASLogin extends ControllerBase
// phpCAS::trace($physicaldeliveryofficename);
// $gsnunitcodedn = $filterAttribute('edupersonorgunitdn:gsnunitcode:extended');
$gsnunitcode = substr($gsnunitcodedn, strpos($gsnunitcodedn, ";") + 1);
// $gsnunitcode = $filterAttribute('edupersonorgunitdn:gsnunitcode');
$gsnunitcode = $filterAttribute('edupersonorgunitdn:gsnunitcode');
phpCAS::trace("$gsnunitcode=");
phpCAS::trace($gsnunitcode);
......@@ -276,6 +276,7 @@ class CASLogin extends ControllerBase
if ($user) {
$user->setPassword($epalToken);
$user->setUsername($epalToken);
$user->set('init', $userAssigned["id"]);
$user->save();
}
......
......@@ -291,18 +291,27 @@ class CurrentUser extends ControllerBase
$epalUser->set('mothername', $postData->userProfile->userMothername);
$epalUser->set('fathername', $postData->userProfile->userFathername);
$epalUser->save();
$user = $this->entityTypeManager->getStorage('user')->load($epalUser->user_id->target_id);
if ($user) {
$user->set('mail', $postData->userProfile->userEmail);
$user->save();
} else {
return $this->respondWithStatus([
'error_code' => '1001',
], Response::HTTP_FORBIDDEN);
}
return $this->respondWithStatus([
'message' => t("profile saved"),
'error_code' => '0',
], Response::HTTP_OK);
} else {
return $this->respondWithStatus([
'message' => t("post with no data"),
'error_code' => '1002',
], Response::HTTP_BAD_REQUEST);
}
} else {
return $this->respondWithStatus([
'message' => t("EPAL user not found"),
'error_code' => '1003',
], Response::HTTP_FORBIDDEN);
}
}
......
......@@ -35,8 +35,8 @@ class DirectorView extends ControllerBase
);
}
public function getStudentPerSchool(Request $request, $classId, $sector, $specialit)
{
try {
......@@ -79,7 +79,7 @@ class DirectorView extends ControllerBase
$userRole = $tmpRole;
}
}
if ($userRole === '')
if ($userRole === '')
{
return $this->respondWithStatus([
'error_code' => 4003,
......@@ -88,7 +88,7 @@ class DirectorView extends ControllerBase
elseif ($userRole === 'epal')
{
$selectIdNew = $selectId;
if ($classId == 1)
if ($classId == 1)
$selectIdNew = -1;
elseif ($classId == 2)
$selectIdNew = $sector;
......@@ -105,7 +105,7 @@ class DirectorView extends ControllerBase
$studentId = intval($object->student_id ->getString());
$epalStudents = $this->entityTypeManager->getStorage('epal_student')->loadByProperties(array('id' => $studentId));
$epalStudent = reset($epalStudents);
if ($epalStudents)
if ($epalStudents)
{
$studentIdNew = $epalStudent->id();
$checkstatus = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('student_id' => $studentIdNew));
......@@ -142,7 +142,7 @@ class DirectorView extends ControllerBase
$guardian_surname_decoded = $crypt->decrypt($epalStudent->guardian_surname->value);
$guardian_fathername_decoded = $crypt->decrypt($epalStudent->guardian_fathername->value);
$guardian_mothername_decoded = $crypt->decrypt($epalStudent->guardian_mothername->value);
} catch (\Exception $e) {
$this->logger->warning(__METHOD__ . ' Decrypt error: ' . $e->getMessage());
return $this->respondWithStatus([
......@@ -193,7 +193,7 @@ class DirectorView extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
}
else
else
{
return $this->respondWithStatus([
'message' => t('User not found!'),
......@@ -278,7 +278,7 @@ class DirectorView extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
}
else
{
......@@ -286,9 +286,9 @@ class DirectorView extends ControllerBase
'message' => t('Student not found'),
], Response::HTTP_FORBIDDEN);
}
}
} else {
return $this->respondWithStatus([
......@@ -433,6 +433,7 @@ class DirectorView extends ControllerBase
$userRole = $tmpRole;
}
}
$this->logger->warning('userRole='.$userRole);
if ($userRole === '') {
return $this->respondWithStatus([
'error_code' => 4003,
......@@ -647,7 +648,7 @@ class DirectorView extends ControllerBase
return true;
}
public function FindCapacityPerSchool(Request $request)
{
$i = 0;
......@@ -687,7 +688,7 @@ class DirectorView extends ControllerBase
$classcapacity = reset($CourseA);
if ($classcapacity) {
$list[] = array(
'class' => 1,
......@@ -696,17 +697,17 @@ class DirectorView extends ControllerBase
'taxi' => 'Ά Λυκείου',
'capacity' => $classcapacity->capacity_class_a->value,
'globalindex' => $i,
);
}
++$i;
$CourseB = $this->entityTypeManager->getStorage('eepal_sectors_in_epal')->loadByProperties(array('epal_id' => $schoolid));
if ($CourseB) {
foreach ($CourseB as $object) {
$sectorid = $object->sector_id->entity->id();
$CapacityPerClass = $this->entityTypeManager->getStorage('eepal_sectors_in_epal')->loadByProperties(array('epal_id' => $schoolid, 'sector_id' => $sectorid));
$classcapacity = reset($CapacityPerClass);
if ($classcapacity) {
......@@ -724,9 +725,9 @@ class DirectorView extends ControllerBase
}
$CourseC = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id' => $schoolid));
if ($CourseC) {
foreach ($CourseC as $object) {
$specialityid = $object->specialty_id->entity->id();
$CapacityPerClass = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id' => $schoolid, 'specialty_id' => $specialityid));
$classcapacity = reset($CapacityPerClass);
......@@ -738,7 +739,7 @@ class DirectorView extends ControllerBase
'taxi' => 'Γ Λυκείου '.$object->specialty_id->entity->get('name')->value,
'capacity' => $classcapacity->capacity_class_specialty->value,
'globalindex' => $i,
);
}
++$i;
......@@ -746,11 +747,11 @@ class DirectorView extends ControllerBase
}
if ($CourseC && $operation_shift != 'ΗΜΕΡΗΣΙΟ') {
foreach ($CourseC as $object) {
$specialityid = $object->specialty_id->entity->id();
$CapacityPerClass = $this->entityTypeManager->getStorage('eepal_specialties_in_epal')->loadByProperties(array('epal_id' => $schoolid, 'specialty_id' => $specialityid));
$classcapacity = reset($CapacityPerClass);
if ($classcapacity) {
......@@ -776,7 +777,7 @@ class DirectorView extends ControllerBase
], Response::HTTP_FORBIDDEN);
}
}
public function FindCoursesPerSchool(Request $request)
{
......@@ -814,7 +815,7 @@ class DirectorView extends ControllerBase
$categ = $school->metathesis_region->value;
$list = array();
$CourseA = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $schoolid));
if ($CourseA) {
$limit_down = $this->entityTypeManager->getStorage('epal_class_limits')->loadByProperties(array('name' => 1, 'category' => $categ));
$limitdown = reset($limit_down);
......@@ -845,8 +846,8 @@ class DirectorView extends ControllerBase
foreach ($CourseB as $object) {
$sectorid = $object->sector_id->entity->id();
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('epal_id' => $schoolid, 'specialization_id' => $sectorid, 'currentclass' => 2));
$list[] = array(
'class' => 2,
'newsector' => $object->sector_id->entity->id(),
......@@ -856,7 +857,7 @@ class DirectorView extends ControllerBase
'limitdown' => $limit,
'size' => sizeof($studentPerSchool),
);
++$i;
}
}
......@@ -868,10 +869,10 @@ class DirectorView extends ControllerBase
$limit = $limitdown->limit_down->value;
}
foreach ($CourseC as $object) {
$specialityid = $object->specialty_id->entity->id();
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('epal_id' => $schoolid, 'specialization_id' => $specialityid, 'currentclass' => 3));
$list[] = array(
'class' => 3,
'newsector' => 0,
......@@ -881,7 +882,7 @@ class DirectorView extends ControllerBase
'limitdown' => $limit,
'size' => sizeof($studentPerSchool),
);
++$i;
}
}
......@@ -893,10 +894,10 @@ class DirectorView extends ControllerBase
$limit = $limitdown->limit_down->value;
}
foreach ($CourseC as $object) {
$specialityid = $object->specialty_id->entity->id();
$studentPerSchool = $this->entityTypeManager->getStorage('epal_student_class')->loadByProperties(array('epal_id' => $schoolid, 'specialization_id' => $specialityid, 'currentclass' => 4));
$list[] = array(
'class' => 4,
'newsector' => 0,
......@@ -907,7 +908,7 @@ class DirectorView extends ControllerBase
'size' => sizeof($studentPerSchool),
);
++$i;
}
}
......
......@@ -226,7 +226,6 @@ class SubmitedApplications extends ControllerBase
$regionaddress_decoded = $crypt->decrypt($object->regionaddress->value);
$regiontk_decoded = $crypt->decrypt($object->regiontk->value);
$regionarea_decoded = $crypt->decrypt($object->regionarea->value);
$certificatetype_decoded = $crypt->decrypt($object->certificatetype->value);
$relationtostudent_decoded = $crypt->decrypt($object->relationtostudent->value);
$telnum_decoded = $crypt->decrypt($object->telnum->value);
$guardian_name_decoded = $crypt->decrypt($object->guardian_name->value);
......@@ -277,8 +276,6 @@ class SubmitedApplications extends ControllerBase
//'regionarea' =>$object -> regionarea ->value,
'regionarea' => $regionarea_decoded,
//'certificatetype' =>$object -> certificatetype ->value,
'certificatetype' => $certificatetype_decoded,
'graduation_year' => $object->graduation_year->value,
//'telnum' =>$object -> telnum ->value,
'telnum' => $telnum_decoded,
//'relationtostudent' =>$object -> relationtostudent ->value,
......
myschool/assets/images/default.png

12.2 KB | W: | H:

myschool/assets/images/default.png

11.6 KB | W: | H:

myschool/assets/images/default.png
myschool/assets/images/default.png
myschool/assets/images/default.png
myschool/assets/images/default.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -19,10 +19,10 @@ import { API_ENDPOINT, API_ENDPOINT_PARAMS } from "../app.settings";
<div [ngSwitch]="errorCode$ | async">
<p class="text-danger" *ngSwitchCase="5001">Προέκυψε σφάλμα κατά την διαδικασία αυθεντικοποίησης σας.</p>
<p class="text-danger" *ngSwitchCase="5002">Πρέπει να συνδεθείτε με λογαριασμό του Πανελλήνιου Σχολικού Δικτύου, για να χρησιμοποιήσετε την εφαρμογή.</p>
<p class="text-danger" *ngSwitchCase="5003">Πρέπει να συνδεθείτε με τον επίσημο λογαριασμό μονάδας στο Πανελλήνιο Σχολικό Δίκτυο, για να χρησιμοποιήσετε την εφαρμογή.</p>
<p class="text-danger" *ngSwitchCase="5003">Πρέπει να συνδεθείτε με τον λογαριασμό που χρησιμοποιείτε για να συνδεθείτε στο Myschool, για να χρησιμοποιήσετε την εφαρμογή.</p>
<p class="text-danger" *ngSwitchCase="5004">Ο ρόλος που αντιστοιχεί στον λογαριασμό σας στο Πανελλήνιο Σχολικό Δίκτυο δεν επιτρέπεται να χρησιμοποιήσετε την εφαρμογή.</p>
<p class="text-danger" *ngSwitchCase="5005">Προέκυψε σφάλμα κατά την διαδικασία αυθεντικοποίησης σας.</p>
<p class="text-danger" *ngSwitchCase="6000">Προέκυψε σφάλμα κατά την διαδικασία αυθεντικοποίησης σας. <br/>Παρακαλώ συνδεθείτε χρησιμοποιώντας τα στοιχεία του επίσημου λογαριασμού που διαθέτει η μονάδα στο Πανελλήνιο Σχολικό Δίκτυο.</p>
<p class="text-danger" *ngSwitchCase="6000">Προέκυψε σφάλμα κατά την διαδικασία αυθεντικοποίησης σας. <br/>Παρακαλώ συνδεθείτε χρησιμοποιώντας τα στοιχεία του λογαριασμού με τον οποίο συνδέεστε στο Myschool.</p>
<p class="text-danger" *ngSwitchDefault>Προέκυψε σφάλμα {{ errorCode$ | async }}</p>
</div>
<div class="alert alert-danger" role="alert">Για να επαναλάβετε τη διαδικασία σύνδεσης πρέπει πρώτα να αποσυνδεθείτε.</div>
......
......@@ -17,7 +17,7 @@ import {Router} from "@angular/router";
<div *ngIf="(loginInfo$ | async).size !== 0" style="margin-top: 30px; min-height: 500px;">
<br/><br/>
<p align="left"><strong>Ηλεκτρονικές δηλώσεις προτίμησης ΕΠΑΛ για το νέο σχολικό έτος</strong></p>
<p align="left">Η υπηρεσία υποβολής δήλωσης προτίμησης δεν είναι διαθέσιμη αυτή την περίοδο. Αν έχετε υποβάλλει ήδη δήλωση μπορείτε να την δείτε και να την εκτυπώσετε σε μορφή PDF από την επιλογή "Υποβληθείσες Δηλώσεις επάνω δεξιά"</p>
<p align="left">Η υπηρεσία υποβολής δήλωσης προτίμησης δεν είναι διαθέσιμη αυτή την περίοδο. Αν έχετε υποβάλλει ήδη δήλωση μπορείτε να την δείτε και να την εκτυπώσετε σε μορφή PDF από την επιλογή "Υποβληθείσες Δηλώσεις" επάνω δεξιά</p>
<div class="row" style="margin-top: 40px;">
<div class="col-md-9 offset-md-3">
<button class="btn-primary btn-lg isclickable" style="width: 12em;" (click)="signOut()">
......
......@@ -69,7 +69,7 @@ export const MainRoutes: Routes = [
{ path: 'application-preview', component: ApplicationPreview, canActivate: [StudentAuthGuard, StudentLockGuard] },
{ path: 'schools-order-select', component: SchoolsOrderSelect, canActivate: [StudentAuthGuard, StudentLockGuard] },
{ path: 'application-submit', component: ApplicationSubmit, canActivate: [StudentAuthGuard, StudentLockGuard] },
{ path: 'submited-preview', component: SubmitedPreview, canActivate: [StudentAuthGuard, StudentLockGuard] },
{ path: 'submited-preview', component: SubmitedPreview, canActivate: [StudentAuthGuard] },
{ path: 'submited-person', component: SubmitedPerson, canActivate: [StudentAuthGuard, StudentLockGuard] },
{ path: 'post-submit', component: AfterSubmit, canActivate: [StudentAuthGuard, StudentLockGuard] },
{ path: 'school/director-view', component: DirectorView, canActivate: [SchoolAuthGuard, SchoolStudentsLockedGuard] },
......
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