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
c858dedc
Commit
c858dedc
authored
Jun 20, 2017
by
Χάρης Παπαδόπουλος
Browse files
Created a bypass for second chance schools. A minor fix in CBController
parent
145dc316
Changes
3
Hide whitespace changes
Inline
Side-by-side
drupal/modules/oauthost/src/Controller/CBController.php
View file @
c858dedc
...
...
@@ -304,14 +304,15 @@ class CBController extends ControllerBase
public
function
getXMLElements
(
$doc
){
$webUserDetails
=
$doc
->
getElementsByTagName
(
"WebUserDetails"
);
if
(
!
$webUserDetails
||
$webUserDetails
->
length
===
0
)
return
array
(
// to be changed to empty array
return
false
;
/* return array( // to be changed to empty array
'firstName' => '',
'surname' => '',
'fathersName' => '',
'comments' => '',
'tin' => '12345'
);
// return false;
);
*/
foreach
(
$webUserDetails
as
$element
)
{
$comments
=
$element
->
getElementsByTagName
(
"comments"
);
...
...
@@ -330,13 +331,14 @@ class CBController extends ControllerBase
$tin
=
$tins
->
item
(
0
)
->
nodeValue
;
if
(
!
$tin
||
$tin
===
''
)
return
array
(
// to be changed to empty array
return
false
;
/* return array( // to be changed to empty array
'firstName' => '',
'surname' => '',
'fathersName' => '',
'comments' => '',
'tin' => '12345'
);
);
*/
return
array
(
'firstName'
=>
$firstName
,
'surname'
=>
$surname
,
...
...
source/components/student-application-form/application.form.main.html
View file @
c858dedc
...
...
@@ -218,4 +218,4 @@
</form>
<!-- <pre>{{studentDataGroup.value | json}}</pre> -->
<!-- <pre>{{studentDataGroup.value | json}}</pre> -->
source/components/student-application-form/application.form.main.ts
View file @
c858dedc
...
...
@@ -185,8 +185,11 @@ import {
return
1
;
else
if
((
new
Date
().
getFullYear
())
-
d
.
date
.
year
<
15
)
return
2
;
if
(
!
this
.
studentDataGroup
.
controls
[
"
lastschool_schoolname
"
].
value
.
registry_no
)
if
(
!
this
.
studentDataGroup
.
controls
[
"
lastschool_schoolname
"
].
value
.
registry_no
&&
this
.
studentDataGroup
.
controls
[
"
lastschool_schoolname
"
].
value
.
unit_type_id
!==
38
)
return
3
;
else
if
(
this
.
studentDataGroup
.
controls
[
"
lastschool_schoolname
"
].
value
.
unit_type_id
===
38
)
this
.
studentDataGroup
.
controls
[
"
lastschool_schoolname
"
].
value
.
registry_no
=
'
0000000
'
if
(
this
.
studentDataGroup
.
controls
[
"
telnum
"
].
value
.
length
!==
10
)
return
4
;
...
...
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