Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Χάρης Παπαδόπουλος
e-epal
Commits
674560cc
Commit
674560cc
authored
May 23, 2017
by
Open Source Developer
Browse files
Merge branch 'develop' of
https://git.minedu.gov.gr/itminedu/e-epal
into stylesandmenus
parents
b05666a6
606154d1
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
drupal/modules/epal/epal.routing.yml
View file @
674560cc
...
...
@@ -158,6 +158,14 @@ epal.ministry.report-all-stat:
_controller
:
'
\Drupal\epal\Controller\ReportsCreator::makeReportAllStat'
requirements
:
_user_is_logged_in
:
'
TRUE'
epal.ministry.report-no-capacity
:
path
:
'
/ministry/report-no-capacity/{capacityEnabled}'
options
:
_auth
:
[
'
basic_auth'
]
defaults
:
_controller
:
'
\Drupal\epal\Controller\ReportsCreator::makeReportNoCapacity'
requirements
:
_user_is_logged_in
:
'
TRUE'
epal.ministry.retrieve-registry-id
:
path
:
'
/ministry/retrieve-registry-id'
options
:
...
...
@@ -214,4 +222,3 @@ findschoolid:
_controller
:
'
\Drupal\epal\Controller\DirectorView::getSchoolID'
requirements
:
_user_is_logged_in
:
'
TRUE'
drupal/modules/epal/src/Controller/ApplicationSubmit.php
View file @
674560cc
...
...
@@ -130,7 +130,7 @@ class ApplicationSubmit extends ControllerBase {
// or: epal_student_sector_field (αφορά μαθητές Β' Λυκείου)
//if ($applicationForm[0][currentclass] === "Γ' Λυκείου") {
if
(
$applicationForm
[
0
][
currentclass
]
===
"3"
)
{
if
(
$applicationForm
[
0
][
currentclass
]
===
"3"
||
$applicationForm
[
0
][
currentclass
]
===
"4"
)
{
//$course = array('name
$course
=
array
(
//'name' => $aitisi[3][name],
...
...
drupal/modules/epal/src/Controller/Distribution.php
View file @
674560cc
...
...
@@ -188,6 +188,8 @@ class Distribution extends ControllerBase {
$eepalSpecialtiesInEpal
=
$sCon
->
execute
()
->
fetchAll
(
\
PDO
::
FETCH_OBJ
);
foreach
(
$eepalSpecialtiesInEpal
as
$eepalSpecialInEp
)
{
$this
->
checkCapacityAndArrange
(
$eepalSchool
->
id
,
"3"
,
$eepalSpecialInEp
->
specialty_id
,
$limitUp_class
,
$eepalSpecialInEp
->
capacity_class_specialty
);
//Δ' Λυκείου
$this
->
checkCapacityAndArrange
(
$eepalSchool
->
id
,
"4"
,
$eepalSpecialInEp
->
specialty_id
,
$limitUp_class
,
$eepalSpecialInEp
->
capacity_class_specialty
);
}
}
//end for each school/department
...
...
@@ -262,7 +264,8 @@ class Distribution extends ControllerBase {
$epalSectorChosen
=
$clCon
->
execute
()
->
fetchAll
(
\
PDO
::
FETCH_OBJ
);
$epalSecChos
=
reset
(
$epalSectorChosen
);
}
elseif
(
$epalStudent
->
currentclass
===
"3"
)
{
//Δ'Λυκείου - Γ' Λυκείου
elseif
(
$epalStudent
->
currentclass
===
"3"
||
$epalStudent
->
currentclass
===
"4"
)
{
$clCon
=
$this
->
connection
->
select
(
'epal_student_course_field'
,
'courses'
)
->
fields
(
'courses'
,
array
(
'student_id'
,
'coursefield_id'
))
->
condition
(
'courses.student_id'
,
$epalStudent
->
id
,
'='
);
...
...
@@ -272,7 +275,8 @@ class Distribution extends ControllerBase {
if
(
$epalStudent
->
currentclass
===
"2"
)
$specialization_id
=
$epalSecChos
->
sectorfield_id
;
elseif
(
$epalStudent
->
currentclass
===
"3"
)
//Δ'Λυκείου - Γ' Λυκείου
elseif
(
$epalStudent
->
currentclass
===
"3"
||
$epalStudent
->
currentclass
===
"4"
)
$specialization_id
=
$epalCourChos
->
coursefield_id
;
else
$specialization_id
=
-
1
;
...
...
@@ -530,110 +534,4 @@ class Distribution extends ControllerBase {
/*
public function makegGeneralReport(Request $request) {
try {
if (!$request->isMethod('GET')) {
return $this->respondWithStatus([
"message" => t("Method Not Allowed")
], Response::HTTP_METHOD_NOT_ALLOWED);
}
//user validation
//Note: $authToken = $postData->username
$authToken = $request->headers->get('PHP_AUTH_USER');
$users = $this->entityTypeManager->getStorage('user')->loadByProperties(array('name' => $authToken));
$user = reset($users);
if (!$user) {
return $this->respondWithStatus([
'message' => t("User not found"),
], Response::HTTP_FORBIDDEN);
}
//user role validation
//$user = \Drupal\user\Entity\User::load($user->id());
$roles = $user->getRoles();
$validRole = false;
foreach ($roles as $role)
if ($role === "ministry") {
$validRole = true;
break;
}
if (!$validRole) {
return $this->respondWithStatus([
'message' => t("User Invalid Role"),
], Response::HTTP_FORBIDDEN);
}
//υπολογισμός αριθμού αιτήσεων
$sCon = $this->connection->select('epal_student', 'eStudent')
->fields('eStudent', array('id'));
$numTotal = $sCon->countQuery()->execute()->fetchField();
//υπολογισμός αριθμού αιτήσεων που ικανοποιήθηκαν στην i προτίμηση
$numData = array();
for ($i=0; $i < 3; $i++) {
$sCon = $this->connection->select('epal_student_class', 'eStudent')
->fields('eStudent', array('id', 'distribution_id'))
->condition('eStudent.distribution_id', $i+1, '=');
array_push($numData, $sCon->countQuery()->execute()->fetchField());
}
// υπολογισμός αριθμού αιτήσεων που ΔΕΝ ικανοποιήθηκαν
//Σημείωση: υπολογισμός με queries στη βάση
$sCon = $this->connection->select('epal_student_class', 'eStudent')
->fields('eStudent', array('id'));
$epalStudents = $sCon->execute()->fetchAll(\PDO::FETCH_OBJ);
$studentIds = array();
foreach ($epalStudents as $epalStudent)
array_push($studentIds, $epalStudent->id);
$sCon = $this->connection->select('epal_student', 'eStudent')
->fields('eStudent', array('id'))
->condition('eStudent.id', $studentIds, 'NOT IN');
$numNoAllocated = $sCon->countQuery()->execute()->fetchField();
$list = array();
//$record = new generalReportSchema;
//$record->name = "nikos";
//$record->numStudents = 20;
array_push($list,(object) array('name' => "Αριθμός Αιτήσεων", 'numStudents' => $numTotal));
// $record = (object) array('name' => "Αριθμός Αιτήσεων:", 'numStudents' => $numTotal);
array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην πρώτη τους προτίμηση", 'numStudents' => $numData[0]));
//$record = (object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην πρώτη τους προτίμηση:", 'numStudents' => $numData[0]);
array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην δεύτερή τους προτίμηση", 'numStudents' => $numData[1]));
//$record = (object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην δεύτερή τους προτίμηση:", 'numStudents' => $numData[1]);
array_push($list,(object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην τρίτη τους προτίμηση", 'numStudents' => $numData[2]));
//$record = (object) array('name' => "Αριθμός μαθητών που τοποθετήθηκαν στην τρίτη τους προτίμηση:", 'numStudents' => $numData[2]);
array_push($list,(object) array('name' => "Αριθμός μαθητών που δεν τοποθετήθηκαν σε καμμία τους προτίμηση", 'numStudents' => $numNoAllocated));
//$record = (object) array('name' => "Αριθμός μαθητών που δεν τοποθετήθηκαν σε καμμία τους προτίμηση:", 'numStudents' => $numNoAllocated);
return $this->respondWithStatus(
$list
, Response::HTTP_OK);
} //end try
catch (\Exception $e) {
$this->logger->warning($e->getMessage());
return $this->respondWithStatus([
"message" => t("An unexpected problem occured during DELETE proccess in makeSelectionOfStudents Method of Distribution")
], Response::HTTP_INTERNAL_SERVER_ERROR);
}
}
*/
}
drupal/modules/epal/src/Controller/InformUnlocatedStudents.php
View file @
674560cc
...
...
@@ -162,9 +162,10 @@ class InformUnlocatedStudents extends ControllerBase {
$key
=
'massive_mail'
;
//to be checked..
$to
=
$email
;
$params
[
'message'
]
=
t
(
'Σας ενημερώνουμε ότι η αίτησή σας με Α/Α: '
)
.
$appId
.
t
(
'/'
)
.
date
(
'd/m/Y'
,
$epalNonLocatedStudent
->
created
)
.
t
(
' δεν ικανοποιήθηκε. Παρακαλώ επικοινωνήστε άμεσα τηλεφωνικά με τη Διεύθυνση Δευτεροβάθμιας Εκπαίδευσης / Τμήμα Επαγγελματικής Εκπαίδευσης,
στην οποία ανήκετε, ώστε να διερευνηθεί η δυνατότητα εγγραφής σας σε αντίστοιχο ΕΠΑΛ'
);
//e-mail body
$params
[
'message'
]
=
t
(
'Σας ενημερώνουμε ότι η αίτησή σας με Α/Α: '
)
.
t
(
$appId
)
.
t
(
' - '
)
.
t
(
date
(
'd/m/Y'
,
$epalNonLocatedStudent
->
created
))
.
t
(
' δεν ικανοποιήθηκε. Παρακαλώ επικοινωνήστε άμεσα τηλεφωνικά με τη Διεύθυνση Δευτεροβάθμιας Εκπαίδευσης / Τμήμα Επαγγελματικής Εκπαίδευσης,'
)
.
t
(
' στην οποία ανήκετε, ώστε να διερευνηθεί η δυνατότητα εγγραφής σας σε αντίστοιχο ΕΠΑΛ. '
)
.
t
(
'\r\nΤεστ1\nΤεστ2'
)
;
//e-mail body
//add new lines with SENDER name - check it
//$params['subject'] = t('Μη ικανοποίηση ηλεκτρονικής αίτησης για εγγραφή σε ΕΠΑΛ');
...
...
drupal/modules/epal/src/Controller/ReportsCreator.php
View file @
674560cc
This diff is collapsed.
Click to expand it.
drupal/modules/epal/src/Entity/EpalStudent.php
View file @
674560cc
...
...
@@ -963,6 +963,25 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'agreement'
]
=
BaseFieldDefinition
::
create
(
'boolean'
)
->
setLabel
(
t
(
'Συμφωνία όρων συστήματος'
))
->
setDescription
(
t
(
'Συμφωνία όρων συστήματος.'
))
->
setSettings
(
array
(
'text_processing'
=>
0
,
))
->
setRequired
(
false
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'boolean'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'boolean'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'status'
]
=
BaseFieldDefinition
::
create
(
'boolean'
)
->
setLabel
(
t
(
'Publishing status'
))
->
setDescription
(
t
(
'A boolean indicating whether the EPAL Student is published.'
))
...
...
drupal/modules/epaldeploysystem/config/install/views.view.coursesperschool_night.yml
0 → 100644
View file @
674560cc
langcode
:
el
status
:
true
dependencies
:
config
:
-
user.role.administrator
-
user.role.applicant
-
user.role.authenticated
module
:
-
basic_auth
-
epalreadydata
-
hal
-
rest
-
serialization
-
user
_core
:
default_config_hash
:
7lFDDggbFVzw0CGbo37kC2WLyNHGubRf8VfvN8b5iQ0
id
:
coursesperschool_night
label
:
coursesperschool_night
module
:
views
description
:
'
'
tag
:
'
'
base_table
:
eepal_specialties_in_epal_field_data
base_field
:
id
core
:
8.x
display
:
default
:
display_plugin
:
default
id
:
default
display_title
:
Master
position
:
0
display_options
:
access
:
type
:
role
options
:
role
:
authenticated
:
authenticated
administrator
:
administrator
applicant
:
applicant
cache
:
type
:
tag
options
:
{
}
query
:
type
:
views_query
options
:
disable_sql_rewrite
:
false
distinct
:
false
replica
:
false
query_comment
:
'
'
query_tags
:
{
}
exposed_form
:
type
:
basic
options
:
submit_button
:
Apply
reset_button
:
false
reset_button_label
:
Reset
exposed_sorts_label
:
'
Sort
by'
expose_sort_order
:
true
sort_asc_label
:
Asc
sort_desc_label
:
Desc
pager
:
type
:
mini
options
:
items_per_page
:
0
offset
:
0
id
:
0
total_pages
:
null
tags
:
previous
:
‹‹
next
:
››
expose
:
items_per_page
:
false
items_per_page_label
:
'
Items
per
page'
items_per_page_options
:
'
5,
10,
25,
50'
items_per_page_options_all
:
false
items_per_page_options_all_label
:
'
-
All
-'
offset
:
false
offset_label
:
Offset
style
:
type
:
table
options
:
grouping
:
{
}
row_class
:
'
'
default_row_class
:
true
override
:
true
sticky
:
false
caption
:
'
'
summary
:
'
'
description
:
'
'
columns
:
name
:
name
info
:
name
:
sortable
:
false
default_sort_order
:
asc
align
:
'
'
separator
:
'
'
empty_column
:
false
responsive
:
'
'
default
:
'
-1'
empty_table
:
false
row
:
type
:
fields
options
:
inline
:
{
}
separator
:
'
'
hide_empty
:
false
default_field_elements
:
true
fields
:
id
:
id
:
id
table
:
eepal_region_field_data
field
:
id
relationship
:
region_edu_admin_id
group_type
:
group
admin_label
:
'
'
label
:
ID
exclude
:
false
alter
:
alter_text
:
false
text
:
'
'
make_link
:
false
path
:
'
'
absolute
:
false
external
:
false
replace_spaces
:
false
path_case
:
none
trim_whitespace
:
false
alt
:
'
'
rel
:
'
'
link_class
:
'
'
prefix
:
'
'
suffix
:
'
'
target
:
'
'
nl2br
:
false
max_length
:
0
word_boundary
:
true
ellipsis
:
true
more_link
:
false
more_link_text
:
'
'
more_link_path
:
'
'
strip_tags
:
false
trim
:
false
preserve_tags
:
'
'
html
:
false
element_type
:
'
'
element_class
:
'
'
element_label_type
:
'
'
element_label_class
:
'
'
element_label_colon
:
true
element_wrapper_type
:
'
'
element_wrapper_class
:
'
'
element_default_classes
:
true
empty
:
'
'
hide_empty
:
false
empty_zero
:
false
hide_alter_empty
:
true
click_sort_column
:
value
type
:
number_integer
settings
:
thousand_separator
:
'
'
prefix_suffix
:
true
group_column
:
value
group_columns
:
{
}
group_rows
:
true
delta_limit
:
0
delta_offset
:
0
delta_reversed
:
false
delta_first_last
:
false
multi_type
:
separator
separator
:
'
,
'
field_api_classes
:
false
entity_type
:
eepal_region
entity_field
:
id
plugin_id
:
field
name_1
:
id
:
name_1
table
:
eepal_region_field_data
field
:
name
relationship
:
region_edu_admin_id
group_type
:
group
admin_label
:
'
'
label
:
Name
exclude
:
false
alter
:
alter_text
:
false
text
:
'
'
make_link
:
false
path
:
'
'
absolute
:
false
external
:
false
replace_spaces
:
false
path_case
:
none
trim_whitespace
:
false
alt
:
'
'
rel
:
'
'
link_class
:
'
'
prefix
:
'
'
suffix
:
'
'
target
:
'
'
nl2br
:
false
max_length
:
0
word_boundary
:
true
ellipsis
:
true
more_link
:
false
more_link_text
:
'
'
more_link_path
:
'
'
strip_tags
:
false
trim
:
false
preserve_tags
:
'
'
html
:
false
element_type
:
'
'
element_class
:
'
'
element_label_type
:
'
'
element_label_class
:
'
'
element_label_colon
:
true
element_wrapper_type
:
'
'
element_wrapper_class
:
'
'
element_default_classes
:
true
empty
:
'
'
hide_empty
:
false
empty_zero
:
false
hide_alter_empty
:
true
click_sort_column
:
value
type
:
string
settings
:
link_to_entity
:
false
group_column
:
value
group_columns
:
{
}
group_rows
:
true
delta_limit
:
0
delta_offset
:
0
delta_reversed
:
false
delta_first_last
:
false
multi_type
:
separator
separator
:
'
,
'
field_api_classes
:
false
entity_type
:
eepal_region
entity_field
:
name
plugin_id
:
field
id_1
:
id
:
id_1
table
:
eepal_school_field_data
field
:
id
relationship
:
epal_id
group_type
:
group
admin_label
:
'
'
label
:
ID
exclude
:
false
alter
:
alter_text
:
false
text
:
'
'
make_link
:
false
path
:
'
'
absolute
:
false
external
:
false
replace_spaces
:
false
path_case
:
none
trim_whitespace
:
false
alt
:
'
'
rel
:
'
'
link_class
:
'
'
prefix
:
'
'
suffix
:
'
'
target
:
'
'
nl2br
:
false
max_length
:
0
word_boundary
:
true
ellipsis
:
true
more_link
:
false
more_link_text
:
'
'
more_link_path
:
'
'
strip_tags
:
false
trim
:
false
preserve_tags
:
'
'
html
:
false
element_type
:
'
'
element_class
:
'
'
element_label_type
:
'
'
element_label_class
:
'
'
element_label_colon
:
true
element_wrapper_type
:
'
'
element_wrapper_class
:
'
'
element_default_classes
:
true
empty
:
'
'
hide_empty
:
false
empty_zero
:
false
hide_alter_empty
:
true
click_sort_column
:
value
type
:
number_integer
settings
:
thousand_separator
:
'
'
prefix_suffix
:
true
group_column
:
value
group_columns
:
{
}
group_rows
:
true
delta_limit
:
0
delta_offset
:
0
delta_reversed
:
false
delta_first_last
:
false
multi_type
:
separator
separator
:
'
,
'
field_api_classes
:
false
entity_type
:
eepal_school
entity_field
:
id
plugin_id
:
field
name_2
:
id
:
name_2
table
:
eepal_school_field_data
field
:
name
relationship
:
epal_id
group_type
:
group
admin_label
:
'
'
label
:
Name
exclude
:
false
alter
:
alter_text
:
false
text
:
'
'
make_link
:
false
path
:
'
'
absolute
:
false
external
:
false
replace_spaces
:
false
path_case
:
none
trim_whitespace
:
false
alt
:
'
'
rel
:
'
'
link_class
:
'
'
prefix
:
'
'
suffix
:
'
'
target
:
'
'
nl2br
:
false
max_length
:
0
word_boundary
:
true
ellipsis
:
true
more_link
:
false
more_link_text
:
'
'
more_link_path
:
'
'
strip_tags
:
false
trim
:
false
preserve_tags
:
'
'
html
:
false
element_type
:
'
'
element_class
:
'
'
element_label_type
:
'
'
element_label_class
:
'
'
element_label_colon
:
true
element_wrapper_type
:
'
'
element_wrapper_class
:
'
'
element_default_classes
:
true
empty
:
'
'
hide_empty
:
false
empty_zero
:
false
hide_alter_empty
:
true
click_sort_column
:
value
type
:
string
settings
:
link_to_entity
:
false
group_column
:
value
group_columns
:
{
}
group_rows
:
true
delta_limit
:
0
delta_offset
:
0
delta_reversed
:
false
delta_first_last
:
false
multi_type
:
separator
separator
:
'
,
'
field_api_classes
:
false
entity_type
:
eepal_school
entity_field
:
name
plugin_id
:
field
special_case
:
id
:
special_case