Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
e-epal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Σταύρος Παπαδάκης
e-epal
Commits
7fb4b3d2
Commit
7fb4b3d2
authored
Aug 02, 2017
by
Χάρης Παπαδόπουλος
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated DirectorView controller for d class
parent
1e3793d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
drupal/modules/epal/src/Controller/DirectorView.php
drupal/modules/epal/src/Controller/DirectorView.php
+26
-0
No files found.
drupal/modules/epal/src/Controller/DirectorView.php
View file @
7fb4b3d2
...
...
@@ -611,8 +611,10 @@ class DirectorView extends ControllerBase
$SchoolCat
=
reset
(
$SchoolCats
);
if
(
$SchoolCat
)
{
$categ
=
$SchoolCat
->
metathesis_region
->
value
;
$operation_shift
=
$school
->
operation_shift
->
value
;
}
else
{
$categ
=
'-'
;
$operation_shift
=
'-'
;
}
$CourseA
=
$this
->
entityTypeManager
->
getStorage
(
'epal_student'
)
->
loadByProperties
(
array
(
'id'
=>
$schoolid
));
...
...
@@ -668,6 +670,30 @@ class DirectorView extends ControllerBase
}
}
if
(
$operation_shift
==
'ΕΣΠΕΡΙΝΟ'
)
{
$limit
=
$this
->
getLimit
(
4
,
$categ
);
$sCon
=
$this
->
connection
->
select
(
'eepal_specialties_in_epal_field_data'
,
'eSchool'
);
$sCon
->
leftJoin
(
'epal_student_class'
,
'eStudent'
,
'eStudent.epal_id = '
.
$schoolid
.
' '
.
'AND eStudent.specialization_id = eSchool.specialty_id '
.
'AND eStudent.currentclass = 4'
);
$sCon
->
fields
(
'eSchool'
,
array
(
'specialty_id'
))
->
fields
(
'eStudent'
,
array
(
'specialization_id'
))
->
groupBy
(
'specialization_id'
)
->
groupBy
(
'specialty_id'
)
->
condition
(
'eSchool.epal_id'
,
$schoolid
,
'='
);
$sCon
->
addExpression
(
'count(eStudent.id)'
,
'eStudent_count'
);
$results
=
$sCon
->
execute
()
->
fetchAll
(
\
PDO
::
FETCH_OBJ
);
foreach
(
$results
as
$result
)
{
if
(
$result
->
eStudent_count
<
$limit
)
{
return
false
;
}
}
}
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment