Merge branch 'lock_actions' into 'develop'

last school not found now passes through. fixed epal.routing

See merge request !130
parents 15c279c1 94574500
......@@ -268,6 +268,8 @@ epal.findcapacityperschool:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\DirectorView::FindCapacityPerSchool'
requirements:
_user_is_logged_in: 'TRUE'
epal.applicant.creationpdf:
path: '/epal/pdf-application'
options:
......
......@@ -118,13 +118,17 @@ class ApplicationSubmit extends ControllerBase {
if ((int)date("Y") === $lastSchoolYear && (int)$student['lastschool_unittypeid'] === 5) {
$epalSchools = $this->entityTypeManager->getStorage('eepal_school')->loadByProperties(array('registry_no' => $lastSchoolRegistryNumber));
$epalSchool = reset($epalSchools);
if (!$epalSchool){
/* if (!$epalSchool){
return $this->respondWithStatus([
"error_code" => 4004
], Response::HTTP_FORBIDDEN);
} else {
} else { */
if ($epalSchool) {
$student['currentepal'] = $epalSchool->id();
} else {
$student['currentepal'] = 0;
}
} else {
$student['currentepal'] = 0;
}
......
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