fixed report

parent e8501f6d
......@@ -74,7 +74,7 @@ class DirectorView extends ControllerBase
if ($user) {
$epalId = $user->init->value;
//hard
//$epalId = 46;
//$epalId = 315;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $epalId));
$school = reset($schools);
if (!$school) {
......@@ -996,7 +996,7 @@ class DirectorView extends ControllerBase
if ($user) {
$schoolid = $user->init->value;
//hard
//$schoolid = 46;
//$schoolid = 315;
$schools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('id' => $schoolid));
$school = reset($schools);
if (!$school) {
......
......@@ -2528,7 +2528,7 @@ class ReportsCreator extends ControllerBase
}
$schoolid = $user->init->value;
//hard
//$schoolid = 1573;
//$schoolid = 954;
//user role validation
$roles = $user->getRoles();
......@@ -2633,6 +2633,17 @@ class ReportsCreator extends ControllerBase
}
//new piece of code ..
//add in hgid array invalid ids!
$sCon = $this->connection
->select('invalid_apps', 'eInvalid')
->fields('eInvalid', array('id'));
$invalidApps = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($invalidApps as $invalidApp)
array_push($hgids, $invalidApp->id);
//βρες τους αυτοδίκαια
/*
$sCon = $this->connection
......@@ -2839,6 +2850,14 @@ class ReportsCreator extends ControllerBase
}
}
//new piece of code ..
//add in hgid array invalid ids!
$sCon = $this->connection
->select('invalid_apps', 'eInvalid')
->fields('eInvalid', array('id'));
$invalidApps = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
foreach ($invalidApps as $invalidApp)
array_push($hgids, $invalidApp->id);
//βρες τους αυτοδίκαια
/*
......
......@@ -2736,7 +2736,7 @@ public function FindCoursesPerSchoolGel(Request $request)
if ($user) {
$schoolid = $user->init->value;
//hard
//$schoolid = 1573;
//$schoolid = 954;
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $schoolid));
$school = reset($schools);
if (!$school) {
......@@ -3104,7 +3104,7 @@ public function getStudentPerSchoolGel(Request $request, $classId)
if ($user) {
$gelId = $user->init->value;
//hard
//$gelId = 1573;
//$gelId = 954;
//$this->logger->warning($gelId."kvdikos sxoleiou".$classId);
$schools = $this->entityTypeManager->getStorage('gel_school')->loadByProperties(array('id' => $gelId));
$school = reset($schools);
......@@ -3223,7 +3223,7 @@ public function getStudentPerSchoolGel(Request $request, $classId)
}
if ($studentPerSchool || $existingstudents_prom || existingstudents_non_prom) {
if ($studentPerSchool || $existingstudents_prom || $existingstudents_non_prom) {
$list = array();
foreach ($studentPerSchool as $object) {
......
......@@ -61,7 +61,7 @@ import { HelperDataService } from "../../services/helper-data-service";
</div>
<div *ngFor="let CoursesPerSchools$ of CoursesPerSchool$ | async; let i=index; let isOdd=odd; let isEven=even" >
<li class="list-group-item isclickable" (click)="setActive(i)"
(click)="findstudent(CoursesPerSchools$.class)"
(click)="findstudent(CoursesPerSchools$.class, courseActive, i)"
[class.changelistcolor]= "CoursesPerSchools$.size < CoursesPerSchools$.limitdown"
[class.oddout]="isOdd" [class.evenout]="isEven" [class.selectedout]="courseActive === i" >
<div class="row" style="line-height: 2em;">
......@@ -360,27 +360,31 @@ import { HelperDataService } from "../../services/helper-data-service";
});
}
findstudent(taxi) {
findstudent(taxi, courseActive, i) {
this.showLoader.next(true);
this.dynamicCount.next("");
this.retrievedStudent.next(false);
this.StudentInfoSub = this._hds.getStudentPerSchoolGel(taxi)
.subscribe(data => {
this.StudentInfo$.next(data);
this.retrievedStudent.next(true);
this.showLoader.next(false);
this.dynamicCount.next(data.length);
},
error => {
this.StudentInfo$.next([{}]);
console.log("Error Getting Students");
this.showLoader.next(false);
if (error.status === 404) {
this.showModal("#emptyselection");
} else {
this.showModal("#errorselection");
}
});
if (courseActive == i) {
this.StudentInfoSub = this._hds.getStudentPerSchoolGel(taxi)
.subscribe(data => {
this.StudentInfo$.next(data);
this.retrievedStudent.next(true);
this.showLoader.next(false);
this.dynamicCount.next(data.length);
},
error => {
this.StudentInfo$.next([{}]);
console.log("Error Getting Students");
this.showLoader.next(false);
if (error.status === 404) {
this.showModal("#emptyselection");
} else {
this.showModal("#errorselection");
}
});
}
else
this.showLoader.next(false);
}
......
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