Commit c858dedc authored by Χάρης Παπαδόπουλος's avatar Χάρης Παπαδόπουλος
Browse files

Created a bypass for second chance schools. A minor fix in CBController

parent 145dc316
...@@ -304,14 +304,15 @@ class CBController extends ControllerBase ...@@ -304,14 +304,15 @@ class CBController extends ControllerBase
public function getXMLElements($doc){ public function getXMLElements($doc){
$webUserDetails = $doc->getElementsByTagName( "WebUserDetails" ); $webUserDetails = $doc->getElementsByTagName( "WebUserDetails" );
if (!$webUserDetails || $webUserDetails->length === 0) if (!$webUserDetails || $webUserDetails->length === 0)
return array( // to be changed to empty array return false;
/* return array( // to be changed to empty array
'firstName' => '', 'firstName' => '',
'surname' => '', 'surname' => '',
'fathersName' => '', 'fathersName' => '',
'comments' => '', 'comments' => '',
'tin' => '12345' 'tin' => '12345'
); ); */
// return false;
foreach( $webUserDetails as $element ) foreach( $webUserDetails as $element )
{ {
$comments = $element->getElementsByTagName( "comments" ); $comments = $element->getElementsByTagName( "comments" );
...@@ -330,13 +331,14 @@ class CBController extends ControllerBase ...@@ -330,13 +331,14 @@ class CBController extends ControllerBase
$tin = $tins->item(0)->nodeValue; $tin = $tins->item(0)->nodeValue;
if (!$tin || $tin === '') if (!$tin || $tin === '')
return array( // to be changed to empty array return false;
/* return array( // to be changed to empty array
'firstName' => '', 'firstName' => '',
'surname' => '', 'surname' => '',
'fathersName' => '', 'fathersName' => '',
'comments' => '', 'comments' => '',
'tin' => '12345' 'tin' => '12345'
); ); */
return array( return array(
'firstName' => $firstName, 'firstName' => $firstName,
'surname' => $surname, 'surname' => $surname,
......
...@@ -218,4 +218,4 @@ ...@@ -218,4 +218,4 @@
</form> </form>
<!-- <pre>{{studentDataGroup.value | json}}</pre> --> <!-- <pre>{{studentDataGroup.value | json}}</pre> -->
...@@ -185,8 +185,11 @@ import { ...@@ -185,8 +185,11 @@ import {
return 1; return 1;
else if ((new Date().getFullYear()) - d.date.year < 15) else if ((new Date().getFullYear()) - d.date.year < 15)
return 2; 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; 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 ) if (this.studentDataGroup.controls["telnum"].value.length !== 10 )
return 4; return 4;
......
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